The Next.js SaaS Boilerplate You'll Actually Ship With
Auth, billing, email, blog, and observability - production-ready from day one. Free forever. No license required. Just clone and build.
How It Works
From Clone to Production in Days
Clone
Fork or clone the GitHub repository. It's free and open source - no paywalls, no license keys.
Configure
Add your environment variables: database URL, Stripe keys, Resend API key, auth secret. Fully documented.
Build
Add your features on a solid foundation. Auth, billing, email, and blog are already solved.
Deploy
Push to Vercel, Fly.io, Railway, or any Node host. Your SaaS goes live.
What's Included
Everything Your SaaS Needs
Production-ready features. Built completely. Tested thoroughly. Ready to extend.
Authentication
Own your authentication stack. Better Auth runs entirely on your infrastructure - user data lives in your PostgreSQL, not third-party servers.
- ✓Email & password authentication
- ✓Google OAuth (social login)
- ✓Email verification flow
- ✓Forgot password & reset
- ✓Session management
- ✓Email change with confirmation
Stripe Billing
The full subscription lifecycle is built and tested. Start collecting payments on day one with zero webhook boilerplate.
- ✓Subscription checkout
- ✓Webhook event processing with idempotency
- ✓Customer portal for self-service
- ✓Plan upgrades & downgrades
- ✓Cancellation handling
- ✓3-day grace period for past-due accounts
Database & ORM
Type-safe queries that let you read and understand every SQL statement. No magic, no surprises.
- ✓Drizzle ORM with full TypeScript types
- ✓Migrations as reviewable SQL files
- ✓Schema in version control
- ✓Multi-table writes in transactions
- ✓Ready to extend for your domain
Transactional Email
React Email templates for every user-facing event. Works with Resend out of the box, console-logs in dev.
- ✓Welcome & email verification
- ✓Password reset & change confirmation
- ✓Subscription & payment events
- ✓3× retry with exponential backoff
- ✓Logs to console in dev - no API key needed
SEO Blog
Write articles in Markdown, drop them in /content/posts, and they're live at /blog. Every page is SEO-optimized out of the box: meta tags, OpenGraph, JSON-LD structured data, and an auto-generated sitemap.
- ✓Markdown & MDX support
- ✓Frontmatter: title, description, date, tags
- ✓Per-post meta tags and OpenGraph
- ✓JSON-LD structured data per post
- ✓Auto-generated XML sitemap
- ✓Reading time estimate
Observability
Know what's happening in production before your users tell you about it.
- ✓PostHog for product analytics & session recording
- ✓Sentry for real-time error tracking
- ✓LogTape structured logging (colored dev, JSON prod)
- ✓Named module loggers per domain
- ✓Health check endpoint at /api/health
Tech Stack
Built with the Modern Stack
Carefully chosen tools that work well together and let you ship with confidence.