DEV Community

Cover image for Monorepo vs. Multi Repo: Which One is Right for you?

Monorepo vs. Multi Repo: Which One is Right for you?

Combo on March 30, 2023

As software development teams grow in size and complexity, the decision of whether to use a monorepo or a multi repo architecture becomes increasin...
Collapse
 
jopie64 profile image
Johan

Just some remarks:

Multi repos, on the other hand, require developers to copy code from one repository to another, which can lead to duplication and inconsistencies.

Can be mitigated to have a separate shared-code repository. This can be a submodule of other project repos or it can create a library that can be consumed by other repos.

Monorepos can have longer build times and deployment times, since changes to any part of the codebase require rebuilding and redeploying the entire system.

Can be mitigated to have build pipelines focus on changes from specific directories. Although may be more complex.


I have used a monorepo before and for new projects we started to use multi repo. I'm not sure if I'd do that switch again... Most of the times people work on multiple projects and have to checkout and update all individual repos separately... We use scripts to do that now, and we have a "master" repo of which all other project repos are submodules. Still I feel it's harder to maintain this way...