Next.js + Supabase Standards
A curated collection of 60+ opinionated, production-proven best practices for building full-stack applications with Next.js (App Router) and Supabase.
What's Covered
- Project Structure — Route groups, file naming, component organization
- Data Fetching — Server components, parallel fetches, caching strategies
- Supabase Auth — Client types, middleware, session management
- RLS & Database — Policy patterns, migration best practices
- Server Actions — Auth, validation, error handling
- Component Patterns — Server vs client boundaries, Suspense, error boundaries
- TypeScript — Strict mode, generated types, discriminated unions
- Performance — Image optimization, dynamic imports, bundle analysis
- Error Handling — Error boundaries, structured logging, user-friendly messages
- Security — Input validation, SSRF prevention, CSP headers
- Testing — RLS tests, server action tests, integration patterns
Why These Standards?
These standards are researched from production codebases, official documentation, and community consensus. They represent 2025-2026 best practices — not outdated patterns.
Each rule includes:
- Why it matters
- Good and bad code examples
- Detection hints for automated enforcement
- Effort level to fix