Enterprise-grade AI code review system powered by Google Gemini
Visual proof of real functionality — authentic and production-ready
AI Code Reviewer is a full-stack web application that leverages Google Gemini AI to provide enterprise-grade automated code reviews.
It features a modern React frontend (Vite) and a robust Node.js/Express backend, fully integrated and deployable on Render.
- 🌐 Live Frontend: ai-code-reviewer-frontend-tlzs.onrender.com
- 💻 GitHub Repo: swarnabha-dutta/AI_Code_Reviewer
Part | Location | Key Files / Folders | Description |
---|---|---|---|
Frontend | /frontend |
src/App.jsx , src/main.jsx |
React SPA for code input and displaying AI feedback |
Backend | /backend |
server.js , src/app.js |
Express server, routing, middleware setup |
Routes | /backend/src/routes/ai.route.js |
— | Defines /ai/get-review POST endpoint |
Controller | /backend/src/controllers/ai.controller.js |
— | API logic, validation, and error handling |
AI Service | /backend/src/services/ai.service.js |
— | Integrates Google Gemini API for analysis |
Configs | /backend/.env , /frontend/.env |
— | Environment variables (API keys, URLs, ports) |
Layer | Flow |
---|---|
Frontend | ① User pastes code → ② Sends POST to /ai/get-review → ③ Displays AI feedback |
Backend | ① Receives request → ② Validates input → ③ Calls AI Service → ④ Returns JSON |
AI Service | ① Sends prompt to Gemini → ② Gets structured review → ③ Returns response |
Deployment | ① Frontend & Backend hosted on Render → ② Env vars managed securely |
- 💡 AI-Powered Code Review via Google Gemini API
- ⚡ Fast Modern UI using React + Vite
- 🔐 Secure RESTful API with CORS and validation
- ☁️ Deployable on Render in one click
- 🧠 Smart feedback on performance, security, and readability
git clone https://github.com/swarnabha-dutta/ai-code-reviewer.git
cd ai-code-reviewer
cd backend
npm install
# Create a .env file
# PORT=4000
# GOOGLE_GEMINI_API_KEY=your_api_key_here
npm start
cd ../frontend
npm install
# Create a .env file
# VITE_BACKEND_URL=http://localhost:4000
npm run dev
-
Backend:
- Type: Web Service
- Root Directory:
backend
- Start Command:
npm start
- Env Vars:
PORT
,GOOGLE_GEMINI_API_KEY
-
Frontend:
- Type: Static Site
- Root Directory:
frontend
- Build Command:
npm install && npm run build
- Publish Directory:
dist
- Env Var:
VITE_BACKEND_URL=<your backend render URL>
POST /ai/get-review
Request:
{
"code": "function hello() { console.log('Hello, world!'); }"
}
Response:
{
"review": "🔴 Critical: Avoid global functions... 🟡 Major: Use const instead of var... 🟢 Minor: Add function JSDoc... 💡 Enhancement: Consider modularization."
}
- Secrets handled via
.env
only - CORS enabled for frontend-backend communication
- Input validation and error handling in controller layer
ai-code-reviewer/
├── backend/
│ ├── server.js
│ ├── package.json
│ ├── src/
│ │ ├── app.js
│ │ ├── controllers/
│ │ │ └── ai.controller.js
│ │ ├── routes/
│ │ │ └── ai.route.js
│ │ └── services/
│ │ └── ai.service.js
│ └── .env.example
│
├── frontend/
│ ├── src/
│ │ ├── assets/
│ │ ├── App.jsx
│ │ ├── index.css
│ │ └── main.jsx
│ ├── public/
│ ├── vite.config.js
│ └── .env.example
│
├── README.md
└── .gitignore
This project is licensed under the ISC License.
💙 Built by Swarnabha Dutta — with Google Gemini & React
```