Web apps & software

What is a monorepo?

A monorepo is a single version-control repository that holds several related projects, for example a web dashboard, a mobile app, an API and the libraries they share, instead of giving each project its own repository.

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.

By the Stegnor team · Updated