Any Postgres, auth in your app

The Next.js Drizzle SaaS Starter Kitwith Better Auth and Postgres

Better Auth organizations, Stripe or Polar billing, and an admin panel on a schema you define in TypeScript.
Any Postgres host, no hosted auth or per-user fees, and an MCP server for your AI agent.
One-time purchase from $349, with lifetime updates.
Makerkit Dashboard
What works on the first run

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

Sign-up, MFA, checkout, and the customer portal work locally against seeded users and organizations, so you can test billing flows before writing product code.

Teams stay inside their seats

Invites, resends, and accepts check members plus pending invites against the purchased seat count before they go through.

You can operate it

The admin panel at /admin lists users and organizations, bans accounts, and impersonates users when you need to reproduce a bug.
Schema, scoping, auth, billing

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
Drizzle, Prisma, or Supabase

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.

License, updates, setup

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).

  1. Clone the repository, run pnpm install, then pnpm turbo gen setup.
  2. Start Postgres and Mailpit with pnpm run compose:dev:up.
  3. Apply migrations with pnpm --filter "@kit/database" drizzle:migrate and seed test data with pnpm run seed.
  4. Run pnpm dev and sign in at localhost:3000.
  5. 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 ❤️

HA

Harvey Coplestone

"Just started using MakerKit and it's a total game-changer. 🚀 Wish I had this when I was building Phishr. Instant team management and billing? Insane."

BR

Brayan

"@gc_psk @makerkit_dev Bought the your recent course and I’m super stoked to be part of the community! I can’t wait to dive into the material this week 🤙"

AN

Andrew Willshire

"@gc_psk Second that! Giancarlo provides amazing support!! 😄"

BE

Bekir Khan

"offtopic but I think your makerkit is the best paid boilerplate out there. you should market it more during the drama lol"

KI

Kiara Bickers

"Honestly @makerkit_dev is great. More for B2B products but really clean and well documented."

AD

Aditya Tripathi

Climactic

"Amazing! @gc_psk has built a masterpiece with this one!"

IV

Ivor

"@vikaskookna @makerkit_dev is a really solid saas starter. Props to @gc_psk for always delivering great features and maintaining excellent documentation."

PR

Pranav Malvawala

"@gc_psk @DmytroKrasun @makerkit_dev Makerkit is honestly the best investment I made this year. It just keeps getting better and better"

KH

Khalil Najjar

Cohere AI

"@gc_psk @makerkit_dev Makerkit is a gem for makers, if I was not building a desktop app I would be using it for sure, maybe for my next project"

BL

Blake Rowley 👋🏽

"@gc_psk @makerkit_dev @supabase Oh mate! This is unreal. Legitimately unreal. Keep up the good work. Maybe consider a subscription for premium components. Will keep you motivated and more $ coming in."

WI

Will Mitchell

"I landed on MakerKit after getting into boilerplates with ShipFast. Much better."

NE

Neerav Vyas

"@gc_psk @makerkit_dev This is amazing, @gc_psk. Great job continuously adding new and useful features to the product 👏. Eager to know what comes next... Keeping my 👀 on it!"

DA

Dan Schoonmaker

"1000% recommend buying a good boilerplate (or making your own) I use @makerkit_dev it's so good I had an affiliate link, but I can't find it at the moment"

ME

Mehdi Nabhani

"Tried most of them, makerkit beats them all 🔥"

CA

Carl Chan

"For anyone who wants to build their own SaaS, I recommend trying out @makerkit_dev. Thanks to @gc_psk for creating such a fantastic tool that makes building websites a breeze! #SaaS #buildinpublic"

RO

Roye Segal

Artefact

"MakerKit gave us a huge starting advantage by providing auth, multi-tenancy, and all of the necessities to build a SaaS on top of a solid foundation."

RA

Rade Joksimovic

Rumora

"We loved the product since when Giancarlo released the first version, and are building upon it ever since for all of our products. Highly recommended for all indie makers out there."

UL

Uladzislau Rasliak

AppReply

"We chose MakerKit because it's simply the best SaaS boilerplate app out there, with active community and regular updates."

ST

Stefano Cantu

WiseOptIn

"Solid and battle tested boilerplate with an amazing community and support."

CA

Calvin Müller

CrewCue

"It seemed like the logical choice."

Testimonials Plugin

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.

$349$299/lifetime

  • Next.js 16 and Tanstack Start
  • Drizzle and Better Auth
  • Bring your own database
  • Unlimited Projects
  • Continuous updates
  • Lifetime license
  • Access to 1 user (only you)
  • Discord Support
Teams
A B2B SaaS Starter Kit for teams of developers or companies.

$649$599/lifetime

  • Next.js 16 and Tanstack Start
  • Drizzle and Better Auth
  • Bring your own database
  • Unlimited Projects
  • Continuous updates
  • Lifetime license
  • Access to 5 users
  • Discord Support
  • Private Discord Threads

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.

Get up to speed quickly

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

Schema design, migrations, tenant-scoped queries, Better Auth plugins, billing providers, testing with PGlite, and deployment.
Browse Docs

Course

Build TeamPulse, a team feedback tool, on the kit from scratch, with the architecture decisions explained as you go.
Start the Course

Discord Community

Get help with setup and kit-related issues, and compare notes with other developers running the Drizzle kit.

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.