Dev workflow and DevOps · Pattern

Monorepo

One repository that holds several apps and shared packages together, such as a website, a mobile app and the code they share.

Code and collaboration · updated

How it works

Instead of one repository per project, a monorepo keeps them side by side, so a change to a shared package and to every app that uses it can land in one commit and one review. Package managers link local packages together through workspaces (npm, pnpm, Yarn and Bun all support them), and build tools such as Turborepo and Nx cache results and rebuild only what changed.

The opposite is a polyrepo, one repository per project. A monorepo makes sharing code and keeping versions in step easier; the cost is more tooling, slower CI without caching, and access that is all or nothing unless the host offers finer rules. Google and Meta famously keep most of their code in giant monorepos.

More in Dev workflow and DevOps

Code and collaboration

All 21 Dev workflow and DevOps terms

Crafted in the dark. Shipped to the world.

Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.