Tags on the place form are pills in their own colour, with a palette under the dot that recolours a tag for the whole trip (PUT /trips/:id/tags/:id was there already, the client now reaches it through repo and store) and a custom colour field of its own instead of the system picker. A new tag is made in a colour picked the same way. Description, notes and the note for one day's visit sit in one card under a switch, each with a line on where the text shows up; the day tab is named after its day and is only there with one visit in context. Nothing about the three fields changes underneath. Opening hours get a switch for open around the clock next to closed. Google writes a place open all week as one period on Sunday that never closes; it read as Sunday open and every other day closed, and now opens every day. The phone form follows the desktop: category as one field with a list, tags in one field, the texts switch, and phone, e-mail and opening hours, which it did not have. The hours and the text tabs are shared hooks (usePlaceHours, usePlaceTextTabs). Files and costs on the phone sheets are drawn as fields like the rest, and the paste hint, a keyboard shortcut a phone has no use for, is gone with its key.
@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.