A solo developer, 7 repos of AI slop, and 3 days of moving everything into one Bun + Turborepo monorepo. Why a monorepo is not a monolith, what actually gets better, and the part nobody warns you about: git history.
Select any sentence in this post to leave a margin note on it.
I hang out with other devs in The Basement, my Discord server. Questions, side projects, and what everyone's building this week. Join here.
Did this land?
Here we go again, story time.
A few months ago I picked up a project I can't name (legal reasons). The day I opened the codebase, I was like, what the duck.
It was AI slop. Spread across 7 different repos.
Now, I have nothing against separate repos. But following one rule everywhere is like using the same sword in war and then for chopping vegetables at dinner. Same tool, very different job.
So I did what you do. I worked with it. For a few months I cleaned the slop, one PR at a time, until it looked like a real codebase. But you know how it is. Once you find a cockroach in your favourite restaurant's kitchen, the food never tastes the same again, no matter how many times they clean it.
Every time I touched something, I could feel the 7 repos behind it.
Separate repos (polyrepo, if you want the fancy word) exist for a reason. They're great when you have multiple teams. Each team owns its repo, ships at its own pace, and can't break someone else's build by accident. The repo boundary is the team boundary.
I'm not multiple teams. I'm one guy with tea.
And when one person owns all the repos, the boundary stops protecting anything. It only adds friction:
None of these is a disaster on its own. Together, it's a tax you pay on every single change. And when you're solo, you're the only one paying it.
So one day, randomly, I decided to put everything in one repo.
Before going further, let's clear something up, because people mix these two up all the time.
They're two different axes. You can have a monolith split across many repos (please don't), and you can have microservices living in one repo (that's me).
So I didn't merge the apps. The services are still separate services, the frontends are still separate frontends, and each one still deploys on its own. They just share a roof now.
Two tools did the heavy lifting.
Bun workspaces handle the "many packages, one repo" part. Every app and every shared package has its own package.json, and the root one lists them as workspaces. One bun install at the root installs everything, with one lockfile for the whole repo. When an app depends on a shared package, Bun links it locally instead of pulling it from a registry. Change the package, and every app using it sees the change immediately. No publishing, no version bumps, no "did I update the dependency in repo C".
(Yes, Bun. Not pnpm, not npm. I've made my choice and I'm at peace with it.)
Turborepo handles the "run things" part. And this is where a monorepo stops being "a big folder" and starts paying you back:
package.json files.And because I was doing this solo, thanks to Claude too. Not a vibe coder, but senior enough to have an unpaid intern.
Here's the trap I want to warn you about.
The first version of my monorepo was basically copy paste. Every repo's code went into its own folder, same as before, just under one roof. It built. It ran. It was a monorepo in name only.
Because nothing was actually shared. The duplicated helpers were still duplicated. The configs were still 7 slightly different configs. I had moved the mess, not fixed it.
The real benefit only showed up when the copied stuff turned into shared packages:
That's the line between a real monorepo and a folder of folders: is anything actually shared? If not, you've just made one big repo with all the old problems inside it.
The code moved fast. The history didn't.
Copying files into a new repo takes minutes. But if you just copy, you lose every commit. Every "why is this written like this", every blame, every message that explains a weird fix, gone. And with code that started life as AI slop, the history is often the only explanation you've got.
There are roughly three ways people deal with this:
git filter-repo can rewrite every commit of a repo as if its files had always lived in, say, apps/web/. Then you pull each rewritten repo into the monorepo and merge it with --allow-unrelated-histories. It's the most work, but the result is clean: git log and git blame on any file go all the way back, as if it had always been a monorepo.git subtree add. One command per repo, history kept. The catch is that old commits still have the old paths, so blame and log on a file tend to stop at the moment it moved.Getting 7 repos' worth of history into one, without losing who changed what and why, is where most of my 3 days went. Code you can copy. History you have to carry.
"If everything is in one repo, do you deploy everything on every push?"
No. Each app still deploys on its own, and only when it actually changed. The backend goes to AWS with SST. That setup deserves its own post, so I'll leave it there for now. Coming soon.
The bill, end to end: 12 cups of tea, 5 packets of snacks and 3 days.
Was it worth it? Yesssss, till the last breath.
One change is one PR again. One upgrade is one upgrade. And when I break a contract between the frontend and the backend, the compiler tells me before a user does.
If you're a solo dev juggling multiple repos for one product, ask yourself one thing: who is that repo boundary protecting? If the answer is "nobody, it's just me", you already know what to do.
Maybe rewrite parts of it in Rust (why stay behind when the entire tech industry is rewriting everything in Rust), or write some of the services in Go or Rust.
If I do, I'll write about it. The whole story, from the first thought to the final execution to the stats.
That's it. Can't write more without tea, and in Vim.