What Is a Monorepo?
A monorepo is a single repository containing the source code for multiple distinct projects or packages, managed together instead of split across separate re...
Published October 8, 2026
A monorepo is a single repository that holds multiple projects, such as a frontend, backend and shared libraries. It simplifies sharing code and making coordinated changes.
The concept
Instead of many repos with versioned dependencies between them, everything lives together, so one commit can update an API and all its consumers.
Tools (pnpm workspaces, Nx, Turborepo) manage dependencies, caching and building only what changed.
Layout
repo/
├─ apps/web (Next.js)
├─ apps/api (NestJS)
└─ packages/ui (shared components)
Practical examples
pnpm workspace
packages:
- 'apps/*'
- 'packages/*'Use a shared package
{ "dependencies": { "@acme/ui": "workspace:*" } }Build only what changed
npx turbo run build --filter=webCommon mistakes
- Everything depending on everything.
- Slow CI because every change builds all projects.
- No code ownership rules.
Key takeaways
- One repo, many projects.
- Atomic cross-project changes.
- Needs tooling for speed.
FAQ
Monorepo vs monolith?
A monorepo is about repository layout; a monolith is about deployment architecture.
Who uses monorepos?
Google, Meta and many teams with Nx or Turborepo.