How rfwilliams11/pick-em works
Main Components
A. Client-Side (Frontend):
• Next.js App Router Structure
• Auth Routes (/login, /signup)
• Dashboard Routes (/picks, /admin)
• Public Routes
• UI Components Layer (shadcn/ui components)
• Context Providers (AuthContext)
B. Server-Side (Backend):
• API Routes Layer (Next.js API routes)
• Authentication System (NextAuth.js)
• Database Layer (likely PostgreSQL with Drizzle ORM)
┌─ Client Layer ─────────────────┐
• Next.js Pages │
• React Components │
• UI Components │
• ┬───────────────────┘
• ↕ (HTTP/API Calls)
┌─ Server Layer ─────────────────┐
• API Routes │
• Authentication Middleware │
• Business Logic │
• ┬───────────────────┘
• ↕ (Database Queries)
┌─ Data Layer ──────────────────┐
• PostgreSQL Database │
• Drizzle ORM │
• ┘
Key Relationships to Highlight
a. Authentication Flow:
• Session management between client and server
b. Game Management Flow:
• Admin routes → Games API → Database
• Picks submission flow: User → Picks API → Database
c. Data Access Patterns:
• How the dashboard accesses game data, user records, and picks
• Real-time updates if implemented
Specific Implementation Details
Project-specific elements:
┌─ Feature Modules ──────────────┐
• Game Management │
• Pick Submission │
• User Records │
• Leaderboard │
• ┘
┌─ Database Schema ─────────────┐
• Users │
• Games │
• Picks │
• Teams │
• Rounds │
• ┘