Why teams adopt one
- Atomic changes: renaming an API field and updating every app that uses it can happen in one pull request, reviewed and released together.
- Shared code without publishing: a validation library or design-system package is imported directly rather than versioned and released to a package registry.
- One set of tooling: linting, formatting, CI and dependency versions are consistent everywhere.
The costs
Builds and tests can become slow if every change rebuilds everything, so monorepos need tooling that knows which projects a change affects. Access control is coarser: giving a contractor access to one app may expose all of them. Git operations slow down in very large repositories.
Tools
Turborepo, Nx, pnpm and Yarn workspaces for JavaScript; Bazel and Pants for large polyglot codebases; Melos for Dart and Flutter packages. These cache build results and run tasks only for affected projects.
Is a monorepo the same as a monolith?
No. A monolith is one deployable application. A monorepo is about where code lives; it can contain many separately deployed services. Teams often confuse the two.
Questions, answered
Some well-known ones do, with custom tooling, while others prefer many repositories.
Often yes, especially when a web app and mobile app share an API and types.