Quick Start
Go from your license key to a running app - create the project, fill in .env, start the dev stack, then build your SaaS with an AI agent.
GenerateSaaS is a pnpm + Turborepo monorepo: the Next.js frontend (apps/web) mounts the Hono backend (@repo/api) at /api, and one pnpm dev runs both. You need Node >=22.18; pnpm is installed for you if missing.
Run it
Create your project
npx generatesaas@latest init <your-license-key>Use the key from your purchase. init walks you through your stack choices, then installs dependencies and writes a ready-to-run .env - no separate setup step.
Fill in your environment
Open the generated .env and set every value marked # TODO - the credentials for the providers you chose at init. DATABASE_URL must be set before the dev server starts (already filled in if you chose the local Postgres default). Regenerate the auth secret any time with openssl rand -hex 32.
Start the dev stack
cd <your-project>
pnpm infra # only if you chose Docker-backed services
pnpm dev # http://localhost:3000Turborepo runs the Next.js app and the mounted @repo/api backend together. pnpm infra starts the local Postgres, Redis, Mailpit, and Inngest containers; with all-hosted providers there is no infra/ directory and you can skip it.
Build your SaaS
Open the project in your AI coding agent - Claude Code, Cursor, or whatever you use - and describe what you want. The generated AGENTS.md and the docs/ folder ship as context, so your agent builds on the boilerplate instead of reinventing it.
Local ports
| Service | URL | When |
|---|---|---|
Next.js app (apps/web) | http://localhost:3000 | Always |
Backend (@repo/api, mounted at /api) | http://localhost:3000/api | Always |
| Inngest dev UI (background jobs) | http://127.0.0.1:8288 | Always |
| Mailpit web inbox (captured email) | http://localhost:8025 | smtp email provider |
| Mailpit SMTP | localhost:1025 | smtp email provider |
| Postgres | localhost:5432 | Self-hosted database |
| Redis | localhost:6379 | Self-hosted cache |
The frontend reads PORT (Next.js's own convention), defaulting to 3000. The backend lives at the path in NEXT_PUBLIC_API_URL; for a standalone backend point it at port 3010 instead (apps/backend listens on API_PORT) - see Deployment.
The Inngest dev server (UI at http://127.0.0.1:8288, matching INNGEST_BASE_URL) must be running or queued jobs never execute. pnpm dev:inngest always starts it; if infra/ ships, pnpm infra runs it as a container instead. See Background jobs.
Email in development
config.email.provider is whatever you picked at init. With smtp it targets Mailpit once SMTP_HOST=localhost and SMTP_PORT=1025 are set in .env; every outgoing message lands in the inbox at http://localhost:8025. With ses or resend, set that provider's credentials instead - see Email.
Next steps
Tech Stack
Every layer of the stack - Next.js 16, Hono RPC, Better Auth, Drizzle with Postgres, Inngest, and Redis - and the package each one lives in.
Configuration
Control branding, routes, and every flag-gated feature from the one shared @repo/config object, plus the per-app files that own navigation and banners.