# 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) |
| core-audit | `pnpm turbo gen core-package audit` | ADR-018 | docs/guides/audit-and-compliance.md |

## 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.
