SaaS
Getting Started

Installation

Get the Next.js SaaS Starter running on your machine in under 2 minutes.

Prerequisites

1. Clone the repository

git clone https://github.com/mailkite/saas-startup
cd saas-startup

2. Install dependencies

pnpm install

3. Configure environment

cp .env.example .env

Open .env and fill in:

  • AUTH_SECRET — generate with openssl rand -base64 32
  • POSTGRES_URL — your PostgreSQL connection string
  • STRIPE_SECRET_KEY — from your Stripe dashboard (test mode)
  • STRIPE_WEBHOOK_SECRET — from Stripe webhooks page
MailKite Auth

Auth is powered by MailKite — create a free account at mailkite.dev. The API URL defaults to https://api.mailkite.dev. No separate auth provider needed.

4. Run database migrations

cd apps/web
npx drizzle-kit migrate

5. Start the dev server

pnpm run dev

Visit http://localhost:3000


What's included

Your app now has:

  • Landing page with animated background, gradient cards, and theme toggle
  • Auth pages — sign-in, sign-up with email/password and OAuth
  • Pricing page with Stripe integration
  • Dashboard with team management and security settings
  • Dark/light mode with configurable theme colors

Ready to customize? Head to Configuration →

Next.js SaaS Starter — Launch your SaaS