How smaranvelpula/ai-code-reviewer-gemini works
This is an AI-powered code-review web app. A developer edits source in the React interface and submits it; the backend validates the code, numbers its lines, and asks Gemini for a structured Markdown review, which the interface displays. The runtime is a small React-to-Express request path with a prompt/model layer. The README describes syntax, logic, bug, efficiency, and best-practice feedback; the sampled service prompt also requests security review and improved code. No persistent database is shown. Arrows are limited to relationships visible in excerpts or documented in the README.
Main entry points: App.jsx Editor and submit · app.js Express app · ai.routes.js Review route · ai.controller.js Review controller
Components 10
Review interface
- React entry
Frontend/src/main.jsx - Editor and submit
Frontend/src/App.jsx - Markdown renderer
Frontend/src/App.jsx
HTTP backend
- HTTP server
BackEnd/server.js - Express app
BackEnd/src/app.js - Review route
BackEnd/src/routes/ai.routes.js - Review controller
BackEnd/src/controllers/ai.controller.js
AI review
- Prompt and code review
BackEnd/src/services/ai.service.js
Other components
- Developer
- Gemini API
Connections 10
- Developer → Editor and submit: edits and submits
Frontend/src/App.jsx - React entry → Editor and submit: renders
Frontend/src/main.jsx - Editor and submit → Markdown renderer: renders review
Frontend/src/App.jsx - Editor and submit → Express app: POSTs code
Frontend/src/App.jsx - Express app → Review route: mounts at /ai
BackEnd/src/app.js - HTTP server → Express app: starts
BackEnd/server.js - Review route → Review controller: dispatches review
BackEnd/src/routes/ai.routes.js - Review controller → Prompt and code review: requests review
BackEnd/src/controllers/ai.controller.js - Prompt and code review → Gemini API: generates review
BackEnd/src/services/ai.service.js - Express app → Editor and submit: returns response
Frontend/src/App.jsx