Adding a Next app as a monorepo
Hi, I have an Expo app with its Convex backend. I would like to add a Next app consuming the same backend. I couldn't find a guide to build a monorepo from an existing project. Is there any documentation or guide?
4 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
not a guide, but here's an example:
https://github.com/get-convex/turbo-expo-nextjs-clerk-convex-monorepo
(this uses turbo, you don't need to use it if you don't want to)
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
i recently also had to add a next app and convert my expo app to a monorepo, you just have to:
1. create a monorepo (you can use npm's builtin workspaces, pnpm's, yarn's or bun's)
2. create a package for your convex code
3. put the convex code in a directory inside that package called convex (so you can run
convex dev, convex deploy, etc. from it. it wont work if you put it in a src directory by default)
4. add your convex package as a dependency in your expo and next app
(this is for a bun workspace. probably works for other package managers/tools)
(where @myapp/convex is the package name of the convex package)
5. update importsAwesome, never done 2 and 3, but will try! Thanks for your reply.