Push run 46275645144 on dev (f69a4c1a2) was red in these jobs:
- Server types: UserPlacesRepository.create, UserPlaceMergesRepository.create
and UserPlaceLinksRepository.insert shadowed MikroORM's EntityRepository
methods with other signatures (TS2416), which also broke defineEntity on the
three entities (TS2769). They are createOwn, record and insertUses now.
- Server lint: collections.service.ts had grown to 1411 lines against 1410.
The trip tag lookup of a copy moved into collections.helpers.ts
(tripTagIdsOf, tagKeyOf); the size baseline is lowered to the 1398 it holds.
- ASTCAP-001/002/005b: the trip chat core had taken in PlacesLibraryMcp,
PlaceIdentitiesMcp and TripCollectionsMcp, so core and the tours group
offered 132 tools against 128. They load with the collections group now.
- PLIB-001, PLIB-MCP-001 and the places library e2e: the two entries named
Museum tie on the name and go by their anchor, which the expected order
hard coded the other way. The fixture orders every tie by its anchors.
- ENT-003 and CLASSFIELD-002: the five new entities and their 18 NOT NULL
columns without a default are counted.
- Shared tests: collections.ratingBadge was missing in 26 locales; each has
its translation now.
@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.