Repo Layout and Ownership
What This Covers
This page defines canonical monorepo boundaries for apps, shared packages, and scripts. Use it to prevent cross-app coupling and misplaced shared logic.
Canonical Layout
apps/event-site: attendee/admin event appapps/control-plane: host platform apppackages/platform-shared: platform contracts, lifecycle rules, validationpackages/runtime-core: shared runtime primitives (KV/env/path helpers only)scripts: repository-level orchestration scripts only
Ownership Rules
- Event business logic and schema live in
apps/event-site/src/lib/server/**. - Control-plane business logic and schema live in
apps/control-plane/src/lib/server/platform/**andapps/control-plane/src/lib/server/db/**. - Shared code in
packages/*must be either:- infra-only runtime helpers (
runtime-core), or - contract/validation logic (
platform-shared).
- infra-only runtime helpers (
- No app may import source files from the other app directly.
- Cross-workspace dependencies must use package imports (for example
@tripplan/platform-shared/*).
Guardrails
- Run
npm run check:boundariesto validate import boundaries. - PR checklist must confirm shared-code placement:
- new shared code is infra-only or contract-only
Related Tasks
- Commands and scripts: Commands
- Route map: Routes and APIs
- Data contracts: Data Models