Black Friday!-$150 off
home

Next.js Multi-Tenant SaaS Template (Orgs + RBAC)

Next.js multi-tenant SaaS template with organizations, invitations, roles, URL-based tenant context and per-seat billing, built on Better Auth and Drizzle.

Next.js
+
Multi-Tenancy
BLACK FRIDAY: -$150 off ends in 8d23h9m11s
Lee RobinsonMarcus QuinnVadym PetrychenkoEric RoupeRodrigo Sumioshi
trusted by 394+ founders
TurboStarter demo
What makes it different?

Focus on your product, not setup

Everything you need to launch your SaaS in no time.

Build for web, mobile, and browser extension simultaneously with a unified codebase.

export const billingRouter = new Hono()
  .post(
    "/checkout",
    validate(
      "json",
      z.object({ plan: z.object({ id: z.string() }) }),
    ),
    enforceAuth,
    async (c) => {
      logger.time("checkout");
      const result = await checkout({
        user: c.var.user,
        ...c.req.valid("json"),
      });

      await db.insert(orders).values({
        externalId: result.id,
        userId: c.var.user.id,
      });

      await sendEmail({
        template: EmailTemplate.INVOICE,
        to: c.var.user.email,
        variables: { user: c.var.user, ...result },
      });

      track("checkout.created", {
        userId: c.var.user.id,
        checkoutId: result.id,
      });

      logger.timeEnd("checkout");
      return c.json(result);
    },
  ).post("/webhook", (c) => webhookHandler(c.req.raw));

Comprehensive auth flow with email/password, magic link, social login, and two-factor authentication.

or continue with
Forgot password?

Subscriptions, one-time payments, metered usage, per-seat, and credits - with org billing and popular providers built in.

Publish all your apps to all users with a single command. No more manual work.

Wait! There's more!

25+ SaaS Ideas

Don't know what to build? We have 25+ ready-to-use ideas to get you started. Rated 5.0 by 100+ users.

Internationalization

Reach a global audience with built-in multi-language capabilities. Internationalization supported out of the box.

Organizations/teams

Group users together in organizations and assign roles or permissions to them. Best fit for B2B SaaS and RBAC structures.

AI-assisted development

Dedicated rules, skills, agents and commands for most popular AI editors and tools to generate code faster and more accurately.

SEO, Sitemaps & Marketing

Meta tags, social media images, store listing, sitemaps, marketing presence and more.

Landing Page

Conversion-ready marketing pages - hero, features, pricing, testimonials, waitlist, and newsletter signup — ready to ship.

Tips & Tricks

How to market your SaaS, tech stuff, SEO hacks, mobile reviews tricks and many, many more.

CLI

Create a new app with a single command - customize providers, bootstrap config and deploy right from your terminal.

AI integration

Built-in support for multiple providers allowing you to ship your next AI SaaS in minutes.

TurboStarter is a Next.js multi-tenant SaaS template where every tenant is an organization: users create organizations, invite teammates by email, get a role (owner, admin, or member), and switch between workspaces. Tenant context comes from the URL slug and the session, data is scoped by organizationId, and organizations can be billed per seat.

It is built on the Better Auth organization plugin, Drizzle, and Postgres, and the same organizations work in the Expo mobile app and the browser extension.

How tenants are isolated

All organizations share one database and schema, separated by an organizationId column. That keeps operations simple and cheap. If you later need schema-per-tenant or database-per-tenant isolation, you build that yourself; the data model docs explain the trade-off.

What's included

More specifics, each backed by the docs:

  • URL-based tenant context. Organization routes live under /dashboard/[organization], the slug is the source of truth, and the session's activeOrganizationId is kept in sync (active organization).
  • Cache invalidation on switch. When the active organization changes, caches keyed by organization are invalidated so data doesn't leak between tenants.
  • New and existing users can accept invites. Existing users get the membership and the organization becomes active; new users sign up with the invite attached and land inside the organization.
  • Lifecycle guards. At least one owner must remain, an organization with active subscriptions can't be deleted, and leaving an organization triggers a seat sync (data model).
  • Billing is permission-aware. By default members can read billing data, admins can also start checkout, and owners can fully manage billing (per-seat billing).
  • Flexible pricing models. Organizations can also be billed with flat subscriptions, one-time purchases, metered usage, or credits.
  • Works across platforms. The same organizations, roles, and invitations are available in the mobile app and the extension.

How it works

The tenant is resolved on the server first, then every query is scoped by the verified organizationId. In a server component, read the organization from the URL slug:

