saas-scaffold Documentation

Learn how to get up and running with saas-scaffold through guides, setup checklists, and platform resources.

Getting Started
Set up and launch a SaaS in minutes.
Next.js
Shadcnui Logo
Polar Logo

How it works

Start with an empty folder, run the CLI, select your packages, and get a complete SaaS app with a landing page and all your selected features.

1
Start with an empty folder

Create a new directory or navigate to where you want your project.

$ mkdir my-saas && cd my-saas
$ # or cd into existing empty folder
2
Run the CLI and select your packages

The CLI prompts you to choose authentication (Better Auth, Supabase, NextAuth), database (Neon, Supabase, MongoDB), payments (Stripe, Polar, Lemon Squeezy), and more.

$ npx saas-scaffold init my-app
$ # Select: Auth → Better Auth
$ # Select: Database → Neon Postgres
$ # Select: Payments → Polar
3
CLI generates your project

The CLI creates a complete Next.js app with a landing page, dashboard, authentication flows, billing pages, and all the code for your selected packages.

✓ Template files copied
✓ Dependencies installed
✓ Git repository initialized
$ # Your project is ready!
4
Configure environment variables

Copy .env.example to .env.local and add your provider keys (auth secrets, database URLs, API tokens).

$ cp .env.example .env.local
$ # Edit .env.local with your keys
$ # DATABASE_URL, BETTER_AUTH_SECRET, etc.
5
Run the dev server

Start your app and visit the landing page. Sign up, access the dashboard, and test your selected features.

$ npm run dev
$ # Open http://localhost:3000
$ # Landing page → Sign up → Dashboard
Authentication

Choose how users sign in (magic links, Google OAuth) and how sessions are stored.

Payments

Create checkout sessions, handle webhooks, and update subscription state.

Emails

Send transactional email and set up DNS (DKIM/DMARC/SPF) to avoid spam folders.

Database

Pick your persistence layer and get schemas/tables plus starter queries.

SEO

Ship a blog + metadata defaults that help you rank and share.

Style

A polished UI starter with components, themes, and dark mode.