Documentation

Fast setupRepo-accurate

Quick start for getting the starter running with the right defaults.

This guide gets you from fresh clone to a working local environment with the database bootstrapped, authentication configured at the platform level, and the product ready for service integrations.

Outcome
By the end of this guide you will have the app running locally, Prisma synced to PostgreSQL, starter data seeded, and the core environment variables in place.

Install

Clone the repository and install dependencies with the existing npm workflow.

Bootstrap

Generate Prisma client, push the schema, and seed roles, plans, and starter content.

Connect

Add OAuth, Stripe, email, and OpenRouter credentials once the local app is healthy.

Setup flow

1

Clone the repository and install dependencies

Start with a normal npm install in a clean working directory.

Terminalbash
git clone <your-repository-url> saaskit
cd saaskit
npm install
2

Copy the environment file and add the core variables

For the first boot, focus on the base app configuration and one working email provider.

.envbash
# Core application
DATABASE_URL="postgresql://user:password@localhost:5432/saaskit?schema=public"
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="replace-with-a-strong-secret"
NEXT_PUBLIC_APP_URL="http://localhost:3000"
APP_NAME="AI SaaS"

# Email: preferred production option
RESEND_API_KEY="re_..."

# Or use SMTP instead
SMTP_HOST="smtp.gmail.com"
SMTP_PORT="587"
SMTP_SECURE="false"
SMTP_USER="you@example.com"
SMTP_PASS="app-password"
SMTP_FROM="AI SaaS <you@example.com>"
ADMIN_EMAIL="ops@example.com"
Keep the first pass minimal
You can add OAuth, Stripe, and OpenRouter after the app is running. The full variable map lives in the installation guide and in .env.example.
3

Generate Prisma client and bootstrap the database

The current repository uses schema push plus seed for initial setup.

Terminalbash
1
2
3
npm run prisma:generate
npm run db:push
npm run db:seed
Current repo behavior
This starter includes prisma/schema.prisma and prisma/seed.ts, but it does not currently ship checked-in Prisma migrations. Use db:push for the initial bootstrap.
4

Run the product locally

Once the database is ready, start the development server and verify the shell loads cleanly.

Terminalbash
npm run dev
Expected result
Open http://localhost:3000. You should be able to browse the marketing pages, docs, pricing, and auth screens without database or session errors.
5

Add service credentials for the full product flow

After the app is stable locally, add the remaining integrations in this order.

Additional integrationsbash
# OAuth
GOOGLE_CLIENT_ID="..."
GOOGLE_CLIENT_SECRET="..."
GITHUB_ID="..."
GITHUB_SECRET="..."

# Stripe
STRIPE_SECRET_KEY="sk_test_..."
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
STRIPE_PRO_MONTHLY_PRICE_ID="price_..."
STRIPE_PRO_YEARLY_PRICE_ID="price_..."
STRIPE_BUSINESS_MONTHLY_PRICE_ID="price_..."
STRIPE_BUSINESS_YEARLY_PRICE_ID="price_..."

# AI
OPENROUTER_API_KEY="sk-or-v1-..."
OPENROUTER_BASE_URL="https://openrouter.ai/api/v1"

What to verify before moving on

The home page and docs shell render without runtime errors.

Registration or sign-in pages load and session cookies are created correctly.

The database contains seeded roles, permissions, and plans.

Email delivery is configured well enough to support verification and admin notifications.

Continue with the right next guide

Ready for production-facing setup?

Once local development is stable, move into installation for the full env map, then deployment for production domains, callbacks, and Stripe webhook configuration.