Next.js app with Clerk authentication and Convex as the backend. It also includes an Inngest endpoint and optional integrations for Google/Anthropic (AI SDK), Firecrawl, and Sentry.
- Node.js: 20+ recommended
- npm: this repo includes a
package-lock.json(usenpm ci) - Accounts/API keys (depending on what you use):
- Convex (required)
- Clerk (required)
- Google Generative AI (required for
/api/suggestionand the Inngest demo) - Firecrawl (optional, only needed if you run URL scraping in the Inngest demo)
- Sentry (optional, only needed for source map upload in CI/builds)
Install dependencies:
npm ciCreate your env file:
cp .env.example .env.localThen fill in .env.local.
These are the env vars used by this repo:
-
Required (app won’t run)
NEXT_PUBLIC_CONVEX_URL: Convex HTTP URL (the app throws on startup if missing)CONVEX_DEPLOYMENT: Convex deployment identifier (used by the Convex CLI)NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: Clerk publishable keyCLERK_SECRET_KEY: Clerk secret keyCLERK_JWT_ISSUER_DOMAIN: Clerk JWT issuer domain used by Convex auth config (convex/auth.config.ts)
-
Required for AI features
GOOGLE_GENERATIVE_AI_API_KEY: required for/api/suggestionand the Inngest demo (usesgoogle("gemini-2.5-flash"))ANTHROPIC_API_KEY: optional unless you wire features to Anthropic
-
Optional
FIRECRAWL_API_KEY: only needed if you use the Inngest demo’s URL scrapingSENTRY_AUTH_TOKEN: only needed for uploading sourcemaps (build/CI); runtime DSN is configured insentry.*.config.ts
This project uses Convex, so you typically run two dev processes:
Terminal A (Convex):
npx convex devTerminal B (Next.js):
npm run devThen open http://localhost:3000.
The Inngest handler is exposed at /api/inngest. If you want to run Inngest locally, start the dev server and point it at your local endpoint:
npx inngest-cli@latest dev -u http://localhost:3000/api/inngestnpm run dev # start Next.js dev server
npm run build # production build
npm run start # run production server
npm run lint # eslint- Missing
NEXT_PUBLIC_CONVEX_URL: the app throws at startup. Make sure.env.localexists and contains a valid Convex URL. - Clerk + Convex auth issues: confirm
CLERK_JWT_ISSUER_DOMAINmatches your Clerk instance domain and that Clerk keys are set correctly. - AI requests failing: ensure
GOOGLE_GENERATIVE_AI_API_KEYis set; the AI SDK provider will error if the key is missing/invalid.