Introduction

Welcome to the SaaS Template documentation.

What is SaaS Template?

SaaS Template is a production-ready Next.js 16 starter for subscription-based products. It provides a complete foundation so you can focus on your core feature instead of building infrastructure.

What's included

| Feature | Technology | |---------|-----------| | Framework | Next.js 16 App Router | | Language | TypeScript strict | | Styling | Tailwind CSS v4 | | Database | Drizzle ORM + PostgreSQL | | Authentication | NextAuth v5 (Auth.js) | | Payments | Stripe | | Email | Brevo + React Email | | Monitoring | Sentry + PostHog |

Project structure

src/
  app/
    (auth)/       — Login, register, forgot/reset password
    (dashboard)/  — Protected app routes
    (marketing)/  — Public marketing site
    api/          — API routes
  components/
    auth/         — Auth form components
    billing/      — Stripe checkout & portal
    dashboard/    — Sidebar, banners, user menu
    marketing/    — Landing page sections
    emails/       — React Email templates
  lib/
    auth/         — NextAuth config
    db/           — Drizzle client, schema, queries
    email/        — Brevo client
    stripe/       — Stripe client, handlers, config
  content/
    blog/         — MDX blog posts
    docs/         — MDX documentation

Getting started

See the Getting Started blog post for a step-by-step setup guide.