★ OPEN SOURCE BOILERPLATE
Clone our battle-tested Next.js 15+ SaaS starter!
INQ Fox mascot coding on laptop

Enterprise SaaS
Starter Kit.

Stop wasting 2 weeks configuring auth, database relations, multi-tenancy, and payment webhooks. Clone the battle-tested Next.js 15+ + Supabase SSR + Stripe foundation we use for production client sprints.

100% OPEN SOURCE ON GITHUBMIT LICENSE

Enterprise Multi-Tenant Next.js 15+ SaaS Starter Kit

A production-ready open-source Next.js SaaS starter engineered with zero placeholders, strict TypeScript safety, Supabase SSR HttpOnly cookie authentication, multi-tenant organization workspaces, cryptographic Stripe webhook idempotency, RFC 7807 problem details APIs, token-bucket rate limiting, and an Obsidian Dark aesthetic.

1-Minute Quickstart:
$git clone https://github.com/inqgamerz48/INQ-STUDIOS-NEXTJS-SAAS-STARTER-KIT.git my-saas-app
$cd my-saas-app
$npm install
$cp .env.example .env.local
$npx prisma db push
$npx prisma generate
$npm run dev
Included Production Dependencies:
✓ Next.js 15+ (App Router)✓ React 19 (Server Actions)✓ TypeScript (Strict Mode)✓ Tailwind CSS v4 & Framer Motion✓ Supabase SSR (@supabase/ssr)✓ PostgreSQL Row-Level Security (RLS)✓ Prisma ORM (Direct & Pooler URLs)✓ Stripe Subscriptions & Webhooks✓ RFC 7807 Standard Error APIs✓ Token-Bucket Rate Limiter✓ SHA-256 Constant-Time API Keys✓ Resend & React Email
READY FOR PRODUCTION

What's Inside the Boilerplate

Every feature is wired with strict TypeScript types, server actions, and error handling.

#1

Multi-Tenant Workspaces & RBAC

Organization switcher, member invitations, role-based access control (Admin, Member, Owner), and tenant-isolated database models.

#2

Supabase SSR HttpOnly Cookie Auth

Enterprise session management using @supabase/ssr with HttpOnly, SameSite=Lax cookies refreshed at Edge middleware. Zero client-side auth blinks.

#3

PostgreSQL Row-Level Security (RLS)

True database-level tenant isolation ensuring every query is strictly filtered by organization membership through Postgres RLS policies.

#4

Cryptographic Stripe Webhooks & Idempotency

Validates raw request bytes with HMAC signatures and deduplicates events inside an ACID stripe_events table to prevent double-crediting.

#5

RFC 7807 APIs & Token-Bucket Rate Limiting

Standardized Problem Details envelopes ({ type, title, status, detail, traceId }) plus edge-ready sliding window rate limiting with standard HTTP headers.

#6

Constant-Time SHA-256 Machine API Keys

Generates high-entropy API tokens (sk_live_...), stores them as SHA-256 hashes, and uses crypto.timingSafeEqual() to eliminate timing attacks.

#7

System Telemetry & Structured JSON Logger

Non-blocking JSON logger with trace IDs, real-time memory metrics (heapUsedMB, rssMB), uptime tracking, and database latency checks.

#8

Obsidian Dark Design & Spring Physics

Tailored design tokens, interactive terminal, Bento grid permissions simulator, and spring physics micro-interactions.

Folder Architecture
INQ-STUDIOS-NEXTJS-SAAS-STARTER-KIT/
├── src/
│   ├── actions/          # React 19 Server Actions ('use server')
│   │   ├── auth.ts       # Login, Signup, Magic link, Sign out
│   │   ├── billing.ts    # Stripe Checkout sessions & Customer portal
│   │   ├── organization.ts# Multi-tenant creation, invite member, org switch
│   │   └── user.ts       # Profile updates, SHA-256 API key generation
│   ├── app/              # Next.js App Router
│   │   ├── (auth)/       # Auth route group (Login, Signup, Verify)
│   │   ├── (dashboard)/  # Protected multi-tenant dashboard & settings
│   │   ├── api/
│   │   │   ├── v1/
│   │   │   │   ├── health/       # RFC 7807 Health & memory telemetry
│   │   │   │   ├── organizations/# RESTful organization management
│   │   │   │   └── api-keys/     # RESTful machine tokens
│   │   │   └── webhooks/stripe/  # Raw body HMAC verified Stripe webhook
│   │   ├── globals.css   # Design tokens & Obsidian Dark theme
│   │   ├── layout.tsx    # Root layout with SEO & JSON-LD schemas
│   │   └── page.tsx      # High-converting SaaS landing page
│   ├── components/       # Dashboard, Landing, UI component library
│   ├── lib/              # Supabase SSR, Prisma, Stripe, Rate Limiter, Logger
│   └── middleware.ts     # Edge session token refresh & route protection
├── prisma/
│   └── schema.prisma     # PostgreSQL schema with indexes & relations
├── supabase/
│   └── migrations/       # PostgreSQL RLS policies & tables
└── .env.example          # Environment configurations
Required Environment Keys
DATABASE_URLRequired
PostgreSQL connection string with pgbouncer pooling
DIRECT_URLRequired
Direct PostgreSQL connection for Prisma migrations
NEXT_PUBLIC_SUPABASE_URLRequired
Supabase project API endpoint URL
NEXT_PUBLIC_SUPABASE_ANON_KEYRequired
Supabase public anonymous client key
SUPABASE_SERVICE_ROLE_KEYRequired
Supabase administrative server key for elevated operations
STRIPE_SECRET_KEYRequired
Stripe secret key for checkout & subscription billing
STRIPE_WEBHOOK_SECRETRequired
Stripe webhook HMAC signing secret (whsec_...)
NEXT_PUBLIC_APP_URLRequired
Canonical app URL for redirects (e.g. http://localhost:3000)
RESEND_API_KEYOptional
Resend API key for transactional emails
EMAIL_FROMOptional
Verified sender email address (e.g. SupaSaaS <support@domain.com>)
LOCAL SIMULATION

Local Stripe Webhook Testing

Simulate end-to-end checkout sessions, card events, and invoice webhooks on your local machine.

Report Bug or Feature
$stripe listen --forward-to localhost:3000/api/webhooks/stripe
BESPOKE CUSTOMIZATION

Want us to customize this starter for your MVP?

We take this starter and build out your custom business logic, UI design tokens, database models, and integrations in 3 weeks.

Book Custom Sprint
Chat on WhatsApp