"Keep the documents in step with a Nextcloud folder" walked through Nextcloud alone: its app password, its base folder, the question where the trip should live in Nextcloud. The dialog offers five stores. The guide now reads for all of them: how each files things (by tag, in a folder, in a space), what each signs in with (an API token for Paperless-ngx, an API key and the organisation for Papra, username and app password for Nextcloud, username and app token for OpenCloud, username, password and a two-factor code for Synology Drive), that the base folder belongs to Nextcloud and Synology Drive, and that the trip lives in a tag, folder or space. The pictures keep Nextcloud as the example, and the text says so. All 23 languages use the labels of their own interface.
@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.