We have all of our code in one repo. It's just easier. See a line of copy I want to change? Grep the whole repo for it, find it
Backend + frontend when it can’t be done together in something like Next.js but I’m not likely to use the backend anywhere else. Here’s a recent example https://github.com/gskril/ens-adoption
Using Lerna in this one: https://github.com/pooltogether/v4-autotasks It's great when you want to share helper functions across various packages. You don't have to go update each repo one by one.
A monorepo with well-organized sub directories is the same as having different repos. But better. You are always sure to have the latest version of each component.
We use monorepo for our nodejs backend code with turborepo. Multiple services with shared utils + models. Single, unified CI flow for automated builds and deploys. Major benefits imo
contracts+f/e+subgraph in monorpo works just fine™️ (powered by turborepo, next, forge, typechain)
Optimism uses a monorepo. We have many packages and services that need to be updated simultaneously to stay in sync. It also makes it easier to run Integration tests and manage CI. For us I can’t imagine how we would function without a monorepo.
My rating - building a monolith: cool, why not - building microservices: cool, why not - building as many packages: cool, why not - building many packages as monorepo: why? Just whyyyyy? And yes, „oh but Google does it“ isn‘t a technical argument u fukin LARP
Unless you’re a big org with people dedicated to making this work, don’t do it. This is the modern version of “MSFT had their meetings on the 3rd floor so we should too” type of thinking. We used one at Uber ATG, I loved it, but it requires a lot of work.
I've been working pretty much exclusively in a monorepo for the past 9 years. When I don't, I wish I were in a monorepo.
When? Always! Amazing for universal apps + design system: https://github.com/showtime-xyz/showtime-frontend
i think most startups should probably just mono repo, its good and convenient for managing products with many services (<20)