#how to share a convex database between multiple repos?
14 messages · Page 1 of 1 (latest)
I believe convex allows you to init a project in another git repo and import it however you dont get all the type benefits of it being local (unless you use git submodules maybe.
i'm thinking about putting the projects ni the same repo and use pnpm workspaces to share the convex code with all the apps
great idea. There's a repo with a turborepo monorepo. Monorepo is my recommendation, so you get the type benefits & autocomplete in both. However if one is python and doesn't use types right now, you can just configure the CONVEX_URL to point to the existing backend
there is an anyAPI type right? That is used for when your convex is not directly in the same project root
actually in the frontend i use rescript so i don't get much of the type safety from convex. But it is really nice to have TS in convex. I just make sure to mirror the types in Rescript and keep it updated.
Rescript is like Typescript but purely functional programming
@odd prism in case you missed it I just published a monorepo template: https://www.convex.dev/templates/monorepo
If you ended up with any best practices you didn't see there for pnpm etc. lmk!
thank you Ian, i'll check it right now