Overview
This page is the atomic definition. The deep-dive lives at monorepo.
Definition
A monorepo is a single version-controlled repository that contains multiple projects, services, or libraries. The projects share tooling, dependency manifests, and commit history, which makes cross-project refactors atomic and code reuse trivial. Examples include Google’s company-wide monorepo (google3), Meta’s, and open-source monorepos managed with pnpm workspaces, Turborepo, Nx, Bazel, or Buck. A monorepo is a layout choice; it does not require a specific build system.
When it applies
Use a monorepo when projects share types, packages, or release cycles, or when atomic cross-project changes matter. Avoid it when teams are fully isolated and tooling cost outweighs the integration benefit. See monorepo-vs-polyrepo for the tradeoff matrix.
Example
A web app and its shared design system live in one repo as apps/web and packages/ui. A single PR can change the button component and update every call site in apps/web at once, with one CI run validating both.
Related concepts
- monorepo - the deep-dive with tooling and tradeoff guidance.
- polyrepo - the contrasting layout strategy.
- monorepo-vs-polyrepo - the head-to-head comparison.
- project-structure - the broader project layout discipline.
- large-codebase - patterns for scaling a monorepo past a few teams.
Citing this term
See Monorepo (llmbestpractices.com/glossary/monorepo).