mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-20 13:51:45 +00:00
Migrate TREK 3 to NestJS + React 19 with a shared Zod contract layer
Brownfield strangler migration of the backend onto NestJS modules (auth, trips, days, places, assignments, packing, todo, budget, reservations, collab, files, photos, journey, share, settings, backup, oidc, oauth, admin, atlas, vacay, weather, airports, maps, categories, tags, notifications, system-notices) served through a per-prefix dispatcher, keeping the existing SQLite/better-sqlite3 DB and JWT httpOnly cookie auth, with behavioural parity for every route. Client: React 19 upgrade, "page = wiring container + data hook" pattern across all pages, per-domain Zustand stores bound to @trek/shared contracts, and decomposition of the large components (DayPlanSidebar, PackingListPanel, CollabNotes, FileManager, MemoriesPanel, PlacesSidebar, CollabChat, SystemNoticeModal, BudgetPanel, PlaceFormModal, ...) into focused render units backed by in-file hooks. Apply the shared global request pipeline (helmet/CSP, CORS, HSTS, forced HTTPS, the global MFA policy and request logging) to the NestJS instance as well, so a migrated route is protected identically to the legacy fallback rather than bypassing it.
This commit is contained in:
+4
-2
@@ -125,6 +125,7 @@ export interface BudgetItem {
|
||||
persons?: number | null;
|
||||
days?: number | null;
|
||||
note?: string | null;
|
||||
reservation_id?: number | null;
|
||||
sort_order: number;
|
||||
created_at?: string;
|
||||
members?: BudgetItemMember[];
|
||||
@@ -284,12 +285,12 @@ export interface Setting {
|
||||
}
|
||||
|
||||
export interface AuthRequest extends Request {
|
||||
user: { id: number; username: string; email: string; role: string };
|
||||
user: User;
|
||||
trip?: { id: number; user_id: number };
|
||||
}
|
||||
|
||||
export interface OptionalAuthRequest extends Request {
|
||||
user: { id: number; username: string; email: string; role: string } | null;
|
||||
user: User | null;
|
||||
}
|
||||
|
||||
export interface AssignmentRow extends DayAssignment {
|
||||
@@ -352,6 +353,7 @@ export interface JourneyEntry {
|
||||
mood?: string | null;
|
||||
weather?: string | null;
|
||||
tags?: string | null;
|
||||
pros_cons?: string | null;
|
||||
visibility: 'private' | 'shared' | 'public';
|
||||
sort_order: number;
|
||||
created_at: number;
|
||||
|
||||
Reference in New Issue
Block a user