Declarative schema, Better Auth

The Next.js Prisma SaaS Starter Kitwith Prisma 7 and Better Auth

One schema.prisma file drives your types, migrations, and Prisma Client.
Better Auth organizations, Stripe or Polar billing, an admin panel, and an MCP server, on any Postgres host.
One-time purchase from $349, with lifetime updates.
Makerkit Dashboard
What works on the first run

A Next.js Prisma SaaS boilerplate for teams that already know Prisma

You don't need a kit to install Prisma. You need one for the parts around it: organizations and roles, invitations that respect seat limits, billing webhooks, and an admin panel, all modeled in the schema you already know how to read.

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 handles bans, role changes, sessions, and impersonation. Prisma Studio at localhost:5555 covers the raw data.
Schema, migrations, auth, billing

What the Prisma kit does, and how

One schema, generated client

Models live in schema.prisma inside @kit/database. The prisma-client generator writes a typed client next to it, configured through prisma.config.ts and connected with @prisma/adapter-pg.

Relations, filters, and results are typed from a file a new teammate can read in minutes.

Versioned migrations

prisma:migrate creates SQL migration files you commit and review. Production and CI run prisma migrate deploy, never migrate dev.

Every schema change has a reviewable diff and a repeatable path to production.

Better Auth with organizations

Email and password, magic links, passkeys, OAuth, TOTP MFA, rate limiting, and captcha. The organization plugin handles members and invitations; roles live in one RBAC config file, and orgs can create custom roles from the UI.

Auth runs on your infrastructure, with no external service and no 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 tracking. Stripe and Polar sit behind the same API.

Seat limits and feature gates don't change when you change provider, and Polar can act as merchant of record for taxes.

Explicit tenant scoping

Team-owned models carry an organizationId, and queries filter on it in the where clause. The docs list unscoped queries as the mistake to avoid.

Action middleware such as withMinRole and withFeaturePermission checks the member's role and hands your action ctx.organizationId, so the filter always has a verified value. Access rules stay in TypeScript where you can review them. The tradeoff: no RLS safety net unless you add one.

Built for agent-assisted work

AGENTS.md and CLAUDE.md describe the conventions, Claude Code skills ship in .claude/, and a MakerKit MCP server gives your agent project-aware tools.

Claude Code, Cursor, or Codex follow the kit's conventions, and Prisma's generated types flag a wrong query before it runs.

Who the Prisma SaaS Starter Kit is for

A good fit if you

  • Already use Prisma and want to keep its schema language and tooling
  • Want a declarative data model that non-specialists on the team can read
  • Want to host Postgres wherever you like, with auth in your own database
  • Like having Prisma Studio for inspecting and fixing data

Probably not a fit if you

  • Want tenant isolation enforced by Postgres RLS (pick the Supabase kit)
  • Prefer writing queries that look like SQL (pick the Drizzle kit)
  • Need React Router; only the Supabase kit ships for it
  • Don't write code: this is a codebase you run, extend, and deploy yourself
Prisma, Drizzle, or Supabase

Why Prisma, and when to pick Drizzle or Supabase instead

All three kits ship auth, teams, billing, and an admin panel. Prisma and Drizzle share the same Better Auth architecture and differ in the ORM. Supabase moves auth and access control into the database.

Prisma 7 (this page)

Choose it for a declarative schema, Prisma Migrate, Prisma Studio, and a query API your team already knows.

Frameworks: Next.js 16, TanStack Start. Billing: Stripe, Polar.

Drizzle + Better Auth

Choose it for SQL-like queries, schema-as-code in TypeScript, and in-memory PGlite tests. Same features, thinner data layer.

See the Next.js Drizzle 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.

Weighing the ORMs on their own? Our Drizzle vs Prisma comparison covers what changed in Prisma 7, schema definition, query APIs, and migrations.

License, updates, setup

What the Prisma 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 Prisma kits
  • One-time purchase, lifetime license, unlimited projects
  • Lifetime updates to the Prisma 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 Prisma 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.20+, pnpm, Git, and Docker for the local Postgres and Mailpit containers.

  1. Clone the repository, run pnpm install, then pnpm turbo gen setup.
  2. Start Postgres and Mailpit with pnpm run compose:dev:up.
  3. Generate the client and apply migrations with prisma:generate and prisma:migrate, then seed 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 Railway, Docker, or another Next.js host.

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

Prisma 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/lifetime

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

$649/lifetime

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

Prisma SaaS Starter Kit FAQ

What is included in the Next.js Prisma SaaS starter kit?

Better Auth (email and password, magic links, passkeys, 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 data layer is Prisma 7 on PostgreSQL with a schema and migrations you own.

Which databases does the Prisma kit support?

PostgreSQL. The schema uses the postgresql provider and the client connects through the @prisma/adapter-pg driver adapter, so any Postgres host works: Neon, Supabase, Railway, AWS RDS, or your own server. Local development runs Postgres in Docker. Other databases are not covered by the docs, so treat them as your own port.

How do auth and multi-tenancy work?

Better Auth runs inside your Next.js app and stores users, sessions, and organizations in Postgres through Prisma. Its organization plugin handles members, roles, and invitations, with roles configured in a single RBAC file. Tenant-owned rows carry an organizationId, and queries filter on it explicitly. There are no RLS policies by default.

Which frameworks are included?

The Prisma license covers the Next.js 16 kit and the TanStack Start Prisma kit. For React Router, use the Supabase kit.

Where can I deploy?

Anywhere that runs a Next.js server and can reach Postgres. The docs cover Railway, Docker, and general Next.js hosts such as Vercel. You also need an S3-compatible storage bucket and an email provider. Run prisma migrate deploy in CI or at release, not migrate dev.

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 and CLAUDE.md rules, Claude Code skills, and a MakerKit MCP server under tooling/mcp-server that Cursor, Claude Code, and other MCP clients can load. Agents read the same conventions you do, and Prisma generated types give them fast feedback when a query is wrong.

I already started with another boilerplate. Can I migrate?

There is no automated importer. If your current project already uses Prisma, you can usually copy your models into schema.prisma, add an organizationId relation where data is team-owned, run prisma:migrate, and move your feature code across.

Can I switch to the Supabase or Drizzle 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 Prisma 7 and Next.js

Kit-specific documentation, a guided course, and a Discord where you can ask questions about your codebase.

Documentation

Prisma configuration, schema and migrations, tenant-scoped queries, Better Auth plugins, billing providers, testing, and deployment.
Browse Docs

Guided Course

Follow a structured path from project setup to production launch, 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 Prisma kit.

Keep Prisma, skip the SaaS plumbing

Start with organizations, billing, and admin already modeled in schema.prisma, on the Postgres host you choose.