38 lines
987 B
Markdown
38 lines
987 B
Markdown
# ADR 0001: Monorepo Foundation
|
|
|
|
- Status: Accepted
|
|
- Date: 2026-02-10
|
|
|
|
## Context
|
|
|
|
The CMS platform requires:
|
|
|
|
- separate admin and public apps
|
|
- shared domain contracts and data access
|
|
- consistent tooling and CI quality gates
|
|
- incremental delivery through MVP stages
|
|
|
|
A fragmented multi-repo setup would increase coordination overhead and duplicate shared contracts.
|
|
|
|
## Decision
|
|
|
|
Adopt a Bun workspace monorepo with:
|
|
|
|
- `apps/admin` and `apps/web` for runtime surfaces
|
|
- shared packages (`@cms/content`, `@cms/db`, `@cms/crud`, `@cms/ui`, `@cms/i18n`)
|
|
- shared quality tooling (Biome, TypeScript, Vitest, Playwright, Turbo)
|
|
|
|
## Consequences
|
|
|
|
### Positive
|
|
|
|
- shared contract updates propagate in one change set
|
|
- easier cross-app refactors and testing
|
|
- single CI pipeline with consistent gates
|
|
|
|
### Negative
|
|
|
|
- stronger need for workspace discipline and clear boundaries
|
|
- larger repository clone/build surface
|
|
- potential for cross-package coupling if conventions are not enforced
|