GenerateSaaS

Quick Start

From your license key to a running app you can build your SaaS on with AI.

This is the whole path: create your project, run it, then ask your AI agent to build your SaaS on top of it. GenerateSaaS is a pnpm + Turborepo monorepo - the Next.js frontend (apps/web-next) mounts the Hono backend (@repo/api) at /api, and one pnpm dev runs both. You need Node >=22 (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 for you - no separate setup. Already generated your project? Skip to the next step.

Fill in your environment

Open the generated .env and set the values marked # TODO - the credentials for the providers you chose at init. Your database connection must be set before the dev server starts: DATABASE_URL for a self-hosted Postgres (already filled in if you chose the local default), or your managed-database credentials. Regenerate the auth secret any time with openssl rand -hex 32.

Start the dev stack

cd <your-project>
pnpm dev        # http://localhost:3000

Turborepo runs the Next.js app and the mounted @repo/api backend together. Open http://localhost:3000.

If you chose Docker-backed services at init (self-hosted Postgres, Redis, Mailpit, or Inngest), start them first with pnpm infra; with all-hosted providers there is no infra/ directory and you can skip it.

Build your SaaS

Open the project in your favourite AI coding agent - Claude Code, Cursor, or whatever you use - and ask it to build what you want. The generated AGENTS.md and the docs/ folder ship as context, so your agent understands the architecture, config, and features and builds on the boilerplate instead of reinventing it. That is the point: start from a complete SaaS foundation and describe the product you are building.

Local ports

After pnpm dev (plus pnpm infra for the Docker rows), these endpoints are live:

ServiceURLWhen
Next.js app (apps/web-next)http://localhost:3000Always
Backend (@repo/api, mounted at /api)http://localhost:3000/apiAlways
Inngest dev UI (background jobs)http://127.0.0.1:8288Always
Mailpit web inbox (captured email)http://localhost:8025smtp email provider
Mailpit SMTPlocalhost:1025smtp email provider
Postgreslocalhost:5432Self-hosted database
Redislocalhost:6379Self-hosted cache

The frontend port resolves as WEB_PORTPORT3000. The backend lives at the path in NEXT_PUBLIC_API_URL; for a standalone backend instead, point it at port 3010 (apps/backend listens on API_PORT, default 3010) - 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 you set SMTP_HOST=localhost and SMTP_PORT=1025 in .env; Mailpit captures every outgoing message - SMTP on 1025, web inbox on http://localhost:8025. With ses or resend set that provider's credentials instead. See Email.

Next steps

On this page