How msc24x/hunter works
Main System Components
a) Frontend Layer (Angular Application):
• Main modules: Common, Compete, and Editor
• Services: AuthService, CompetitionsDataService, ScoresDataService
• Code editor component as a central feature
b) Backend Layer (Node.js/TypeScript):
• API Routes (/api/*)
• Authentication system
• Database interaction layer
• Judge service integration
c) Database Layer:
• Prisma ORM
• Main entities: Users, Competitions, Questions, Results
d) Judge System (Showdown):
• Code execution engine
• Language detection
• Test case evaluation
• Compilation service
Component Relationships
• Frontend → Backend: REST API calls with authentication
• Backend → Database: Prisma ORM interactions
• Backend → Judge System: Code execution flow
• Judge System → Backend: Results reporting
Specific Design Elements
Use these visual elements:
Key Workflows to Highlight
a) Competition Creation Flow:
Editor Module → API → Database
b) Code Submission Flow:
Code Editor → API → Judge System → Results → Scoreboard
c) Authentication Flow:
Login Component → Auth Service → GitHub OAuth → Database
Detailed Component Breakdown
Frontend (Angular):
• Common Module
• Components (AppBar, CodeEditor, Scoreboard)
• Pages (Home, Compete, Profile)
• Compete Module
• Competition Components
• Code Submission Interface
• Editor Module
• Competition Management
• Question Editor
Backend (Node.js):
• API Routes
• Auth
• Competition
• Questions
• Results
• Services
• JudgeService
• ScoreboardService
• DatabaseProvider
Technical Stack Indicators
Technology badges for:
• Angular
• Node.js
• Prisma
• PostgreSQL
• Docker
• GitHub OAuth
Remember to emphasize the security aspects of the judge system and the isolation of code execution environments, as these are critical for a competition platform.
This system design should clearly communicate how Hunter handles everything from user authentication to code execution and result tracking in a secure and scalable manner.