Registry Schema Guide
Purpose
Provide a concise reference for the project registry schema, validation rules, and examples so contributors can add or review projects without breaking builds.
Scope
- Registry structure in
src/data/projects.yml - Validation rules enforced by
src/lib/registry.ts(Zod) - Environment-aware URL interpolation rules
- Examples for common cases (minimal, gold standard, evidence-light)
Prereqs / Inputs
- Portfolio App registry implementation (Stage 3.1)
- Environment variables:
NEXT_PUBLIC_DOCS_BASE_URL,NEXT_PUBLIC_GITHUB_URL,NEXT_PUBLIC_DOCS_GITHUB_URL,NEXT_PUBLIC_SITE_URL - Validation scripts:
pnpm registry:validate,pnpm registry:list
Procedure / Content
Registry Shape
Top-level object:
metadata(optional):version(number, int, >0)lastUpdated(string)
projects(array of project entries)
Project Fields
slug(required): lowercase, hyphenated, regex^[a-z0-9]+(?:-[a-z0-9]+)*$title(required)summary(required, >= 10 chars)category(enum):fullstack | frontend | backend | devops | data | mobile | othertags(array, min 1)startDate(YYYY-MM, optional)endDate(YYYY-MM, optional)ongoing(boolean, optional)status(enum):featured | active | archived | plannedtechStack(array, min 1, optional):name(required)category(enum):language | framework | library | tool | platformrationale(optional)
keyProofs(array, min 1, optional): statements of capability proofrepoUrl(optional, URL; supports{GITHUB_URL}placeholder)demoUrl(optional, URL; supports{SITE_URL}or{DOCS_BASE_URL}placeholders)evidence(object, optional):dossierPath(string, path relative to docs base, e.g.,projects/portfolio-app/)threatModelPath(string, includesthreat-model)adrIndexPath(string, ADR index path)runbooksPath(string)adr(array):{ title, url }— URLs may be docs-relativerunbooks(array):{ title, url }— URLs may be docs-relativegithub(URL; supports{GITHUB_URL}or{DOCS_GITHUB_URL}placeholders)
isGoldStandard(boolean, optional)goldStandardReason(string, optional, >= 10 chars)
Validation Rules (enforced by Zod)
- Slug format and uniqueness across all projects
- Required fields:
title,summary,tags,status,slug - URL validation on
repoUrl,demoUrl,evidence.github - Evidence link pattern warnings (non-blocking):
dossierPathshould start withprojects/ordocs/60-projects/threatModelPathshould includethreat-modeladr/runbooksURLs should start withdocs/or be absolute
Environment-Aware Placeholders
The loader interpolates placeholders before validation:
{GITHUB_URL}→NEXT_PUBLIC_GITHUB_URL{DOCS_GITHUB_URL}→NEXT_PUBLIC_DOCS_GITHUB_URL{DOCS_BASE_URL}→NEXT_PUBLIC_DOCS_BASE_URL{SITE_URL}→NEXT_PUBLIC_SITE_URL
Unresolved or empty placeholders become null and will fail validation if the field is required.
Examples
Minimal project (evidence-light)
- slug: sample-project
title: Sample Project
summary: 'Short summary (10+ chars).'
category: frontend
tags: [Next.js]
status: active
repoUrl: '{GITHUB_URL}'
Gold standard project (portfolio-app excerpt)
- slug: portfolio-app
title: 'Portfolio App (Next.js + TypeScript)'
summary: 'Production-quality portfolio application designed to be reviewed like a real service.'
category: fullstack
tags: ['TypeScript', 'Next.js', 'Vercel', 'CI/CD', 'Security', 'Docs-as-code']
startDate: '2026-01'
ongoing: true
status: featured
techStack:
- name: 'Next.js 15+'
category: framework
- name: 'TypeScript 5'
category: language
keyProofs:
- 'CI quality gates (lint, format, typecheck, secrets scan)'
- 'Build-time validated registry'
repoUrl: '{GITHUB_URL}'
evidence:
dossierPath: 'projects/portfolio-app/'
threatModelPath: 'security/threat-models/portfolio-app-threat-model'
adrIndexPath: 'architecture/adr/'
runbooksPath: 'operations/runbooks/'
github: '{GITHUB_URL}'
Multi-ADR project
- slug: docs-platform
title: 'Documentation Platform'
summary: 'Docusaurus-based evidence engine for portfolio projects.'
category: fullstack
tags: ['Docusaurus', 'TypeScript', 'Docs-as-code']
status: active
keyProofs:
- 'Autogenerated sidebars with category governance'
- 'ADR, runbook, and threat model coverage'
evidence:
dossierPath: 'projects/portfolio-docs-app/'
adr:
- title: 'ADR-0005: Stack Choice'
url: 'architecture/adr/adr-0005-portfolio-app-stack-nextjs-ts'
- title: 'ADR-0011: Data-Driven Project Registry'
url: 'architecture/adr/adr-0011-data-driven-project-registry'
Evidence-free (early stage) project
- slug: sandbox-prototype
title: 'Sandbox Prototype'
summary: 'Exploratory prototype; evidence will be added when stabilized.'
category: other
tags: ['Prototype']
status: planned
repoUrl: '{GITHUB_URL}'
Validation / Expected Outcomes
pnpm registry:validatepasses (no errors; warnings allowed for advisory checks)pnpm buildpasses (registry validated during build)- New projects appear in
pnpm registry:list
Failure Modes / Troubleshooting
- Invalid URL: Ensure placeholders resolve (check
.env.local) or use absolute URLs. - Slug regex failure: Use lowercase, hyphenated slugs only.
- Duplicate slug: Rename; slugs must be unique.
- Evidence path warning: Prefix dossiers with
projects/ordocs/60-projects/; includethreat-modelin threat model paths.
Best Practices
- Prefer short, stable slugs; avoid renames (renames are breaking).
- Keep
summaryreviewer-friendly and factual (≥10 chars). - Populate
keyProofswith concise capability claims tied to evidence. - Use placeholders for URLs so previews/prod stay aligned; avoid hardcoding hostnames.
- When evidence is missing, set status to
planned/activeand add evidence paths as they become available.
Common Patterns
- Gold standard:
isGoldStandard: true, richevidenceobject, multiple ADR/runbook links, detailedtechStackrationale. - Ongoing project:
ongoing: true, missingendDate, statusactiveorfeatured. - Evidence-light: minimal fields, status
plannedoractive, repo placeholder + future evidence TODOs in dossier.
References
- ADR: ADR-0011: Data-Driven Project Registry
- Implementation: Portfolio App
src/lib/registry.ts,src/data/projects.yml,src/data/projects.ts - Scripts:
pnpm registry:validate,pnpm registry:list