All eight guides of Trip > Places now have their pictures, taken from the real app, plus the hero of the screen, and the block is translated into the other 22 languages. Making the pictures showed three texts describing a UI that is not there, and they are corrected: the file import dialog has no Enrich places via Google switch (only the list import has one, and only with a Google key), a GPX import closes with a message while only KML and KMZ leave a summary behind, and both list providers are always offered. The search and the details column need no Google key either: they fill themselves from the TREK index, OpenStreetMap, Wikipedia, Wikivoyage and Wikimedia, and only ratings are Google's. The script needed the same honesty. ConfirmDialog and the two import dialogs are portals of their own with none of Modal's classes, so they get their own locators, and create-place now looks up a place whose entry actually carries a picture, opening hours and a description, instead of photographing an empty details column.
@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.