|
|
| | Ask HN: Monorepo vs. Multi-Repo | |
18 points by johnnypangs on Dec 14, 2021 | hide | past | favorite | 17 comments
|
| | I’m working at a medium size organization inside a large company with about 30 developers in it and we’re considering moving to a microfrontend implementation. We are debating between a using a monorepo or multi-repo strategy and I wanted some advice (and maybe some anecdotes) on people that have gone through this. Thanks! |
|

Join us for AI Startup School this June 16-17 in San Francisco!
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
|
Multi-repo setups induce a lot of overhead, especially if you don't already have people on your team who know how to manage them. Monorepo setups are just /easier/ on average. To illustrate, here's a simple situation you might run into: you're attempting to upgrade two software components at the same time. For a multi-repo: you open up PRs with the updates for each repo, great. Now you want to test that the two PRs work correctly together. So you might have a third repository with integration tests that can stand up both components with references to your other repositories via submodules. You create a branch on your integration testing repository and check out the appropriate branches of each submodule. You'll also need to keep these submodules updated whenever you update the corresponding PRs. If both updates need to be atomic then you'll need something to make sure both PRs are merged before any releases get cut. You'll have to start throwing some serious automation on top of all of this or it'll become too annoying to manage. For a monorepo: you create one PR with changes to both components. All of your tests run within the monorepo.