How yashksaini-coder/leetcode-journal works
Main Components
a) Frontend Layer:
• Next.js Application (app directory structure)
• UI Components (/components directory)
• Client-side State Management (store/AuthStore)
• Theme System (components/theme-provider.tsx)
b) Backend Layer:
• Next.js API Routes (/app/api)
• Authentication System (/app/api/auth)
• LeetCode Integration (/app/api/leetcode)
• GraphQL Queries (GQL_Queries directory)
c) Database Layer:
• Supabase (Primary database)
• Prisma ORM (prisma directory)
d) External Services:
• LeetCode API Integration
• Authentication Service (Supabase Auth)
• Vercel Deployment
[Client Layer]
• ↓ ↑
[Application Layer]
• ↓ ↑
[Data Layer]
Detailed Component Relationships
Frontend Components:
[Landing Page] → [Dashboard] → [Profile]
• ↓
[Authentication Pages]
• ↓
[Blog System] → [FAQ Section]
Backend Services:
[Next.js API Routes]
• ↙ ↓ ↘
[Auth] [LeetCode] [User]
• ↓ ↓ ↓
[Supabase + Prisma Database]
Important Architectural Patterns to Highlight
• App Router Pattern (Next.js 13+ structure)
• API Route Controllers (/api/leetcode/controllers)
• Server-side and Client-side Components
• Database Schema (prisma/schema.prisma)
Key Integration Points
• Authentication flow between frontend and Supabase
• LeetCode API data flow
• Demonstrate blog content management system
• User data flow through the system
Additional Elements
Specific features:
• AI Agent integration
• Progress tracking system
• Analytics pipeline
• Problem categorization system
• Component types
• Data flow directions
• Authentication boundaries
• External service integrations
This system design should emphasize the modern Next.js architecture while showing how the application integrates with Supabase, Prisma, and the LeetCode API to provide its core functionality of tracking and analyzing users' LeetCode progress.