Every server function authorizes itself
This is shipped kit code, not pseudocode: composable middleware makes authentication, admin checks, and organization scoping the default on every server function.
export const updateOrganizationNameFunction = createServerFn({ method: 'POST' })
.middleware([errorMiddleware, authMiddleware])
.validator(UpdateOrganizationNameSchema)
.handler(async ({ data }) => {
const organizationId = await requireActiveOrganizationId();
const service = createUpdateOrganizationService();
await service.updateOrganization({
organizationId,
name: data.name,
});
});packages/organization · shipped in the kit (Drizzle variant). The full wiring is documented in Better Auth on TanStack Start.
TanStack Start or Next.js? An honest comparison
| MakerKit for TanStack Start | MakerKit for Next.js | |
|---|---|---|
| Routing | TanStack Router: typed routes, params, and search state | App Router: React Server Components and conventions |
| Server logic | createServerFn with composable auth middleware | Server Actions and Route Handlers |
| Build & deploy | Vite + Nitro: portable Node bundle, Railway config included, runs on any Node host | Next.js build: first-class on Vercel, adapters elsewhere |
| Framework maturity | Release Candidate: kit isolates the integration points | Stable, mature ecosystem |
| Data layer | Drizzle, Prisma, or Supabase | Supabase, Drizzle, or Prisma |
Same SaaS architecture on both frameworks. The full comparison lives in TanStack Start vs Next.js.
What ships in the box
apps/
web/ # the TanStack Start application
e2e/ # Playwright end-to-end tests
packages/
better-auth/ # Better Auth integration (Supabase variant: packages/supabase)
account/ # personal account: settings, profile, deletion
organization/ # team accounts, members, invitations
rbac/ policies/ # roles and permission boundaries
billing/ # Stripe billing and gateway
database/ # Drizzle schema (Prisma / Supabase in those variants)
function-middleware/ # auth, admin, and organization middleware
ui/ i18n/ mailers/ monitoring/ analytics/ ...Core flows tested end to end
A dedicated Playwright suite exercises the flows your business depends on:
auth/auth.spec.tsbilling/org-billing.spec.tsbilling/user-billing.spec.tsmembers/members.spec.tsinvitations/invitations.spec.tsadmin/impersonation.spec.tsroles/roles.spec.ts
TanStack Start 1.168 · React 19.2 · Vite 8 · Better Auth (Drizzle/Prisma variants) or Supabase Auth (Supabase variant), verified July 2026. TanStack Start is currently a Release Candidate: the kit isolates framework integration points, so upstream changes stay contained as it moves to stable.

A TanStack Start SaaS starter kit on server functions, with Better Auth, Drizzle, Prisma, or Supabase
Server functions composed with middleware for auth, admin checks, and organization scoping.Drizzle or Prisma with Better Auth, or Supabase with RLS. Same accounts, billing, and admin in all three.Builds with Vite and Nitro into a Node server for Railway, Docker, or any Node host.
Authentication
Billing and Subscriptions
Customer Portal
Multi Tenancy
Super Admin
Shadcn UI and Tailwind CSS
Dark Theme
Blog
Documentation/Help Center
Mobile Friendly
Serverful/Serverless Stack
Strict code standards
E2E Testing with Playwright
Emails with React Email
Mailers
Plugins
You Own the Code
Documentation
SEO Basics
Swappable Providers
AI Agent Rules
MCP Server
Course
Realtime Notifications (Supabase)
Internationalization
Figma UI Kit
Support
Community
Guides
Continuous Updates
Maintained Full-Time
Since 2022
Rules and an MCP server for AI agents and IDEs: Claude Code, Codex, Gemini, and Cursor
Instruction files tell the agent where code goes and which patterns to reuse. The MCP server gives it structured access to the kit, so features land on the existing auth, tenancy, and billing instead of beside them.

A production-ready TanStack Start SaaS Starter KitThe setup, stack, and tooling are decided, so your first commit is a product feature.
AuthenticationBetter Auth on the Drizzle and Prisma variants, Supabase Auth on the Supabase variant. Same flows either way: password, magic link, OAuth, and MFA.

Multi-TenancyPersonal and team accounts, invitations, and role-based access control, modeled in the database rather than bolted on in app code.

BillingStripe or Polar on the Drizzle and Prisma variants; Stripe or Lemon Squeezy on the Supabase variant. Per-seat and metered billing included.
Admin PanelManage your users, organizations, and build your own internal tooling within the app.

Delightful UI, Built to ExtendScreens for every flow, built from the same Shadcn UI components you will use for your own features.

MarketingGet found by your target audience with blog, documentation, changelog, and more.

Monitoring and TestingComprehensive monitoring and testing tools to help you keep your SaaS running smoothly.

