ADR-0001: Use a pnpm/Turbo TypeScript monorepo
- Status: Accepted
- Date: 2026-09-19
- Scope: M0 and later milestones
Context
PlatePilot has mobile, API, internal, infrastructure, contract, provider, configuration, and design-token concerns. They need coordinated validation and shared types without publishing private packages.
Decision
Keep these concerns in one private TypeScript monorepo:
- pnpm workspaces manage
apps/*, packages/*, and infra.
- pnpm is pinned to
10.34.5 through packageManager; Node is constrained to 22.x.
- Turbo orchestrates package builds, linting, type checks, and tests.
- Shared packages expose deliberate public interfaces. Applications do not reach into another package’s internal files.
- The lockfile is committed and installs use the pinned pnpm version.
Consequences
- A single change can update a contract and all consumers atomically.
- One validation gate catches cross-package type and build failures.
- The repository can become tightly coupled if package boundaries are bypassed.
- Toolchain upgrades affect the whole workspace and need coordinated testing.
- Private workspace packages are not assumed to be independently versioned or deployed.
Follow-up
- Keep domain schemas, provider ports, configuration, and design primitives in their named packages.
- Add explicit dependency rules if accidental cross-boundary imports become common.
- Record any move to separately versioned repositories or packages in a superseding ADR.