Skip to main content

Build your SaaS faster with Next.js

A production-ready starter template with authentication, Stripe payments, team management, and more. Ship your product in days, not months.

Authentication
Stripe Payments
Team Management
Dashboard UI

Quick Start

Get up and running in minutes with our starter template

1

Clone the repository

Clone the starter template to your local machine:
git clone https://github.com/nextjs/saas-starter
cd saas-starter
pnpm install
2

Set up your database

Create your environment file and configure your database:
pnpm db:setup
pnpm db:migrate
pnpm db:seed
This creates a test user with email [email protected] and password admin123.
3

Configure Stripe

Set up your Stripe keys in the .env file:
STRIPE_SECRET_KEY=sk_test_***
STRIPE_WEBHOOK_SECRET=whsec_***
Use the Stripe CLI to listen for webhooks locally: stripe listen --forward-to localhost:3000/api/stripe/webhook
4

Start developing

Run the development server:
pnpm dev
Open http://localhost:3000 to see your app running.

Core Features

Everything you need to build a production-ready SaaS application

Authentication

Email/password authentication with JWT tokens stored in secure HTTP-only cookies

Team Management

Multi-tenancy with teams, role-based access control, and member invitations

Stripe Integration

Complete billing system with subscriptions, customer portal, and webhooks

Activity Logs

Track user actions and events across your application

Middleware Protection

Global and local middleware for route protection and validation

shadcn/ui Components

Beautiful, accessible UI components built with Radix UI and Tailwind

Ready to get started?

Clone the repository and start building your SaaS application today

View Quickstart Guide

Build docs developers (and LLMs) love