page.tsx
import { getOrganization } from "~/lib/auth/server";

export default async function Page({
  params,
}: {
  params: Promise<{
    organization: string;
  }>;
}) {
  const organization = (await params).organization;
  const activeOrganization = await getOrganization({ slug: organization });

  return <>{activeOrganization?.name}</>;
}

On the API side, the Hono middleware stack checks the session and membership before your handler runs, and your query filters by tenant:

Pattern
// After enforceAuth + enforceMembership({ organizationId })
const projects = await db.query.project.findMany({
  where: eq(project.organizationId, organizationId),
});

The rule the access control docs repeat: never authorize from a client-provided organizationId alone. Resolve the session, verify membership or permissions for that organization, then query.

Permission checks use Better Auth's API, on the server for real enforcement and on the client to hide UI:

const canCreateProject = await authClient.organization.hasPermission({
  permissions: {
    project: ["create"],
  },
});

Organization admin is not super admin

The organization admin role only governs one tenant. The global admin role controls the super admin dashboard, where you can see all organizations across the platform.

What you add yourself

So you know where the template stops:

  • Subdomains per tenant (acme.yourapp.com) are a documented recipe using Next.js Proxy, not the default routing.
  • Per-tenant branding or white-labeling beyond an organization name, slug, and logo is not built in.
  • Database-level row security or separate schemas are not set up; isolation is enforced in the API and query layer.
  • Hard seat limits are your call. The docs show how to check a members plan limit before sending an invite.

Not building B2B? You can disable organizations for a personal-accounts product, or disable personal accounts so every user must create or join a workspace first.

Learn more

Who this template is for

  • B2B SaaS teams that bill by workspace or by seat
  • Founders who need invitations and roles before the first customer asks
  • Products that start web-only but may add a mobile app on the same backend
Sounds good?Now let's make it real. In minutes.
Try TurboStarter
Pricing

Your ticket to a $1M startup

Pay once and build unlimited projects with our powerful starter kits.

Compare all kits
BLACK FRIDAY: -$150 off ends in
8d23h9m11s
Core Kit

All SaaS features, ongoing updates, lifetime access and many more to help you ship faster.

$199$349

Lifetime license
Get lifetime access
  • AI-first codebase
  • Web boilerplate (Next.js)
  • Mobile boilerplate (React Native - Expo)
  • Browser extension boilerplate (WXT)
  • Billing
  • SEO, Marketing & Feature flags
  • Multi-tenancy - organizations/teams
  • Internationalization (i18n)
  • API, Auth & Admin
  • 1-click deployment
  • Transactional & marketing emails
  • Built-in MCP + CLI for common tasks
  • worth of exclusive perks
  • 25+ ready-to-launch SaaS ideas
  • Private Discord community
  • Lifetime updates

Prices in USD. VAT may apply. By purchasing, you agree to the EULA and Terms of Service.

Any doubts?

Book a FREE call or send us a message. Happy to help!

Testimonials

Loved by founders worldwide

Read why tech and non-tech (!) people are raving about TurboStarter and how it has accelerated their product launches.

Top SaaS starter kitby Vercel

Kudos for shipping! The landing page looks very nice.

Lee Robinson

Teacher @Cursor, prev @Vercel

I have to say, the approach to product/system design has really impressed me.It's truly become a gold standard that I look up to. Keep it up!

Marcus Quinn

Founder of @Evergreen

The best starter on the market, don't overthink it. Worth every penny. Just buy it!

Vadym Petrychenko

Founder of @Omichat

The coding setup and dev experience are top-notch. I'm shipping products faster than ever. Btw, already launched my first extension!

TurboStarter's solid architecture and built-in AI guidance let me ship faster without sacrificing quality. I've built projects for all 11 of my new clients with it.

Rodrigo Sumioshi

Founder of @Shibui

Revenue of ClaudeFast in one month period
Built with TurboStarter

TurboStarter exceeded my expectations - setup was super fast, and I was building features right away. If you want to skip boilerplate and move fast, this kit is for you!

Abdo El-Mobayad

Founder of @ClaudeFast

Showcase

What could you build with TurboStarter?

Below are some of the SaaS projects that have been built with our starter kit.

See all projects
world map
Community

Connect with like-minded people

Join our community to get feedback, support, and grow together with 1,000+ builders on board, let's ship it!

Join us

Frequently Asked Questions

Have another question? We've got answers. Contact us on Twitter or through our contact page.

See technical FAQ

Ship your startup everywhere. In minutes.

Don't burn tokens on setup and start building features on day one.

Get TurboStarter