nextsaas.ai Kit is a production-ready Next.js SaaS boilerplate that gives you everything you need to launch your product. Authentication, database, payments, AI integration, email, file storage, security, theming, and testing — all pre-configured and working together out of the box.
The goal is simple: go from purchase to running dev server in under 30 minutes. This documentation guides you through every step, from initial setup to production deployment.
What You Get
Kit ships with nine integrated systems. Each one is pre-configured, tested, and ready to customize for your product.
Authentication
Clerk-powered auth with social logins, MFA, and organizations
Database
Supabase PostgreSQL with Prisma ORM and Row Level Security
Payments
Lemon Squeezy integration with dual pricing: subscriptions or credits
AI Integration
Multi-provider AI with OpenAI, Anthropic, Google, and xAI
Email Service
Transactional emails via Resend with React Email templates
File Storage
Vercel Blob storage with upload components and size limits
Security
Rate limiting, input validation, CORS, CSP, and security headers
Theming
9 color themes with dark mode — switch via a single env variable
Testing
115+ tests with Vitest, Playwright, and MSW API mocking
Tech Stack
Kit is built on a modern, well-supported stack chosen for developer experience and production reliability.
Framework & Language
- Next.js 14.2.7 — App Router with Server Components, Server Actions, and API Routes
- React 18.2.0 — Latest stable with concurrent features
- TypeScript 5.x — Strict mode enabled for maximum type safety
Styling & UI
- Tailwind CSS 3.4.0 — Utility-first CSS with custom theme system
- shadcn/ui — Accessible, customizable component library built on Radix UI
- next-themes — Dark mode with system preference detection
Backend & Data
- Supabase — Managed PostgreSQL with Row Level Security and realtime
- Prisma — Type-safe ORM with migration management and visual studio
- Upstash Redis — Serverless Redis for rate limiting and caching
Authentication & Payments
- Clerk v6 — Authentication with social logins, MFA, organizations, and webhooks
- Lemon Squeezy — Payment processing with dual pricing: subscriptions or credits
AI
- Vercel AI SDK v4.3.x — Unified interface for OpenAI, Anthropic, Google, and xAI
- RAG Support — Document upload, vector search, and knowledge-base chat
- Multi-provider fallback — Automatic failover when a provider is unavailable
Email & Storage
- Resend — Transactional email with React Email templates
- Vercel Blob — File storage with EU compliance support
Testing & Quality
- Vitest — Unit testing with React Testing Library
- Playwright — End-to-end testing with 115+ pre-written tests
- MSW v2 — API mocking for tests and development
Infrastructure
- pnpm — Fast, disk-efficient package manager
- Vercel — Deployment with preview environments, analytics, and speed insights
- GitHub Actions — CI/CD with automated quality gates
Branding at a Glance
All branding — app name, tagline, SEO metadata — is controlled from a single configuration file. Edit it once and the changes cascade across page titles, Open Graph cards, email templates, and footer text:
src/config/site.ts
export const siteConfig = {
/** Your brand/product name */
name: 'nextsaas.ai Kit',
/** Short description for the homepage title tag */
tagline: 'AI-Native Next.js SaaS Boilerplate',
/** Name used for blog article title tags */
blogName: 'nextsaas.ai Blog',
/** Separator between page name and brand (En-dash is professional standard) */
separator: '–',
/** Base URL for metadata */
url: process.env.NEXT_PUBLIC_APP_URL || 'http://localhost:3000',
/** Default description for pages without custom description */
description:
'Production-ready Next.js boilerplate with authentication, database, and modern UI components.',
/** Author information */
author: {
name: 'Jon Doe',
twitter: '@jondoe',
},
} as const
export type SiteConfig = typeof siteConfig
See the Configuration page for details on customizing branding and other app-wide settings.
How This Documentation Is Organized
The Kit documentation follows the path you will take as a developer: set up your project, configure features, customize the experience, prepare for launch, and look up references.
Setup — Get a working development environment
- Getting Started — Install the project, explore the structure, and configure your environment
Features — Configure each integrated system
- Authentication — Set up Clerk, protect routes, manage users and organizations
- Database — Understand the schema, run migrations, configure Row Level Security
- Payments — Configure Lemon Squeezy, set up pricing plans, handle webhooks
- AI Integration — Connect AI providers, build chat interfaces, set up RAG
- Integrations — Configure email (Resend), file storage (Vercel Blob), and caching (Upstash)
Customize — Make it yours
- Styling & Theming — Choose a color theme, customize components, adjust the design
- Security — Review rate limiting, input validation, security headers, and API keys
Ship — Go to production
- Testing — Write unit tests, run E2E tests, mock APIs with MSW
- Deployment — Deploy to Vercel, set up CI/CD, run through the production checklist
Reference — Look things up
- Reference — API routes, environment variables, FAQ, and changelog
If you are setting up Kit for the first time, follow the sections in order. Each section builds on the previous one, starting with installation and ending with deployment.
Prerequisites
Before you begin, make sure you have the following installed on your development machine:
| Tool | Version | Purpose |
|---|---|---|
| Node.js | v20.x (LTS) | JavaScript runtime |
| pnpm | v9.x | Package manager |
| Git | Latest | Version control |
| Docker | Latest (optional) | Local PostgreSQL database |
Install Node.js from nodejs.org or via nvm. Then install pnpm:
bash
npm install -g pnpm
Docker is optional. You only need it if you want to run PostgreSQL locally instead of using a hosted Supabase database. See the Installation guide for both options.
You do not need accounts for Clerk, Lemon Squeezy, Resend, or any other external service to start developing. Kit works without them in development mode using mock data and a no-auth fallback.