Back to glossary

Monorepo

A version control strategy where multiple projects, libraries, and services are stored in a single repository, enabling atomic cross-project changes, shared tooling, and simplified dependency management.

A monorepo contains all of an organization's code in one repository, as opposed to having separate repositories for each project. Companies like Google, Meta, and Microsoft use monorepos at massive scale. Tools like Turborepo, Nx, Bazel, and Pants provide the build system intelligence needed to make monorepos fast, running only the tests and builds affected by a given change.

The advantages are significant. Cross-service refactoring is atomic: you can update an API and all its consumers in a single commit. Shared libraries are always at the latest version, eliminating dependency version conflicts. Code review happens in one place, and CI/CD pipelines have full visibility into change impact.

For AI product teams, monorepos simplify the coordination between application code, model serving code, data pipelines, and shared utilities. When a model's output format changes, you can update the model serving layer and the consuming application layer in the same pull request, ensuring they stay in sync. The trade-off is build tool complexity and repository size management at scale.

Related Terms