docs/architecture
Decisions
Architecture reviews, target design and decision records. Add an ADR as docs/architecture/adr/NNN-title.md with title, status and date frontmatter; reviews live in docs/architecture/review/ and target-design docs in docs/architecture/target/.
Architecture review
Where the system stands today, ranked findings with evidence.
Target design
Where it should go: data model, API plan and the migration that gets there.
- TARGET-APITarget API planproposed2026-10-12The target tRPC procedure catalogue by context, mapped to stories and to today's procedures, plus the stories with no procedure and the procedures with no story.
- TARGET-DATATarget data modelproposed2026-10-12The schema the ADRs add up to — ER diagram by context, every table defined, and a current → target mapping of all 38 tables.
- TARGET-MIGRATIONMigration planproposed2026-10-1228 reversible steps in five phases from today's schema to the target — security first, every step expand → backfill → switch → contract.
Decision records
Why the system is shaped the way it is — one decision per record.
- ADR-000Generated architecture docsaccepted2026-10-12
- ADR-001Schema changes go through journaled, expand/contract migrationsaccepted2026-10-12
- ADR-002The database enforces integrity — keys, delete rules, types and atomic writesproposed2026-10-12
- ADR-003Security hygiene — hashed tokens, verified email, server-owned sessions, guarded public writesproposed2026-10-12
- ADR-004Accounts own profiles through memberships; one handle namespaceproposed2026-10-12
- ADR-005Places — every city is a foreign key; venues carry a structured addressproposed2026-10-12
- ADR-006One event model — events, series, festival details, bookings that become eventsproposed2026-10-12
- ADR-007Festival programme, ticket types and orders live in the databaseproposed2026-10-12
- ADR-008One attendance record — interested, going, ticket holder — with one visibility ruleaccepted2026-10-12
- ADR-009Plans are typed tables, not one polymorphic plan_itemsproposed2026-10-12
- ADR-010Inbound requests are database rows; Linear and email are delivery sinksproposed2026-10-12
- ADR-011API conventions — routers per context, auth tiers, errors, cursors, idempotencyproposed2026-10-12