Goal: Generate convex-product and run the Convex + Next.js development loop.
Preset: convex-product — Next.js + Convex functions, schema samples, Better Auth integration stubs. No Express, no Prisma in this shape.
Scaffold
bun run dev:cli -- my-convex-app --yes --preset=convex-product --dir=../projects
Layout
See Convex architecture for the request path. Typical tree:
apps/web/
convex/ functions, schema, http routes
app/ Next.js routesAfter scaffold
cd ../projects/my-convex-app
bun install
cd apps/web
npx convex devIn another terminal, run the web app per generated AGENTS.md (usually bun dev from the app or monorepo root).
Auth note
Better Auth stubs point at Convex HTTP routes. Finish provider keys in .env before claiming production auth is done. Deep integration notes live in the template repo docs/convex-integration.md.
Verify
Run the preset’s documented ci or lint scripts from generated package.json. Convex presets record partial verification columns—treat green CI in your environment as the bar.
Common failures
| Symptom | Fix |
|---|---|
| Convex CLI not found | bun add convex in apps/web or use bunx convex dev |
| Schema push errors | Check convex/schema.ts and deployment selection |
| Auth redirect mismatch | Align SITE_URL / Better Auth URLs with dev ports |