How learnathon-by-geeky-solutions/xtradrill works
Main System Components
a) Client-Side (Frontend):
• Next.js Application Layer
• Authentication Components (Clerk integration)
• Dashboard Interface
• Landing Page
• Client-side Layout Components
b) Server-Side:
• API Routes Layer
• Webhook Handlers
• MongoDB Database Layer
• Authentication Service (Clerk)
┌─ Client Layer ─────────────────┐
• ┌─ Pages ──┐ ┌─ Components ─┐ │
• Landing │ │ Header │ │
• Dashboard│ │ Sidebar │ │ ┌─ External Services ─┐
• Auth │ │ Layout │ │ │ Clerk Auth │
• ┘ └─────────────┘ │ └──────────┬─────────┘
• API Layer ─────────────────┤ │
• ┌─ Routes ─┐ ┌─ Webhooks ─┐ │◄──────────────┘
• /api │ │ /clerk │ │
• ┘ └───────────┬─┘ │
• Server Layer ──────────┼────┤
• ┌─ Actions ─┐ │ │
• User │◄─────────┘ │
• ┬──────┘ │
• ┌────▼──────┐ │
• Models │ │
• ┬──────┘ │
• ┌────▼──────┐ │
• MongoDB │ │
• ┘ │
• ┘
Key Relationships to Highlight
a) Authentication Flow:
• How sign-in/sign-up pages connect to Clerk
• Webhook integration from Clerk to your API
• Demonstrate user data flow to MongoDB
b) Application Structure:
• Relationship between pages and components
• API routes and their connection to actions
• Database model relationships
Important Implementation Details
Technical aspects:
• Next.js 13+ App Router structure
• API routes under app/api
• MongoDB connection through mongoose
• Clerk authentication integration
• Server actions in lib/actions