How mc-bench/mc-bench-frontend works
Main Components
A. Frontend Layer (React + TypeScript):
• Subdivide into key feature modules based on the components structure:
• Authentication (Auth components)
• Models Management
• Generations
• Prompts
• Runs
• Templates
• Samples
B. Backend Services:
• Main API Service (Port 8000)
• Admin API Service (Port 8001)
• Worker Services
C. Infrastructure Components:
• PostgreSQL Database
• Redis Message Queue
• MinIO Object Storage
• GitHub OAuth (External Service)
Component Relationships and Data Flow
• Frontend → API Services (REST/HTTP)
• API Services → PostgreSQL (Data persistence)
• API Services → Redis (Message queue)
• API Services → MinIO (Object storage)
• Workers ← Redis (Message consumption)
• Workers → MinIO (Asset processing)
• Frontend ↔ GitHub OAuth (Authentication flow)
Specific Implementation Details
For the Frontend section, highlight:
• Context-based state management (AuthContext)
• Protected routes architecture
• Component hierarchy
• Type definitions structure
For the Backend section, emphasize:
• API service separation (Main vs Admin)
• Worker architecture
• Database interactions
• File storage patterns
[Client Layer (Browser)]
• ↓
[Frontend Application Layer]
• ↓
[API Services Layer]
• ↓
[Infrastructure Layer]