How mehulmathodia/ai-code-genius works
AI Code Genius Pro is a code-analysis dashboard for developers. A user edits C++ code and starts analysis; the React app sends the code to a FastAPI endpoint, which asks Gemini for a structured analysis and returns the result for display. The main result stages are explanation and Big O complexity, optimized code with rationale, and cross-language translation. The README documents these capabilities, while the sampled backend prompt and frontend show the request and display flow; separate implementation modules for those stages are not evident in the tree.
Main entry points: main.py Code analysis · App.js Analyze workflow
Components 11
Analysis dashboard
- Code editor
frontend/src/App.js - Analyze workflow
frontend/src/App.js - Results dashboard
frontend/src/App.js
Analysis service
- Analyze endpoint
backend/main.py - Request validation
backend/main.py - Code analysis
backend/main.py - Complexity analysis
backend/main.py - Logic refactoring
backend/main.py - Language translation
backend/main.py
AI provider
- Gemini 2.5 Flash
Other components
- Developer
Connections 13
- Developer → Code editor: enters code
frontend/src/App.js - Developer → Analyze workflow: starts analysis
frontend/src/App.js - Code editor → Analyze workflow: updates input
frontend/src/App.js - Analyze workflow → Analyze endpoint: posts code
frontend/src/App.js - Analyze endpoint → Request validation: validates request
backend/main.py - Analyze endpoint → Code analysis: builds prompt
backend/main.py - Code analysis → Gemini 2.5 Flash: requests analysis
backend/main.py - Gemini 2.5 Flash → Code analysis: returns JSON
backend/main.py - Code analysis → Complexity analysis: includes Big O
backend/main.py - Code analysis → Logic refactoring: includes optimized code
backend/main.py - Code analysis → Language translation: includes translation
backend/main.py - Analyze workflow → Results dashboard: renders results
frontend/src/App.js - Analyze endpoint → Analyze workflow: returns response