Schema Documentation
Documentation for the data schema that powers this site. All entity and resource data is validated against Zod schemas at build time.
Contents
Section titled “Contents”- Diagrams - Visual documentation of entity types, relationships, and data flow
- Validation - Run
npm run crux -- validate datato check YAML files against the schema
Quick Links
Section titled “Quick Links”| Resource | Description |
|---|---|
src/data/schema.ts | Zod schema definitions (source of truth) |
src/data/entities/*.yaml | Entity data files |
src/data/resources/*.yaml | Resource/citation data |
scripts/validate/validate-yaml-schema.mjs | Schema validator script |
scripts/generate-schema-diagrams.mjs | Diagram generator |
Regenerating Diagrams
Section titled “Regenerating Diagrams”# Generate all diagramsnpm run diagrams
# Schema-derived only (from Zod)npm run diagrams:schema
# Data-derived only (from YAML)npm run diagrams:dataRaw .mmd files are saved to internal/ (gitignored) for use in external tools.