Skip to Content
Tech PrinciplesTechnical ResourcesApplicationMonolithic repositories

Monolithic repositories (a.k.a. ‘monorepo’) 🪨

A monolithic repository is a software development approach where code for multiple projects/applications is stored in a single version control repository rather than each one having its own separate repository.

Examples

Benefits

  • Simplified dependency management - Easier to handle cross-project dependencies
  • Atomic commits - Ability to update projects together consistently
  • Shared components - Encourages code reuse across projects
  • Simplified testing - Can test interactions between projects
  • Single source of truth - One repo for all code, configurations, docs, based on the same versioned contract

Challenges

  • Complex coordination - Need to coordinate changes across people working on it
  • Operational hurdles - complexity of the infrastructure and testing
  • Limited isolation - Changes can have broad impact
  • You’re on your own - Rest of your company not supporting this kind of repository, and not benefiting from platform engineers work, new team members onboarding to a homemade solution
  • Unbounded expansion - More and more applications running requiring an A-team to optimize cache, parallelization, deployments

Keys to Success

  • Loose coupling between projects
  • Clear organization - Structure and navigate efficiently
  • Changeset sizes - Avoid giant “god” commits
  • Permanent re-evaluation - Do I need to factor this into a shared library? Should this app be extracted out of the mono-repo? Is this app relevant for the mono-repo?

Monorepos require coordination but offer major efficiency benefits.

Last updated on