How rajatabcx/cms works
Main Components
a) Frontend Layer:
• Next.js Application (src/app directory structure)
• Client-side Components (src/components)
• State Management (src/store using atoms)
• Client Actions (src/actions)
b) Backend Layer:
• API Routes (src/app/api)
• Authentication System (NextAuth)
• Database Layer (Prisma ORM)
c) External Services:
• Discord Integration
• Notion Integration
• Google Analytics
• Video Storage/CDN (implied by video player components)
Key Architectural Elements
a) Core Features to Highlight:
• Course Management System
• Video Player with DRM
• User Authentication & Authorization
• Comment System
• Bookmark System
• Search Functionality
• Admin Dashboard
b) Data Flow Patterns:
• Server Actions (src/actions)
• API Routes (src/app/api)
• Database Interactions (Prisma)
Client Layer (Browser)
• ▼
Frontend Layer (Next.js)
• ▼
Backend Layer (API Routes & Server Actions)
• ▼
Database Layer (PostgreSQL via Prisma)
• ▼
External Services Layer
Important Connections
• User flow through authentication
• Content delivery pipeline
• Admin management workflows
• Integration points with Discord and Notion
• Database relationships (based on Prisma schema)
Implementation Details
• Rectangles: Main services
• Hexagons: External services
• Diamonds: Decision points
Key Relationships to Emphasize
• User → Authentication → Protected Routes
• Admin → Content Management → Database
• Video Player → Content Delivery → Storage
• Comments/Bookmarks → User Interactions → Database
Additional Elements
A section showing:
• Docker container architecture
• Development vs Production environments
• Caching mechanisms
• Error handling flow
• User Interface Layer
• Application Logic Layer
• Data Persistence Layer
• External Integration Layer
• Infrastructure Layer
Remember to:
• Use consistent styling
• Brief descriptions for complex flows
• Both synchronous and asynchronous operations
This system design should capture the full scope of the CMS while maintaining clarity and providing valuable architectural insights for both development and deployment considerations.