A monorepo template for bootstrapping greenfield projects.
- Monorepo: Turborepo + pnpm workspaces
- Web & Admin: Next.js 16 (App Router), React 19, Tailwind CSS v4
- Mobile: Expo (SDK 55), React Native, NativeWind
- Backend & Database: Convex
- Authentication: Convex Auth
- Email: Resend + React Email
- Language: TypeScript everywhere, end-to-end type safety
├── apps/
│ ├── web/ # Next.js web app
│ ├── admin/ # Next.js admin panel
│ └── native/ # Expo React Native app
├── packages/
│ ├── backend/ # Convex backend (schema, functions, auth)
│ ├── shared/ # Shared constants (app name, slug, etc.)
│ └── transactional/ # React Email templates
├── scripts/ # Utility scripts (deploy preview, etc.)
├── turbo.json # Turborepo task configuration
└── pnpm-workspace.yaml # Workspace definition
Create a new GitHub repository from this template, then clone it and navigate into it:
git clone <your-new-repo-url>
cd <your-new-repo>pnpm installcd packages/backend
npx convex devYou will be prompted to create a new Convex project or link an existing one. Once connected, the Convex dev server will start and generate a .env.local file in packages/backend/ containing your CONVEX_URL.
Create a .env.local file in each app directory (apps/web, apps/admin, apps/native) with the same Convex URL from packages/backend/.env.local, but prefixed for each platform:
apps/web/.env.local and apps/admin/.env.local:
NEXT_PUBLIC_CONVEX_URL=<your-convex-url>apps/native/.env.local:
EXPO_PUBLIC_CONVEX_URL=<your-convex-url>Convex Auth requires a Resend API key and a JWT key pair.
Go to your Resend account and create a new API key.
In the Convex dashboard, go to your Development deployment's environment variables and add:
AUTH_RESEND_KEY=<your-resend-api-key>cd packages/backend
node generateKeys.mjsThis will output two environment variables: JWT_PRIVATE_KEY and JWKS. Copy both and add them as environment variables in your Convex Development deployment.
Add one more environment variable in the Convex dashboard:
SITE_URL=http://localhost:3000You should now have four environment variables in your Convex Development deployment:
| Variable | Source |
|---|---|
AUTH_RESEND_KEY |
Resend dashboard |
JWT_PRIVATE_KEY |
Output of generateKeys.mjs |
JWKS |
Output of generateKeys.mjs |
SITE_URL |
http://localhost:3000 |
At this point, the web and admin apps are ready to go.
cd apps/native
eas initWhen asked if you want to create a new project, select yes. The CLI won't be able to automatically write to app.config.ts, so you'll need to manually paste the output (project ID / slug) into apps/native/app.config.ts yourself.
eas update:configureAgain, manually paste the output into apps/native/app.config.ts.
Create a development build with EAS and you're good to go:
eas build --profile development --platform <ios|android>From the root of the monorepo:
pnpm devThis starts the Convex backend, web app, admin panel, and native dev server via Turborepo. Use the arrow keys to switch between logs for each process.
These steps wire up the AI agent skills bundled with this template (requires Claude Code).
CLAUDE.md already contains the default verify command and Convex prerequisite for this stack. If you've customized your scripts, update the ## Verify section accordingly.
Open Claude Code in the project root and run:
/setup-matt-pocock-skills
This connects the agent skills to your GitHub repository and configures the issue tracker and triage label vocabulary. One-time per project.
After this, the following skills are ready to use:
| Skill | What it does |
|---|---|
/to-issues |
Break a plan or PRD into GitHub issues |
/triage |
Move issues through the triage state machine |
/work-next-agent-issue |
Implement a single AFK issue autonomously |
/work-all-agent-issues |
Drain the full backlog overnight |
To set up preview deployments, you need a Convex preview deploy key:
- Go to your project's settings in the Convex dashboard
- Create a preview deploy key
- Create a file
packages/backend/.env.previewand add the key:
CONVEX_DEPLOY_KEY=<your-preview-deploy-key>You can then run pnpm deploy:preview from the root to trigger a preview deployment.
| Command | Description |
|---|---|
pnpm dev |
Start all apps and backend in dev mode |
pnpm build |
Build all apps |
pnpm lint |
Lint all packages |
pnpm typecheck |
Type-check all packages |
pnpm clean |
Clean build artifacts and node_modules |
pnpm format |
Format code with Prettier |
pnpm deploy:preview |
Deploy a preview build |