docs: template-tiers reference (must-have + optional + generator commands)
This commit is contained in:
27
docs/architecture/template-tiers.md
Normal file
27
docs/architecture/template-tiers.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Template tiers
|
||||
|
||||
This template ships in three tiers:
|
||||
|
||||
## Must-have (always present)
|
||||
|
||||
- `@repo/core-shared` — protocol types, `BindContext`, instrumentation interfaces, jobs interface, tRPC primitives, payload helpers
|
||||
- `@repo/core-eslint` — flat-config preset + repo-rules ESLint plugin + boundaries
|
||||
- `@repo/core-typescript` — tsconfig presets (base, react-library, nextjs)
|
||||
- `@repo/core-testing` — vitest helpers, factories, mocks, contracts
|
||||
- `@repo/core-cms` — Payload config base
|
||||
- `@repo/core-api` — top-level tRPC router root (mounts feature routers)
|
||||
|
||||
Plus all 5 feature packages: auth, blog, marketing-pages, navigation, media.
|
||||
|
||||
## Optional (scaffolded on demand)
|
||||
|
||||
| Package | Generator | ADR | Guide |
|
||||
|---|---|---|---|
|
||||
| core-realtime | `pnpm turbo gen core-package realtime` | ADR-016 | docs/guides/realtime.md |
|
||||
| core-events | `pnpm turbo gen core-package events` | ADR-015 | docs/guides/events-and-jobs.md |
|
||||
| core-trpc | `pnpm turbo gen core-package trpc` | (none) | (none) |
|
||||
| core-ui | `pnpm turbo gen core-package ui` | (none) | (none) |
|
||||
|
||||
## Why optional
|
||||
|
||||
Each optional package addresses a specific need (realtime delivery, cross-feature events, tRPC, design system). Projects that don't need them get a slimmer template. The generator emits byte-identical copies of the packages as they shipped — see `turbo/generators/__snapshots__/core-package/<name>.snapshot.json` for the canonical content hashes.
|
||||
Reference in New Issue
Block a user