Monorepo template with Turborepo, Next.js, Expo, Clerk, Convex
Monorepo template with Turborepo, Next.js, Expo, Clerk, Convex
This repo is a modern TypeScript monorepo for a shared notes app across web and native.
It currently uses:
apps/web - the Next.js web appapps/native - the Expo native apppackages/backend - the Convex backend and generated API typespnpm installRun the backend setup command:
pnpm --filter @packages/backend setupThis will log you into Convex, create or connect a project, and generate packages/backend/.env.local.
Follow the official Convex + Clerk guide.
In the Clerk dashboard, enable the Convex integration and copy the Clerk JWT issuer domain. Add it to your Convex environment variables as:
CLERK_JWT_ISSUER_DOMAIN=https://your-frontend-api.clerk.accounts.devIf you want native social login, enable Google and Apple in Clerk as well.
If you want AI summaries, also add:
OPENAI_API_KEY=...to your Convex environment variables.
Create .env.local files in apps/web and apps/native from the provided .example.env files.
CONVEX_URL from packages/backend/.env.local for both NEXT_PUBLIC_CONVEX_URL and EXPO_PUBLIC_CONVEX_URLapps/web/.env.localpnpm devThis runs the backend, web app, and native app through Turbo.
From apps/web, use Convex to deploy the backend and build the web app:
cd ../../packages/backend && pnpm exec convex deploy --cmd 'cd ../../apps/web && pnpm build' --cmd-url-env-var-name NEXT_PUBLIC_CONVEX_URLapps/web/vercel.json is already set up for this flow on Vercel.
Install dependencies in the package that actually uses them.
Examples:
pnpm --filter web-app add mypackage@latest
pnpm --filter native-app add mypackage@latest
pnpm --filter @packages/backend add mypackage@latestapps/native/src/appapps/web/src/proxy.tspackages/backend/convex/notes.tsNo open issues yet, or sync has not completed.