# Repo Map ## Purpose - Fast entrypoint for agents and maintainers to find the right files before editing. ## Top-Level Map - `app/`: Next.js routes and API handlers. - `components/`: UI clients and route-level presentation pieces. - `lib/`: backend/domain modules, integration helpers, contracts, shared runtime helpers. - `prisma/`: schema and seed sources. - `tests/`: `contracts`, `unit`, `integration`, `e2e`, and support helpers. - `docs/`: implemented state, discovery context, and focused implementation/design notes. ## Product Domains ### TVs - UI surfaces: `app/admin/tvs`, `app/admin/screens`, `app/player/[screenId]/route.ts` - APIs: `app/api/tvs/*` - Backend: `lib/tvs-backend-*.ts`, `lib/tvs-player-runtime-core.ts`, `lib/tvs-runtime.ts` - Implemented doc: `docs/implemented-tvs.md` ### Payments - UI surface: `app/admin/payments` - APIs: `app/api/admin/payments/*`, `app/api/integrations/payments/*` - Backend: `lib/payments.ts`, `lib/payments-auth.ts`, `lib/shared-secret.ts`, `lib/integrations.ts` - Implemented doc: `docs/implemented-payments.md` ### Network - UI surface: `app/admin/network` - APIs: `app/api/network*` - Backend: `lib/network-backend-*.ts` - Implemented doc: `docs/implemented-network.md` ### Sports / Classes / Coaches - UI surfaces: `app/admin/sports`, `app/classes/*`, `app/classes-by-date`, `app/coaches/settings` - APIs: `app/api/sports`, `app/api/classes/*`, `app/api/coaches/*` - Backend: `lib/sports-backend-*.ts`, `lib/classes-backend.ts`, `lib/classes.ts`, `lib/coaches-backend.ts` - Implemented doc: `docs/implemented-sports.md` ### Players - UI surface: `app/admin/players` - APIs: `app/api/players/*` - Backend: `lib/players-backend.ts` - Implemented doc: `docs/implemented-players.md` ## Shared Entry Docs - `PLAN.md`: current repo state + executive summary of next implementation direction. - `docs/index.md`: docs navigation index. - `docs/demo-iteration-mode.md`: L1/L2/L3 demo delivery model. ## Shared HTTP Helpers - Route JSON/envelope helpers: `lib/http/json.ts`, `lib/http/network-route-helpers.ts`, `lib/http/payments-route-helpers.ts`, `lib/http/players-route-helpers.ts`, `lib/http/sports-route-helpers.ts`