Support and CommunityAsk me and the MakerKit community on Discord about setup, kit-related issues, and how the codebase fits together.
What a TanStack Start SaaS costs to build from scratch
TanStack Start gives you typed routes and server functions. Auth middleware, organizations, billing, and admin are still yours to write. With AI coding tools, that is still 49-81 hours of senior developer time, including fixing the patterns AI got wrong.
Build once
Infrastructure every SaaS needs before its first feature
- Authentication (email, OAuth, MFA)6-10 hoursPre-built
- Stripe subscription billing5-8 hoursPre-built
- Teams, roles & invitations6-10 hoursPre-built
- Super admin dashboard4-6 hoursPre-built
- Transactional emails3-5 hoursPre-built
- Marketing pages2-4 hoursPre-built
- Blog & documentation3-5 hoursPre-built
- Project setup (monorepo, CI, TypeScript)2-3 hoursPre-built
- E2E tests (auth and billing flows)3-5 hoursPre-built
Maintain forever
Work that keeps coming after launch
- Refactoring AI-generated patterns15-25 hoursNot needed
- Next.js/React version upgradesEvery major releaseIncluded
- Security patches & fixesOngoing, unpredictableIncluded
- Dependency updatesOngoingIncluded
49-81 hours
With AI tools, including rework
Day 1
Start building your product immediately
$7,350-$12,150
In developer time and opportunity cost
Estimates for a senior developer building from scratch with Claude Code or Cursor at $150/hour, including 15-25 hours refactoring AI-generated patterns. Read the methodology
Get the TanStack Start SaaS Starter Kit
Each data stack license includes the TanStack Start and Next.js kits. One-time purchase: lifetime license, continuous updates, unlimited projects of your own.
- 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
Choose your Stack
Select the technology stack that best fits your project
Questions about licensing?
Read the MakerKit license terms and the MakerKit FAQ, or contact me.
A TanStack Start boilerplate where authorization is middleware
Server functions compose authentication, admin, and organization checks before your code runs.
What is MakerKit for TanStack Start?
MakerKit for TanStack Start is a SaaS starter kit built on TanStack Start and TanStack Router, in Drizzle, Prisma, and Supabase variants. Drizzle and Prisma use Better Auth; Supabase uses Supabase Auth with RLS. Each ships authentication, billing, organizations with roles, a super admin, and Playwright tests, and builds with Vite and Nitro into a portable Node server.
Best for
- Developers who want typed routes, params, and search state with TanStack Router
- Teams leaving the Next.js App Router who want to keep React 19 and Shadcn UI
- Products that deploy to Railway, Docker, or any Node host
Not for
- Teams that require a stable 1.0 framework today; TanStack Start is a Release Candidate
- Projects built around React Server Components
- Developers who want the largest pool of examples and answers; Next.js still has more
Middleware-first server functions
Authentication, admin checks, and organization scoping compose onto each createServerFn before your handler runs.
Pick the data layer
Drizzle or Prisma with Better Auth, or Supabase with Supabase Auth and RLS, on the same architecture.
Typed routing
TanStack Router types routes, params, and search state end to end.
Deploy on any Node host
Vite and Nitro build a portable Node server. A Railway config and a Docker guide are included.
Core flows tested
Playwright specs for auth, personal and organization billing, members, invitations, roles, and admin impersonation.
Built for AI coding agents
AGENTS.md and CLAUDE.md files at the root and in each package, rules for Claude Code, Cursor, Codex, and Gemini, and an MCP server your agent can call.
With and without MakerKit
TanStack Start SaaS Starter Kit FAQ
What is the TanStack Start SaaS Starter Kit?
A production SaaS foundation built on TanStack Start and TanStack Router, with your choice of Drizzle, Prisma, or Supabase as the data layer. You get authentication, billing, multi-tenancy, an admin panel, and Playwright E2E tests on a full-stack React stack that builds with Vite and Nitro instead of the Next.js App Router.
How does the kit use TanStack Start server functions?
Server logic runs in createServerFn handlers, which you call from components like async functions. Each one composes middleware for error handling, authentication, and organization scoping, validates its input with a schema, then calls a service, so authorization runs before your handler code does.
Can I use Drizzle, Prisma, or Supabase?
All three. The kit comes in three variants with the same architecture: Drizzle and Prisma use Better Auth on any Postgres, and Supabase uses Supabase Auth with Row Level Security. Authentication, billing, and multi-tenancy work the same way in each.
How is this different from the Next.js MakerKit kits?
Same features, different framework. Routing is file-based and type-safe end to end through TanStack Router, server logic runs through server functions instead of Server Actions, and the app builds into a portable Node server bundle. A Railway config and Docker guide are included, and it runs on any Node host.
Which billing providers does the TanStack Start kit support?
Stripe or Polar on the Drizzle and Prisma variants. The Supabase variant uses a billing gateway with Stripe or Lemon Squeezy, switched with one environment variable.
Is TanStack Start production ready?
The kit is: its core flows (auth, billing, members, roles, admin impersonation) are covered by a Playwright suite. TanStack Start itself is currently a Release Candidate, so the kit isolates the framework integration points to keep upstream changes contained as it moves to stable.
Is MakerKit a one-time purchase or a subscription?
A one-time purchase. You get a lifetime license to the source code, continuous updates for the stack you bought, and unlimited projects for your own business, with no renewal fee. Building products for clients requires a Team license, and each client that receives the code needs their own license.
What support is included?
Discord support from me, Giancarlo, the founder who works on MakerKit full-time, and from the community. I help with setup, kit-related issues, and questions about the codebase. Team licenses add a private Discord channel for your team.
SaaS products built with MakerKit
A selection of products MakerKit customers have built on the kits.

I help founders launch faster - because life’s too short to write boilerplate code.
I am a software engineer with almost 15 years of experience writing code for both startups and enterprises.
My love for creating digital products inspired me to build Makerkit, a SaaS Starter Kit that helps you launch the SaaS you have always dreamed of.
My job is to help you achieve your goals, and I work hard to make it happen.
You can find me on Twitter, LinkedIn, and GitHub.
Want TanStack Start in production without writing the SaaS layer?
Server functions, auth middleware, organizations, and billing ship ready on the data layer you choose, and the kit tracks TanStack Start on its way to stable. Get lifetime access and build on it today.




















