Overview

A monorepo holds several projects, services, and libraries in one repository with shared tooling and history, so one pull request can change a library and every call site. A polyrepo gives each project its own repository, history, CI, and release cycle. Choose a monorepo when packages change together often and cross-repo version bumps slow releases. Choose a polyrepo when teams ship on independent schedules, need separate access control, or publish packages to outsiders.

Rules

  • A monorepo pays off only with build caching and affected-only CI (pnpm workspaces with Turborepo, Nx, or Bazel); otherwise pipelines grow with the repo.
  • The polyrepo cost is coordination: a breaking change means a PR and release in the server repo, then a dependency-bump PR in each client (semantic-versioning).
  • Repository layout is independent of build system: apps/web and packages/ui in one repo is a layout choice, not a tool requirement.
  • The full trade-off matrix is in monorepo-vs-polyrepo.