How hawaii66/enskilda-killer works
High-Level Architecture Components
a) Client Layer:
• Next.js Frontend (React components)
• Admin Dashboard
• Public Pages
• Authentication UI
b) Server Layer:
• Next.js API Routes
• Middleware
• Server-Side Components
c) External Services:
• Clerk (Authentication)
• Supabase (Database)
• Vercel (Hosting/Deployment)
• Axiom (Monitoring/Analytics)
Detailed Component Breakdown
a) Frontend Structure:
• Component hierarchy
• Shared UI components
• Context providers (GameState, AllUsers, etc.)
b) API Layer:
• API routes by function:
• Admin APIs (/api/admin/*)
• Game APIs (/api/game/*)
• User APIs (/api/user/*)
c) Data Flow:
• Authentication flow with Clerk
• Database interactions with Supabase
• State management through contexts
Key Relationships to Highlight
Critical interactions:
a) Authentication Flow:
• Microsoft Integration → Clerk → Application
• Middleware verification
• Admin access control
b) Game Logic Flow:
• Player management
• Kill reporting
• Litigation system
• Circle management
c) Data Management:
• Supabase database interactions
• Backup system
• State management
• Player tracking