Put every app in the Rails repo
For most of my career, every app got its own repo. The Rails app was one repo. If there was an iOS app, that was another. Android was another. Even a CLI usually got its own.
Lately I've stopped doing that. I start with the Rails app for the server, and when it's time to add something else, like a mobile app or a Chrome extension, it goes in the same repo as a subdirectory.
Why I like it
The main reason is AI. When I make a change in the Rails app, Claude is looking at every product the company has, not just the server. If I rename a field in an API response, it sees the iOS screen that reads that field, the Android screen, the extension, the CLI. It checks how the change affects all of them, and often fixes them in the same pull request.
You could already do this with separate repos. Open Claude in a parent directory and tell it to look in every subdirectory that has an app. But there's overhead to that:
- You have to remember to do it. Every time, for every change.
- You have to know the change matters. Some changes don't look like they touch the other apps. Those are the ones where you don't think to open the parent directory, and they're the ones that break something.
With one repo, there's nothing to remember. The other apps are just there, every session, whether I thought about them or not.
It also helps when the apps share a contract. I wrote recently about agreeing on the API before building the apps. When the spec, the server and every client are in one repo, the spec sits next to everything that depends on it, and one pull request can change all of them together.
The downsides
There are a couple of real reasons to keep separate repos:
- Open source. If you want the CLI to be public and the server private, the CLI still needs its own repo.
- Access control. On a large team, you might want some people to have access to only one app. GitHub gives access per repo, so if everything is in one repo, everyone with access sees all of it.
Neither applies to most of what I build. My projects are small teams, and the apps are pieces of one product, not separate products.
What I'll do going forward
New projects start as a Rails app. When they need a mobile app, an extension or a CLI, it gets a folder in that repo, not a new repo. One project, one repo, and every change gets looked at against everything it could affect.
Liked this? Get the next note by email.
about one a week · no spam · one-click out · or rss