
A Next.js Drizzle SaaS boilerplate with the hard parts already written
Drizzle and Better Auth are both easy to install. Wiring them into organizations, seat-based billing, invitations, and an admin panel that agree with each other is the part that takes weeks, and the part an AI agent tends to get subtly wrong.
Customers can sign up and pay
Teams stay inside their seats
You can operate it
What the Drizzle kit does, and how
Schema and migrations in TypeScript
Tables live in @kit/database as Drizzle schema files. drizzle:generate writes SQL migrations from them, and Drizzle Kit's strict mode asks before it treats a rename as a drop.
The SQL you review is the SQL that runs, and query types come straight from the schema.
Tenant scoping you can see
createOrgAuthContext() gives you ctx.org(table) to filter by organization and ctx.values(table, data) to fill organizationId on insert.
Isolation is explicit in application code, and createOrgAuthContext makes the scoped query the default one to write, so a missing filter stands out in review. The tradeoff: there are no RLS policies behind it by default.
Better Auth with organizations
Email and password, magic links, OAuth, TOTP MFA, rate limiting, and captcha. The organization plugin handles members and invitations; roles are configured in one RBAC file, and orgs can add custom roles from the UI.
Auth runs on your own infrastructure with no external service or per-user pricing. More on this in the Better Auth SaaS starter kit overview.
One billing client, two providers
getBilling(auth) returns a client with checkout, portal, subscriptions, plan limits, entitlements, and usage meters. Switch between Stripe and Polar with one environment variable.
Seat limits and feature gates call the same API whichever provider you pick, and Polar can act as merchant of record.
Tests that don't need Docker
Database unit tests run on PGlite, an in-memory Postgres, with helpers for creating test organizations. Playwright covers the end-to-end flows.
Your agent can run the test suite after each change and get an answer in seconds.
Built for agent-assisted work
AGENTS.md, CLAUDE.md, and GEMINI.md describe the conventions; the bundled MCP server exposes database tools, environment variables, checks, and email templates to your agent.
Claude Code, Cursor, or Codex follow the kit's patterns and run the same checks you would before a change lands.
Who the Drizzle SaaS Starter Kit is for
A good fit if you
- Want to choose your Postgres host (Neon, Railway, RDS, your own box) and move later
- Prefer queries that read like the SQL they generate
- Want auth, sessions, and orgs in your own database, with no auth vendor
- Care about small runtime overhead: Drizzle has no query engine, just a thin layer over the driver
Probably not a fit if you
- Want tenant isolation enforced by Postgres RLS (pick the Supabase kit)
- Need Supabase Realtime or Supabase Storage out of the box
- Need React Router; only the Supabase kit ships for it
- Don't write code: this is a codebase you run, extend, and deploy yourself
Why Drizzle, and when to pick Prisma or Supabase instead
All three kits ship auth, teams, billing, and an admin panel. Drizzle and Prisma share the same Better Auth architecture and differ in the ORM. Supabase moves auth and access control into the database.
Drizzle (this page)
Choose it for SQL-like queries, schema-as-code in TypeScript, minimal runtime overhead, and in-memory PGlite tests.
Frameworks: Next.js 16, TanStack Start. Billing: Stripe, Polar.
Prisma 7 + Better Auth
Choose it if your team already thinks in schema.prisma, Prisma Migrate, and Prisma Studio. Same features, different data layer.
See the Next.js Prisma SaaS starter kit.
Supabase
Choose it if you want Supabase Auth, Storage, and Realtime, and tenant isolation enforced by RLS policies in Postgres.
See the Supabase SaaS starter kit.
Still deciding on the ORM? Our Drizzle vs Prisma comparison walks through schema definition, query APIs, migrations, and performance on current versions.
What the Drizzle kit gets you, and how fast it runs
What you get
- Access to the private GitHub repositories for the Next.js 16 and TanStack Start Drizzle kits
- One-time purchase, lifetime license, unlimited projects
- Lifetime updates to the Drizzle kit, including major versions, merged from the upstream remote when you choose
- Support on Discord; Pro covers 1 developer, Teams up to 5
- Client work needs the Team License, and each client needs their own license. Full terms on the license page.
- The Drizzle kit documentation is public, so you can check every feature before you buy. Refunds are generally not offered once repository access is redeemed.
From purchase to first deploy
Prerequisites: Node.js 20.10+, pnpm, Git, and Docker (or an existing PostgreSQL 16+ database).
- Clone the repository, run
pnpm install, thenpnpm turbo gen setup. - Start Postgres and Mailpit with
pnpm run compose:dev:up. - Apply migrations with
pnpm --filter "@kit/database" drizzle:migrateand seed test data withpnpm run seed. - Run
pnpm devand sign in at localhost:3000. - To deploy: provision Postgres, storage, and email, set environment variables, run migrations, and connect billing webhooks on Vercel, Railway, or Docker.
Our customers love Makerkit ❤️
Rob, founder at Provider.app
Watch the full interview with Rob.Sebastian, founder at Watchthis
Watch the full interview with Sebastian.Michael, founder at ChatFlow
Watch the full interview with Michael.Drizzle kit pricing
One-time payment, lifetime updates, unlimited projects
- Lifetime access to your stack of choice
- Build unlimited applications
- Continuous updates
- Access to the Discord community
- The best support in the SaaS Starter kits market, period.
- Community and Chat support
- Community-based feature requests and Request for Comments. You have a say in what Makerkit should build next.
- One-time payment, no subscriptions
- Includes access to our free Figma UI kit
Pro A B2B SaaS Starter Kit for individual developers.
| Teams A B2B SaaS Starter Kit for teams of developers or companies.
|
Drizzle SaaS Starter Kit FAQ
What is included in the Next.js Drizzle SaaS starter kit?
Better Auth (email and password, magic links, OAuth, TOTP MFA, rate limiting, captcha), organizations with roles, custom roles and invitations, subscription billing with Stripe or Polar including per-seat enforcement, an admin panel with impersonation, file storage through S3-compatible providers, transactional emails, and Vitest and Playwright tests. The database is PostgreSQL with a Drizzle schema and migrations you own.
Which databases does the Drizzle kit support?
PostgreSQL by default, on any provider: Neon, Supabase, Railway, AWS RDS, or your own server. The local setup runs PostgreSQL 17 in Docker. The docs include one-way migration guides to MySQL and SQLite through the database adapter, but Postgres is the tested path; unit tests keep running on PGlite either way.
How do auth and multi-tenancy work without Supabase?
Better Auth runs inside your Next.js app and stores users, sessions, and organizations in your database through its Drizzle adapter. The organization plugin handles members, roles, and invitations. Tenant data is scoped in application code with createOrgAuthContext, which adds the organizationId filter to queries and the organizationId value to inserts. There are no RLS policies by default.
Which frameworks are included?
The Drizzle license covers the Next.js 16 kit and the TanStack Start Drizzle kit. For React Router, use the Supabase kit.
Can I self-host?
Yes. There is no hosted auth service to depend on, so you need a Postgres database, an S3-compatible bucket, and an email provider. The docs cover Docker (a generator creates the Dockerfile), Railway, and any host that runs Next.js, such as Vercel.
Can I use Supabase as the database?
Yes, as a Postgres provider. The Drizzle client disables prepared statements so it works with the transaction pooling that Supabase and Neon use. Auth stays in Better Auth. If you want Supabase Auth, Storage, and RLS as well, the Supabase kit is the better match.
How are updates delivered, and for how long?
The kit is a private GitHub repository. You keep MakerKit as an upstream remote and merge updates with git pull upstream main when it suits you. Both the Developer and Team licenses include lifetime updates to the kit you bought, including major versions.
Can my team use one license?
The Pro (Developer) license is for one developer. The Teams license gives repository access to up to 5 developers in the same organization. Handing source code to clients requires the Team License, and each client needs their own MakerKit license.
Can AI coding agents work with the codebase?
Yes. The repo includes AGENTS.md, CLAUDE.md, and GEMINI.md, Claude Code skills, and a .mcp.json wired to a MakerKit MCP server. The server exposes tools for database inspection, environment variables, running checks, email templates, translations, and PRD management, so Claude Code, Cursor, or Codex work with the kit instead of guessing.
I already started with another boilerplate. Can I migrate?
There is no automated importer. Because the schema is plain TypeScript, the usual path is to copy your domain tables into the Drizzle schema, add an organizationId column where data is team-owned, generate a migration with Drizzle Kit, and move your feature code across.
Can I switch to the Supabase or Prisma kit later?
Each kit is a separate product with its own license. Existing customers get a discount when they buy another stack; the FAQ page explains how to switch.
Docs, course, and community for Drizzle and Next.js
Kit-specific documentation, a guided course, and a Discord where you can ask questions about your codebase.
Documentation
Course
Discord Community
Own every layer, from schema to billing
Start with auth, organizations, and billing that already agree with each other, on the Postgres host you choose.