mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-21 22:31:46 +00:00
Phase 0 — NestJS + Zod foundation harness (F1–F8) (#1050)
Co-hosted NestJS app behind the existing Express server via a strangler-fig dispatcher, sharing the same better-sqlite3 connection and JWT httpOnly cookie. Additive and dormant: default routing stays on Express, Nest only serves its own /api/_nest diagnostics until a module opts in. F1 @trek/shared Zod contract package; F2 Nest bootstrap co-hosted (fall-through, single Dockerfile/port); F3 shared better-sqlite3 provider; F4 JWT cookie auth guard (+ @CurrentUser, admin guard); F5 Zod validation pipe + error-envelope parity; F6 Nest test + coverage gates; F7 per-prefix strangler toggle (env, default Express); F8 CI build/typecheck/test/coverage. Remaining F4/F6/F8 checklist items (trip-access + permission levels + MFA policy, e2e harness/seed + 80% gate, Nest↔Express parity test, Playwright PR-comment workflow) are tracked on the first consuming module cards (L1/A1/C1).
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* @trek/shared — single source of truth for TREK's API contracts.
|
||||
*
|
||||
* Zod schemas defined here are consumed by BOTH the server (validation +
|
||||
* inferred DTO types) and the client (typed requests/responses). A route is
|
||||
* only considered "migrated" once its contract lives in this package.
|
||||
*
|
||||
* Layout: one folder per domain (e.g. src/trip/trip.schema.ts), plus the
|
||||
* domain-agnostic primitives below. See the board card "Module blueprint".
|
||||
*/
|
||||
export * from './common/primitives.schema';
|
||||
export * from './common/pagination.schema';
|
||||
Reference in New Issue
Block a user