How tirthmewada/strategy-frontend works
Main System Components
a) Client-Side (Frontend):
• Next.js App Router structure
• UI Components layer
• Authentication flow components
• Dashboard features
b) Server-Side:
• API Routes
• Authentication services
• Middleware handling
┌─ Client Layer ─────────────────────┐
• Pages │
• Public (/, /login, /signup) │
• Protected (/dashboard/*) │
• Components │
• UI Components │
• Feature Components │
• ┘
┌─ Middleware Layer ────────────────┐
• Auth Middleware │
• Route Protection │
• ┘
┌─ Server Layer ──────────────────┐
• API Routes │
• Auth Routes │
• Services │
• Auth Service │
• ┘
Key Relationships to Highlight
• Authentication flow between components
• Protected route access patterns
• API communication paths
• Component hierarchy
Implementation Details
Technical aspects:
• Next.js 13+ App Router
• Server-side API routes
• Client-side components
• Authentication services
• UI component library integration
Data Flow Patterns
Flows:
User → Auth Flow → Protected Routes
↓
API Routes ↔ Auth Service
↓
Protected Resources