Introduction
Next Starter is a Next.js 16 SaaS boilerplate with Better Auth, Stripe billing, Prisma and PostgreSQL, file storage, email, and an admin dashboard.
What is Next Starter?
Next Starter is a SaaS boilerplate for Next.js. The parts every SaaS app needs are already built and wired together: sign-in, billing, database, email, file storage, and an admin dashboard. You start with a working app and add your own features on top.
You own all the code. These docs explain how each part works, what you can change, and which files to edit.
Tech stack
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router, Turbopack, React Compiler) |
| Language | TypeScript 6 (strict) |
| UI | React 19, Tailwind CSS v4, shadcn/ui (Radix) |
| Authentication | Better Auth (email/password, Google sign-in, email verification) |
| Billing | Stripe, via the Better Auth Stripe plugin |
| Database | PostgreSQL with Prisma 7 |
| React Email templates, sent over SMTP2Go | |
| File storage | Cloudflare R2 (S3-compatible) |
| Bot protection | Cloudflare Turnstile |
| Logging | Pino |
What's included
Authentication. Sign up, sign in, email verification, password reset, and Google sign-in, all through Better Auth. Sessions live in the database and use cookies. Users get a user or admin role, and routes are protected by role. See Authentication.
Billing. Stripe subscriptions with plan tiers and monthly or annual pricing. Includes a billing dashboard, the Stripe customer portal, and webhook handling. It runs through Better Auth, so you can read a user's subscription on both the server and the client. See Billing.
Admin dashboard. A protected area where users manage their profile and settings. Admins also get user management and a file browser for Cloudflare R2 (an S3-compatible file store). See Admin Dashboard and File Uploads.
Email. Ready-made emails for verification, password reset, welcome, contact replies, and subscription notices. They are built with React Email and sent through SMTP2Go. See Email.
Marketing pages. A landing page (hero, bento grid, features, FAQ) plus pricing, about, contact, and legal pages. Drop in your own copy.
Security. Security headers (CSP and HSTS), CSRF protection via Better Auth, Cloudflare Turnstile on the contact form to block bots, Zod validation on every input, and a check that your environment variables are set at startup. See Security and Turnstile.
Developer experience. React Compiler, Biome for linting and formatting, Husky pre-commit hooks, Playwright end-to-end tests, Pino logging, and a Docker build for self-hosting.
Find your way around
Get Started
Clone the repo, set your environment variables, and start the dev server.
Project Structure
A map of the folders and where each part of the app lives.
Tutorials
Step-by-step guides for building your first features.
Authentication
Better Auth, sessions, roles, and Google sign-in.
Billing
Stripe subscriptions, webhooks, and the billing dashboard.
Deployment
Go live on Vercel or with Docker.