Architecture Decision RecordsADR-0001: Polyglot Monorepo

ADR-0001: Polyglot Monorepo (Turborepo + pnpm)

Status

Accepted

Context

We need to manage a TypeScript frontend (Next.js + Expo), a Go backend, shared packages, and documentation in a single repository. We need consistent tooling, shared CI/CD, and atomic cross-stack changes.

Decision

Use Turborepo with pnpm workspaces as the monorepo orchestrator. The Go backend participates in the Turbo pipeline via a wrapper package.json that delegates to go build and go test.

Consequences

Positive

  • Single repository for all code — atomic commits across stack boundaries
  • Turborepo’s caching and task orchestration speeds up CI/CD
  • pnpm’s strict dependency resolution prevents phantom dependencies
  • Shared ESLint, Prettier, and TypeScript configs via packages/config

Negative

  • Go tooling doesn’t natively integrate with Node.js-based monorepo tools
  • Developers need familiarity with both Go and TypeScript ecosystems
  • Repository size will grow over time