How simplesphere/simple-nextjs-boilerplate works
Main Components
A. Frontend Layer:
• Next.js Application (Core)
• App Router (shown by the [locale] directory structure)
• Client Components
• Server Components
• UI Component Library
• Radix UI Components
• Custom UI Components (from src/components/ui)
• State Management & Forms
• React Hook Form
• Zod Validation
B. Middleware Layer:
• Next.js Middleware (src/middleware.ts)
• Internationalization Handler (next-intl)
• Authentication Flow
C. Backend Integration:
• Supabase Services
• Authentication
• Database
• Real-time subscriptions (if used)
┌─────────────────────────────────────────────────────────┐
• Client Layer (Browser) │
• ┘
• ↕
┌─────────────────────────────────────────────────────────┐
• Next.js Application │
• ┬─────────────────┬────────────────────────┤
• App Router │ Components │ Utilities │
• (/src/app) │ (/src/comp.) │ (/src/utils, /hooks) │
• ┴─────────────────┴────────────────────────┘
• ↕
┌─────────────────────────────────────────────────────────┐
• Middleware Layer │
• ┬────────────────┬─────────────────────┤
• Auth Handler │ i18n Router │ API Middleware │
• ┴────────────────┴─────────────────────┘
• ↕
┌─────────────────────────────────────────────────────────┐
• Supabase Backend │
• ┬────────────────┬─────────────────────┤
• Auth Service │ Database │ Real-time Events │
• ┴────────────────┴─────────────────────┘
Additional Elements
• Build/Deploy Pipeline
• Development Tools (ESLint, Prettier, Husky)
• Static Asset Handling
• Environment Configuration