Multi-tenant SaaS boilerplate for Next.js 16 Better Auth and orgs, wired the day you clone
What's in the repository
Counted on the main branch you clone, not estimated.
10
Shared packages
Auth, database, email, design system, i18n, storage, logging
28
App routes
Dashboard, orgs, account, admin, and every auth flow
190+
Unit tests
Vitest across auth, billing and data access - plus 25 Playwright suites
3
Deploy targets
Cloudflare Workers, Vercel, Docker/AWS - verified in production

Multi-tenant orgs and personal accounts
- Org-scoped subscriptions with one Stripe customer per org
- Owner / admin / member roles with route-level guards
- Invite flows with email confirmation and seat handling
- Slug-based URLs validated at the edge


Every SaaS auth flow you'll ever need
- Email + password with verification and recovery flows
- Magic link sign-in and one-time code fallback
- Google and GitHub OAuth out of the box
- TOTP 2FA with backup codes and recovery

Stripe subscription billing, wired the right way
- Per-org customer with subscription scoping and seat limits
- Self-serve portal for cards, invoices, and cancellation
- Idempotent webhook handling with replay-safe events
- Tiered plans in one config file

Production SaaS security from day one
- Per-request CSP nonces set by the edge middleware
- Rate-limited sign-in attempts to deter brute force
- Audit-ready session and account event tracking
- Strict TypeScript and Zod validation at every boundary
Read the code before you buy
Verbatim files from the kit, not a marketing rewrite. This is the members page, its queries and the org half of the schema.
import { TableSkeleton } from "@repo/design-system/components/data-table/table-skeleton";
import { SetBreadcrumbs } from "@repo/design-system/components/layout/breadcrumb-context";
import { ContentSection } from "@repo/design-system/components/layout/content-section";
import { getDictionary } from "@repo/internationalization";
import { Suspense } from "react";
import { getActiveOrganization } from "@/lib/organization/queries";
import { orgRoutes } from "@/lib/routes";
import { MembersTable } from "./components/members-table";
import { getMembers } from "./queries";
import { getMemberPermissions } from "./utils";
import { membersSearchParamsCache } from "./validations";
interface MembersPageProps {
params: Promise<{ locale: string; orgSlug: string }>;
searchParams: Promise<Record<string, string | string[] | undefined>>;
}
export default async function MembersPage({
params,
searchParams,
}: MembersPageProps) {
const [{ locale, orgSlug }, resolvedSearchParams] = await Promise.all([
params,
searchParams,
]);
const [dict, orgContext] = await Promise.all([
getDictionary(locale),
getActiveOrganization(orgSlug),
]);
const parsedParams = membersSearchParamsCache.parse(resolvedSearchParams);
const membersPromise = getMembers({
...parsedParams,
organizationId: orgContext.organizationId,
});
const permissions = getMemberPermissions(orgContext.role);
return (
<>
<SetBreadcrumbs
items={[
{ label: "Organization", href: orgRoutes.home(orgSlug) },
{ label: "Members" },
]}
/>
<ContentSection
description="Manage your organization members, invitations, and invite links"
title="Members"
>
<Suspense fallback={<TableSkeleton />}>
<MembersTable
currentUserId={orgContext.userId}
errors={dict.errors.action}
membersPromise={membersPromise}
organizationId={orgContext.organizationId}
permissions={permissions}
/>
</Suspense>
</ContentSection>
</>
);
}From checkout to running code
No license keys, no download portals. Access is a GitHub invitation to the address you pay with.
- 01
Pay
Checkout by Polar. Card or PayPal, no account to create.
- 02
Get invited
GitHub emails you an invitation to the private organization, usually within a minute.
- 03
Clone and ship
Accept, clone, pnpm install. You are running locally in under five minutes.
One price for the Next.js 16 App Router kit
One payment, lifetime updates, full source. Unlimited projects, any number of developers on your team, no subscription.
Multi-tenant SaaS boilerplate for Next.js 16
The kit as it ships today.
$200one-time
- Next.js 16 App Router
- Full source, one seat in the private repo
- Unlimited projects
- Your whole team may work on it
- Client and agency work permitted
- Lifetime updates, no subscription
- All future releases included
- Free setup and deploy help in Discord
Secure checkout by Polar · GitHub access within minutes · All sales final
Would rather it were already built?
We build your MVP on the same kit we sell. 2 weeks, from $5,000. Fixed scope and price, agreed before any code.
Frequently Asked Questions
Short answers, no fine print surprises. The license page has the full text.
Notes from the build
The thinking behind the kit: multi-tenant architecture calls, Next.js 16 patterns, and how we ship client MVPs on it.

30 August 2026 · Justin Nguyen
How bots filled my cache bucket with 1.76 GB of 404 pages
My marketing site has no uploads and no ISR, but its R2 bucket grew to 1.76 GB in about a week. Every object was a cached 404 page for a URL like /wp-configs.php. Here is why it happened, the one-line fix, and how to check your own Next.js app.

26 August 2026 · Justin Nguyen
The Best Next.js Stack for 2026: What I Actually Run in Production
Not a reading list, a lockfile. Every layer of the Next.js 16 stack I run in production, the alternative I passed on at each layer, and the three places the stack is still wrong. Verified August 2026.
Shipped on this kit
Live businesses running on the Next.js 16 App Router kit today. Their sites, their customers, our plumbing.
Ready to ship your SaaS?
Clone it today and deploy it this week - the plumbing is finished. Or hand it to us: we build your MVP on the same kit in 2 weeks, from $5,000.
