AliA
Convex Community6mo ago
1 reply
Ali

Monorepo with multiple Next.js apps

Hey guys, I have a monorepo (turborepo) with two nextjs apps like this (both consuming content from convex) :
apps/
├── landing/       # Next.js Landing page application
├── dashboard/     # Next.js Dashboard application

packages/
└── backend/convex  # Convex backend with database schema and functions


I originally had just the landing app I was deploying everything to vercel with this command : cd ../../packages/backend && bun convex deploy --cmd 'cd ../../apps/landing && turbo run build' --cmd-url-env-var-name NEXT_PUBLIC_CONVEX_URL.

Now how should I do this for each app ? Also I create a script to seed some data on the database that I always need (wheter is dev,preview or prod) (it checks if it exists and if not adds it), I do it in dev now like this "dev": "convex dev --run seed:seed", how should I do this in production ?

Also I am planning to deploy my apps under domain names myapp.com (for the landing) and dashboard.myapp.com (for the dashboard) is there any extra configuration needed ?

Sorry for the very long message, and thank's in advance to anyone who can provide some help or advice.

Best regards, Ali
Was this page helpful?