Cam
Cam12mo ago

monorepo vs multi repo's

Hello, I've spent a couple of hours trying to get https://github.com/get-convex/turbo-expo-nextjs-clerk-convex-monorepo working. Side note, there appear to be some dependancy version conflicts and general shenanigans getting things running. Looking at some other posts, turbo repo seems to be a tool suggested for this. However, while this might work for me with react, react native and convex itself, I also have some python aspects to my project. So instead of getting tangled with yarn/pnpm workspaces, I am considering completely isolated directories/repo's. Is there any conceivable problem with just having multiple repos, each with it's own copy of convex directory? I would think that the reactor syncing would simply replicate between each running 'npx convex dev' and then I just commit those files in each repo. Any recommendations?
GitHub
GitHub - get-convex/turbo-expo-nextjs-clerk-convex-monorepo: Monore...
Monorepo template with Turborepo, Next.js, Expo, Clerk, Convex - get-convex/turbo-expo-nextjs-clerk-convex-monorepo
4 Replies
erquhart
erquhart12mo ago
The monorepo advantage is real. I'd also add that your python code doesn't need to participate in the workspaces structure, you can just keep it in it's own directory and let npm ignore it. If you're thinking of splitting your Convex code between repos, be aware that every run of npx convex dev replaces the existing dev deployment. You need to have all of your convex code in a single convex directory. I'd also recommend taking a look at react-native-web. My own react native project hasn't yet hit the point where I'm looking at building for the web yet, but 100% intend to use that and be bound by whatever limitations it brings. Building from a single codebase is a worthwhile goal. This approach would also solve your current problem, as you wouldn't need a monorepo at all.
Cam
CamOP12mo ago
That's an interesting idea. I had heard that expo web wasn't ready for the big time, but indeed avoiding another code base is probably a worthwhile trade off with the existing limitations. Ok, I'll go with an expo react native project, and throw the python stuff into a sub directory and call it good. Thanks for the suggestion @erquhart !
erquhart
erquhart12mo ago
Twitter/X and Meta are understood to be using it in production, as well as Flipkart (this is what they say in the docs anyway). I do wish it wasn't maintained by a single engineer, but it's had steady releases every month or so for a few years now: https://www.npmjs.com/package/react-native-web?activeTab=versions I'm pretty comfortable writing code for the web, so I suspect for any react native compatibility issues I can just write web specific code in a separate file, as you do with ios/android specific code.
jamwt
jamwt8mo ago
update: we now have a good solution for folks who don't want to use a monorepo https://discord.com/channels/1019350475847499849/1019372556693815418/1278869945513545849

Did you find this page helpful?