veda.ng

A monorepo is a software development strategy where multiple projects, packages, or services are stored in a single version control repository, rather than separate repositories per project. Companies like Google, Meta, and Microsoft manage essentially all their code in monorepos containing billions of lines. The advantages are significant for large organizations. Atomic commits that span multiple packages are possible without complex cross-repo coordination. Shared tooling, testing infrastructure, and CI/CD pipelines apply uniformly. Refactoring across package boundaries is feasible, you can rename a function used across ten packages in one commit. Dependency management is simplified when all packages share a root. The challenges scale with organization size. Build systems must be selective, rebuilding everything on every change is impractical. Tools like Bazel, Nx, and Turborepo enable incremental builds that only rebuild what changed. Code ownership becomes complex when different teams work in the same repository. IDE performance can suffer with millions of files. The monorepo versus polyrepo debate reflects deeper questions about how teams coordinate: tighter coupling through shared code versus looser coupling through explicit APIs and versioned releases.