How suraj-9849/lms works
High-Level Architecture Components
a) Client Layer
• Next.js Frontend (Pages and Components)
• Authentication UI
• Course Management Interface
• Video Player Interface
b) Server Layer (API Routes)
• Authentication Services
• Course Management
• Payment Processing
• Video Management
c) Data Layer
• PostgreSQL Database (via Prisma ORM)
• AWS S3 (Video Storage)
d) External Services
• Stripe Payment Gateway
• AWS Services
Component Relationships
Frontend → API Layer:
• RESTful API routes (/api/*)
• Authentication flow
• Course management operations
• Payment processing flow
API Layer → Services:
• Database operations through Prisma
• File storage operations to AWS S3
• Payment processing through Stripe
Detailed Component Breakdown
Frontend Components:
• Dashboard Layout
• Course Management
• Video Player
• Authentication Forms
• User Profile
API Routes (Group by functionality):
• Auth Routes (/api/auth/*)
• Course Routes (/api/course/*)
• Payment Routes (/api/payment/*)
• Video Management Routes (/api/upload-video/*)
Database Layer:
• User Model
• Course Model
• Video Model
• Payment/Purchase Model
Key Flows to Highlight
a) Authentication Flow:
• Sign up/Login process
• JWT token handling
• Session management
b) Course Creation Flow:
• Course creation
• Video upload to S3
• Course publication
c) Purchase Flow:
• Course purchase
• Stripe integration
• Access management
Technical Details
Framework Specific:
• Next.js 13+ App Router
• API Routes structure
• Server Components vs Client Components
Security Layer:
• JWT Authentication
• Bcrypt password hashing
• Access control
Database Layer:
• Prisma Schema
• PostgreSQL tables
• Relationships between entities