AI Code Reviewer is an intelligent MERN stack-based application (without a database) that allows developers to submit code snippets and receive:
- ✅ Code corrections
- 💡 Optimization suggestions
- 🚀 Best practices and alternative approaches
This tool leverages the Gemini API (Google's GenAI model) to review your code and help you become a better developer, faster.
Layer | Technology |
---|---|
Frontend | React.js, Tailwind CSS |
Backend | Node.js, Express.js |
AI Engine | Gemini API (Google) |
Database | ❌ Not required |
- 🚀 Paste any code (JavaScript, Python, etc.)
- 🤖 Get AI-generated reviews, suggestions, and improvements
- 🧠 Semantic understanding using Gemini AI
- ✨ Clean, responsive, and beginner-friendly UI
- 💬 Shows multiple improvement approaches (if applicable)
- Paste your code in the input area.
- Click on “Review Code”.
- The backend sends the code to the Gemini API.
- Gemini analyzes and returns:
- Fixes for syntax or logic issues
- Optimized and clean code
- Suggested best practices
- All results are displayed on the UI for easy comparison and learning.
git clone https://github.com/your-username/ai-code-reviewer.git
cd ai-code-reviewer
Backend
npm install
Frontend
cd client
npm install
Get your Gemini API key from Google AI Studio.
Create a .env file in server/:
GEMINI_API_KEY=your_api_key_here PORT=5000
Start backend
cd server
nodemon server.js
Start frontend
cd client
npm run dev
Frontend runs on http://localhost:3000 Backend runs on http://localhost:5000
ai-code-reviewer/
├── client/ # React Frontend
│ └── components/
│ └── pages/
│ └── App.js
├── server/ # Express Backend
│ └── routes/
│ └── controllers/
│ └── services/ # Gemini integration logic
│ └── index.js
├── README.md
The code is sent to the Gemini API using a POST request.
Gemini responds with a comprehensive analysis.
The backend formats this response and sends it to the frontend.
Feel free to reach out if you have any questions or suggestions!
Made with ❤️ by Aditya Dhiman