Production-grade Next.js 16 + Supabase starter. Auth, RLS, i18n, rate limiting, tests, CI, Docker β all wired up. Ship from day 1.
Most "Next.js + Supabase" boilerplates give you auth and stop there. This one ships with the boring-but-critical plumbing every real app needs β so you can focus on what makes yours different.
Email + Microsoft SSO. Role-based access via JWT app_metadata synced
server-side. Non-spoofable client-side.
next-intl with FR/EN routing, locale switcher, and all generic UI keys already translated.
Sliding window per IP and route. In-memory by default, Upstash-ready for serverless. RFC-compliant headers.
DB-backed flags with a React hook. Toggle features without redeploying. Audit-friendly.
JSON in production, colored in dev. Named events. Parseable by Datadog, Vercel Log Drain, etc.
Vitest unit suite + Playwright E2E. All green on day 1. Tests for the middleware included.
CSP env-aware (strict in prod), HSTS, X-Frame-Options, Referrer-Policy, Permissions-Policy. Open-redirect protection.
GitHub Actions (lint + typecheck + test + build + E2E). Multi-stage Docker (node 22-alpine). Weekly grouped dep bumps.
# Option 1 β Click "Use this template" on GitHub.
# Option 2 β Clone manually
git clone https://github.com/levyan76/nextjs-supabase-starter.git my-app
cd my-app
rm -rf .git && git init -b main
cp .env.local.example .env.local
# Edit .env.local β at minimum: NEXT_PUBLIC_APP_NAME, Supabase URL + keys
npm install
# Local Supabase (requires Docker)
npx supabase start
npx supabase db reset
npm run dev
# β http://localhost:3000
# Set up the first admin at: http://localhost:3000/setup
role synced server-side via Postgres trigger β non-spoofable.?redirect= parameter./setup route is idempotent β blocked after the first admin is created.