Simply use a monorepo
Simply use a monorepo
I wrote last month about having migrated Buttondown from plenty of separate microrepositories to a single monorepo. I’ve since accomplished the migration, and the slight irritation I felt from having to unwind a bunch of technical selections with deployment + steady integration has light.
I’m right here to let you know: if you’re operating a software program enterprise and you are not at, like, Google-tier scale, simply throw all of it in a monorepo. I’m kicking myself for not having achieved this to start with.
Here’s a checklist of I believe cheap drawbacks of getting a monorepo if you’re not a Google-tier firm:
- You can not apply role-based entry controls to sure components of the repository for safety/compliance causes.
- You can not open-source sure components of your repository. (This was the largest sticking level for me for some time — I need, ideally, all the pieces in Buttondown to be open-source besides the core plumbing and author-facing utility.)
Conversely, listed here are a listing of issues that grew to become an order of magnitude simpler now that my complete codebase is in a single repository:
- Rolling out API modifications concomitantly with downstream modifications to the documentation or the OpenAPI spec.
- Introducing feature-level modifications and the weblog submit asserting these modifications.
- Context-switching between totally different workspaces with subtly totally different configurations.
It’s possible you’ll be studying this quick essay and pondering: “Yeah, no shit! After all you don’t want a monorepo while you’re speaking about, like, 150K traces of code.” Congratulations — you’re wise, and effectively adjusted, and definitely wiser than I used to be six months in the past.
However I do know there’s just a few of you on the market who’re clinging to one thing — some irrational cause why you have got your welterweight mission break up throughout 4 separate repositories.
Possibly it is some summary sense of purity; possibly it is since you did not understand most IaaS allow you to deploy from a subfolder. No matter the reason being: belief me. Transfer it right into a monorepo. If you happen to do and you find yourself regretting it, [email me] and I am going to donate to the charity of your selection.
To wrap up, I’ll deputize two people who find themselves smarter than I’m who’ve additionally opined on the topic:
Buttondown is the best strategy to begin a e-newsletter.
Get began immediately: