Monorepo
A monorepo is a single code repository that contains several logically distinct projects (applications, services, shared libraries), as opposed to a polyrepo setup where each project lives in its own repo.
A monorepo is a single code repository that contains several logically distinct projects (applications, services, shared libraries), as opposed to a polyrepo setup where each project lives in its own repo.
Upsides: atomic refactoring across the whole codebase, easy code and config sharing, global visibility, coordinated CI/CD. Downsides: the size of the repo, and the complexity of build tools that must understand internal dependencies to rebuild/retest only what changed.
The JavaScript/TypeScript ecosystem has dedicated tools: Turborepo, Nx, Pnpm workspaces, Yarn workspaces. Bazel and Pants cover polyglot monorepos at very large scale (Google, Meta, Stripe, Shopify…).
