How manangandhi1810/online-ide works
Main Components
a) Client Layer:
• React.js Frontend (Port 8000/5173)
• Key features: Code Editor, Authentication UI, Problem Viewer, Leaderboard
• Integration with Shadcn/UI and Monaco Editor
b) API Layer:
• Express.js Backend (Port 3000)
• Split into distinct service routes:
• Authentication
• Code Execution
• Problem Statements
• Editorials
• Leaderboard
• User Management
c) Database Layer:
• PostgreSQL with Prisma ORM
• Redis for caching and messaging
d) Execution Layer:
• Docker Container Management
• Code Runner Service
• Python Executor
e) External Services:
• CloudFlare Workers AI (LLaMA 3.1 8B)
• Resend Email Service
• GitHub OAuth
Relationship Flows to Highlight
a) Authentication Flow:
• JWT-based auth
• Email verification
• OTP handling
• Password reset flow
b) Code Execution Flow:
• Code submission
• Docker container creation
• Test case verification
• Result processing
c) Data Flows:
• Problem statement delivery
• Editorial management
• Leaderboard updates
• Points system
Specific Design Elements
Use the following visual elements:
[Client Layer]
• ↓
[API Gateway/Backend Layer]
• ↓
[Service Layer (Auth, Code, Problems)]
• ↓
[Data Layer (PostgreSQL, Redis)]
• ↓
[Execution Layer (Docker)]
Important Details
a) Security Measures:
• Rate limiting
• Sandboxed execution
• JWT authentication
• Email verification
b) Performance Features:
• Redis caching
• Docker container management
• Streaming AI responses
c) Integration Points:
• AI Assistant integration
• Email service
• OAuth providers
• Docker API
Technical Specifications
• Supported languages (Python, C, C++, Java)
• Points system rules
• Resource limits for code execution
• Authentication token lifecycle
Remember to indicate the stateful vs stateless components, and show how the system handles concurrent code executions through the Docker container management system.