How code100x/cms works
Main Components
a) Frontend Layer:
• Next.js Application (React)
• Client-side Components (/src/components)
• Server Components (app directory structure)
• Authentication UI (/src/components/auth)
• Admin Dashboard (/src/app/admin)
• Video Player Components
• Search Interface
b) API Layer:
• Next.js API Routes (/src/app/api)
• Authentication Endpoints
• Course Management
• Video Management
• Discord Integration
• GitHub Integration
• Mobile API Endpoints
c) Database Layer:
• PostgreSQL Database (indicated by Prisma usage)
• Prisma ORM Layer
• Cache Layer (Redis and In-memory caching)
d) External Services:
• Discord Integration
• GitHub OAuth
• Video Storage/Streaming
• Google Analytics
• Notion Integration
[Client Layer]
• ↕
[API/Server Layer]
• ↕
[Data Layer]
Key Relationships to Highlight
a) Authentication Flow:
• NextAuth.js integration
• OAuth providers (GitHub, Discord)
• Session management
b) Content Delivery:
• Video streaming pipeline
• Course content delivery
• PDF handling
• Certificate generation
c) Data Flow:
• Prisma ORM interactions
• Caching mechanisms
• Search functionality
Infrastructure Elements
• Docker containers
• Development vs Production environments
• Database migrations
• Cache layers
Specific Implementation Details
• Video player implementation
• Certificate verification system
• Bookmark system
• Comment system
• Search functionality
• Calendar integration
Additional Notes
• Version control workflow
• CI/CD pipeline (.github/workflows)
• Security boundaries
• Public vs protected routes
• Error handling paths
This system design should emphasize the modern Next.js app router architecture while showing how it integrates with various services and handles different types of content (video, PDF, certificates) through a unified interface.