Next.js SaaS boilerplate
See how the App Router, accounts, admin surfaces and production controls form one typed application.
Explore this foundationAuth, Stripe billing, Supabase, multi-tenant teams, multi-LLM AI and i18n are already wired, typed and secured. Claude Code, Codex and Cursor understand the architecture from the first prompt.
❯ git clone https://github.com/boilerplate-stack/boilerplate-stack-prod
✓Cloning into 'boilerplate-stack-prod'... done.
❯ cd boilerplate-stack-prod && pnpm install --frozen-lockfile
✓Packages: +982 · signatures verified · 0 vulnerabilities
✓Done in 11.4s
❯ pnpm run init
✓Branding, business model & admin email configured
✓Supabase, Stripe & Mailjet env vars wired
✓Database initialized · .env.local + config/app.ts generated
❯ pnpm dev
✓▲ Next.js 16.3.0 ready on http://localhost:3777
❯ claude "add a chat agent that answers from our docs"
✓Matched skill: /create-ai-agent · loaded config/ai.ts
✓Read rules: api.md · database.md · CLAUDE.md
✓Created agent · RAG pipeline · credit deduction wired
✓Types pass · ESLint clean · 0 questions asked
▸Shipped in 18s · agent live in chat selector
Built on the stack you already trust
Fully built, responsive screens — admin, billing, AI and CMS — you can ship today.
Users, organizations, subscriptions, CMS, media, scheduled jobs and analytics — all built, styled and responsive.
Months of foundational engineering — done, typed, documented and ready to extend.
GPT-5.6, Claude Opus 5 and Gemini 3.6 behind one server-only LLM boundary — direct provider APIs or OpenRouter, with zero-data-retention payloads and cross-provider failover when one degrades. LangChain orchestration, SSE streaming, prompt caching, a multi-agent registry and a built-in knowledge base (PDF/TXT/MD) on pgvector + HNSW.
View documentationRecent-factor step-up for sensitive actions, organization-wide MFA policies and remote session revocation. OWASP-aligned CSP, rate limiting, RLS, CSRF and Turnstile pair with a signature-verified, zero-vulnerability supply-chain gate.
View documentationArticle 50 transparency implemented, not just documented: AI-interaction notice, durable output marking, a public transparency page — and the operator paperwork as templates (Art. 30 ROPA, Art. 35 DPIA, breach runbook, DPA register). Plus an Art. 15 export in 28 sections and an append-only consent trail.
View documentationNext.js 16.3, React 19, Node 24 LTS, strict TypeScript, Tailwind v4, shadcn/ui, Motion, Docker + Coolify, SEO and an installable PWA out of the box.
View documentationSupabase Auth with OAuth, magic links and passwordless passkeys, plus TOTP MFA, one-time recovery codes, real device sessions, onboarding and GDPR-compliant account deletion.
View documentationSubscriptions, one-time products, credit packs and multi-currency — plus secure B2C checkout without an account, post-purchase claiming, customer portal, webhook automation and affiliates.
View documentationB2C personal accounts or B2B workspaces with dynamic roles, permissions, invitations and account switching.
View documentationMulti-locale CMS with a WYSIWYG editor, media library, scheduled pg_cron jobs and a webhook handler dashboard.
View documentationURL-based locales (FR/EN), auto-detection, localized components and a pluggable email layer (Brevo, Mailjet).
View documentationOne hue token drives every brand, neutral and chart colour, so a rebrand is one line. Pattern library, manifest-driven navigation, Motion, and contrast measured rather than eyeballed.
View documentationOne command spins up a disposable Supabase stack, seeds member / admin / owner / platform-admin personas, proves the product end to end, then destroys the database. pgTAP covers schema, RLS and grants; Playwright covers the public site, both dashboards and all 43 admin pages, plus real Stripe, chat/SSE and document flows. The same gate runs WCAG 2.2 A/AA in light and dark, 320/768/1280px overflow, a Chromium/Firefox/WebKit matrix, visual baselines and Lighthouse budgets.
View documentationEvery item below is implemented in the codebase, not a roadmap.
Search by stack or product capability, then see how each part is implemented and connected to the rest of the codebase.
See how the App Router, accounts, admin surfaces and production controls form one typed application.
Explore this foundationExplore subscriptions, licences, credits, guest checkout, webhooks and account-scoped entitlements.
Explore this foundationReview the Auth, Postgres, Storage, membership and Row Level Security boundary.
Explore this foundationInspect multi-LLM chat, agents, RAG, credits and the repository context used by AI coding tools.
Explore this foundationDrop a generic starter into Claude Code and it guesses. Drop in Boilerplate-Stack and it already knows the architecture, the conventions and the patterns.
// agent without context
@@ agent with full context
A first-class .claude/ workspace ships in the box. Your agent reads it and immediately works like a senior dev who has been on the team for months.
❯/create-api-endpoint secure, rate-limited route + Zod
❯/stripe-webhook verified Stripe webhook handler
❯/add-translation sync FR + EN locale files
❯@db-architect audit queries for N+1
Works with Claude Code, OpenAI Codex and Cursor.
Slash commands that generate code in your exact conventions.
/create-api-endpointExpert reviewers that audit security, queries and payments.
@security-reviewerLint, type-check and protect sensitive files on every edit.
lint + typecheck on editModular domain rules loaded on demand, per area of the codebase.
database.md · billing.mdThis isn't a boilerplate you read — it's one your agent operates. The .claude/, AGENTS.md and .cursor/rules/ configs ship in the box, so any AI coding tool understands the codebase from the very first prompt.
Grab the repo and install. The full agent workspace — rules, skills, subagents and hooks — comes with the code.
❯git clone … && pnpm installOpen the folder in Claude Code, Cursor or Codex. The agent loads your conventions automatically — zero setup, zero priming.
❯claudeDescribe the feature. The agent writes code that already respects your auth, billing, RLS and i18n patterns — on-pattern, not guessed.
❯add a team invites pageShip a chat assistant in the EU and Article 50 binds you. It is implemented here — and the operator paperwork comes with it.
Article 50 of Regulation (EU) 2024/1689 has applied since 2 August 2026 and was explicitly excluded from the Digital Omnibus deferral. Ceiling: EUR 15,000,000 or 3% of worldwide turnover.
Obligations any product interacting directly with natural persons has to meet.
Implemented in the codebase and verified at runtime, not described in a README.
Editable documents, pre-filled for a stock deployment.
Eight processing activities with legal bases, recipients and retention.
Six risks analysed, residual ratings and the pre-launch mitigations.
Hour-by-hour procedure, plus the SQL that answers the regulator's scoping questions.
Subprocessor register and the customer-DPA clauses this stack can meet.
Deadlines, Annex III self-assessment, env vars and a verification query.
The implementation is done. Classifying your own product's risk tier stays your call — the config makes it explicit instead of assuming it. Direct-provider ZDR stays an account and DPA control on your side: the code sets store: false and the SDK flag, it cannot sign your contract.
Every brand, neutral, sidebar and chart colour derives from a single hue token. Drag it and watch a dashboard change identity — no stylesheet sweep, no find-and-replace.
:root {
--brand-h: 288;
}Tone sits on fills and icons here, every label stays on a foreground token — which is exactly why no hue on this slider can break contrast.
What it costs to build this foundation yourself — versus owning it this afternoon.
A quick tour of what ships in the box — admin, billing, AI and the agent workspace.
No seats. No subscription. No usage metering. Buy it, clone the private repo, ship forever.
For indie hackers & solo developers
For small teams & startups
For agencies & multiple projects
Fair, source-linked comparisons for the SaaS boilerplates appearing in rising related searches on Google Trends.
Compare architecture, payment providers, AI support, project limits and update terms.
Read the comparisonCompare Supabase depth, stack choices, AI runtime, licensing and automated production controls.
Read the comparisonCompare a broad SaaS platform foundation with a lean, reusable Next.js startup starter.
Read the comparisonEverything worth knowing before you buy.
Get the foundation, point your agent at it, and spend your time on the part only you can build.