THE LEDGER PATTERN
Projects, devlog, wiki, docs, blog — every index page is a typed array in src/lib/ rendered through one card component. Add an entry, get a card, a route entry, a stat in the strip. The page is a query; the registry is the database.
why data-first
Registries force honesty at authoring time. A project with no href renders xcy://name — a protocol stub, visibly unreachable. An entry that can't show a commit hash doesn't get a diff link. The schema encodes what counts as real.
interface Project {
status: "live" | "dev" | "rnd";
locked?: boolean; // sealed ≠ unreleased
href: string | null; // null → xcy:// stub
src: string | null; // null → no SOURCE btn
}It also makes the site cheap to extend: the v2 pages (docs, blog, contact) are three new registries and their renderers — no layout work, because the layout was always the data.