Hey Cursor Community! ![]()
I’m sharing a production-ready Multi-tenant SaaS Starter designed to solve complex infrastructure hurdles like tenant isolation and granular permissions.
Key Features:
• Next.js 16 (App Router) & Turborepo: Optimized for performance with a server-first architecture.
• Subdomain Isolation: Automated tenant routing (e.g., acme.app.com) via middleware (now know as proxy).
• Hardened Security: Database-level isolation using Supabase RLS, asymmetric JWT Claims, and Custom JWT claim injection that embed organization context into auth tokens.
• Granular RBAC: A 5-tier role hierarchy with 41+ granular capabilities that you can easily extend (e.g., projects.delete).
• Full Stripe Integration: Multi-tier subscriptions, usage tracking, and self-service billing portals.
• Transactional Emails: Branded React Email templates powered by Resend and Supabase Edge Functions.
Tech Stack: Next.js 16, Supabase, Tailwind CSS, Stripe, and Sentry.
This template handles the “hard parts” of b2b SaaS apps like domain routing, auth, and billing so builders can focus on the features that make their app unique.
GitHub: GitHub - steve-piece/subdomain-isolated-turborepo: A multi-tenant Turborepo built with Next.js 16, featuring custom subdomains for each tenant.
Demo: https://marketing-app.com
