Introduction to the Next.js Supabase SaaS Starter Kit

A production-ready Next.js 16 and Supabase SaaS starter kit with authentication, billing, teams, and admin dashboard built on React 19 and Tailwind CSS 4.

The Next.js Supabase SaaS Kit (Makerkit) is a production-ready starter for building multi-tenant SaaS applications with Next.js and Supabase. It ships with authentication (email, OAuth, and MFA), team accounts with role-based permissions, subscription billing, and a super-admin dashboard out of the box — with tenant data protected at the database level by Postgres Row Level Security.

Built on Next.js 16, React 19, Supabase, and Tailwind CSS 4, this Turborepo monorepo gives you a solid foundation to launch faster without sacrificing code quality or flexibility.

New to MakerKit? See the Next.js Supabase SaaS starter kit overview for features and pricing, or try the free open source version first.

Quickstart

You need Node.js 20.10+, pnpm, and Docker running. From repository access to a running app:

git clone <your-repository-url> makerkit
cd makerkit
pnpm install
pnpm run supabase:web:start # starts local Supabase (requires Docker)
pnpm dev # app runs at http://localhost:3000

The clone repository and running the project guides cover each step in detail, including environment variables and local email testing.

What You Get

Authentication and Security

  • Email/password and OAuth sign-in (Google, GitHub, etc.)
  • Magic link authentication
  • Multi-factor authentication (TOTP)
  • Password reset and email verification
  • Session management with Supabase Auth

Multi-Tenant Account System

  • Personal accounts: Every user has a personal workspace
  • Team accounts: Create organizations with multiple members
  • Role-based access: Owner, Admin, Member roles with customizable permissions
  • Invitations: Invite users via email with role assignment
  • RLS enforcement: Row Level Security policies protect data at the database level

Subscription Billing

  • Stripe and Lemon Squeezy integrations
  • Subscription models: flat-rate, tiered, per-seat pricing
  • Customer portal for self-service management
  • Webhook handling for subscription lifecycle events
  • Support for both personal and team billing

Admin Dashboard

  • User management (view, impersonate, ban)
  • Subscription overview and management
  • Analytics and metrics dashboard
  • Super admin role with MFA requirement

Developer Experience

  • Turborepo monorepo with shared packages
  • TypeScript throughout with strict mode
  • Shadcn UI components (Base UI-based)
  • React Query for client-side data fetching
  • Zod for runtime validation
  • next-intl for i18n with locale-prefixed URL routing
  • Keystatic or WordPress CMS integration
  • Sentry and Baselime monitoring support
  • Pre-configured LLM rules for Cursor, Claude Code, and Windsurf

Monorepo Architecture

The kit separates concerns into reusable packages:

apps/
web/ # Main Next.js application
e2e/ # Playwright end-to-end tests
packages/
features/ # Feature modules (auth, accounts, admin, etc.)
ui/ # Shared UI components (@kit/ui)
supabase/ # Supabase client and types (@kit/supabase)
billing/ # Billing logic and gateway (@kit/billing)
mailers/ # Email providers (@kit/mailers)
i18n/ # Internationalization (@kit/i18n)
monitoring/ # Error tracking (@kit/monitoring)
analytics/ # User analytics (@kit/analytics)

This structure lets you modify features without touching core packages, and makes it straightforward to add new applications that share the same backend logic.

Prerequisites

Before diving in, you should be comfortable with:

  • Next.js App Router: Server Components, Server Actions, route handlers
  • Supabase: PostgreSQL, Row Level Security, Auth
  • React: Hooks, TypeScript, component patterns

The kit builds on these technologies rather than teaching them. If you're new to Supabase or the App Router, spend time with their official docs first.

Documentation Scope

This documentation covers kit-specific configuration, patterns, and customization. For underlying technology details:

Upgrading from v2

From Quickstart to Production

A running local app is the starting point. What separates a production multi-tenant SaaS from a demo is the work after the quickstart — and it is where this kit does the heavy lifting for you:

  • Row Level Security at scale: tenant data is protected by RLS policies tied to the account model, so a missing permission check in application code cannot leak rows — the database refuses regardless. See Row Level Security for the kit's policy patterns and Supabase RLS best practices for the reasoning behind them.
  • Multi-tenancy modeled once: personal accounts, team accounts, memberships, invitations, and per-account roles live in Postgres and are enforced by the database. The architecture is documented in Multi-Tenant SaaS Architecture with Postgres RLS.
  • Billing lifecycle: webhooks, plan changes, per-seat and tiered pricing, and the customer portal are wired for Stripe and Lemon Squeezy — see the billing documentation.
  • Deployment: the going to production checklist covers environment configuration, Supabase project setup, and hosting.

Next Steps

  1. Check the technical details to understand the full stack
  2. Clone the repository and set up your environment
  3. Run the project locally to explore the features