How harshit27gupta/algo_project works
Project Type and Purpose
• From the file‐tree and README we see a “client” (React/Vite), “server” (Node/Express/MongoDB) and a separate “Compiler” service (Node scripts for C/C++/Java execution).
• It’s a full-stack online judge platform: users interact via the web UI, the backend handles auth, problems, submissions and persistence, and the Compiler service compiles/runs code in isolation.
High-Level Architecture
• Three core components, each running in its own container:
a. Frontend (client) – React app served by Nginx
b. Backend API – Express.js app with controllers, models, middleware, MongoDB persistence
c. Compiler Service – lightweight microservice exposing endpoints to compile & run code
• Supporting services:
• MongoDB for data storage (users, problems, submissions, stats)
• External OAuth (Google) & AI (Gemini) APIs
• (Optional) Redis for caching/rate-limiting
Detail & Clarity
• Include:
• Component names & responsibilities
• Data flows with arrowheads and labels (e.g., “User code + metadata”)
• Authentication flow: Login → JWT issuance → Protected endpoints
• AI hint/chat workflow: Frontend → aiController → Gemini API → Frontend