The trip PDF gets a new layout in the app's current look, with nothing it printed before left out and more of each place on the page. - Cover: the trip photo full bleed, title and dates over it, the trip's figures on frosted tiles. - Overview: the route map, every day at a glance (colour, date, plan, the night's stay, stops, cost) and all bookings and stays with their codes. - Days: the header in the day's map colour, a photo strip of the day's stops, where the night is spent, then the plan as a timeline with the times on the left. - Places: photo or category tile, category, duration, price, rating, tags, address, coordinates, description, notes, opening hours of that day, phone, website, e-mail and the members going. The rating, e-mail, hours and reservation note come from the trip's place, since the assignment only carries a projection of it. - Bookings: route first, then airline, number, seat or platform as badges, each leg with its own code, status and the booking's code. - A second row of switches in the preview: overview, photos, coordinates, and contact and hours, next to page per day, large text and transport notes. Each one is a class on the document and remembered. The document is split into modules for its helpers, icons, stylesheet, cover and overview, and the day, so the export itself only gathers the data.
@trek/shared
Single source of truth for TREK's API contracts, expressed as Zod schemas and consumed by both the server (request validation + inferred DTO types) and the client (typed requests/responses).
This package is part of the incremental NestJS + React 19 migration (see the "Brownfield Rewrite" board). It is intentionally dormant until modules start importing it — adding it changes nothing for users.
Rules
- One folder per domain:
src/<domain>/<domain>.schema.ts(+.spec.ts). - Domain-agnostic building blocks live in
src/common/. - A route is only considered migrated once its contract lives here.
- Schemas are the source of truth; server DTOs and client types are inferred from them
(
z.infer<typeof schema>), never hand-duplicated.
Consumption (dev)
Both apps resolve @trek/shared to this package's TypeScript source:
- Server (
tsx): viapathsinserver/tsconfig.json. - Client (
vite): viaresolve.aliasinclient/vite.config.ts(+pathsfor the type-checker).
Production packaging (Docker / workspace wiring) is introduced in card F2, when the server first depends on this package at runtime. Until then prod builds are untouched.
Not yet here
The canonical error envelope is finalised in card F5 (it must match TREK's current Express error responses byte-for-byte), so it is deliberately not invented in F1.