AI Code Reviewer is a full-stack web application that integrates Google Gemini AI to intelligently analyze and review code in real time. It empowers developers by offering instant, AI-driven feedback on code quality, potential bugs, optimization opportunities, and best practices β all in a beautifully designed interface. Built with modern web technologies, the platform provides a seamless editing and reviewing experience for developers seeking rapid, actionable insights into their code.π
- βοΈ React (with Vite) β UI library for building interactive interfaces
- π React Markdown β For rendering markdown-formatted AI responses
- π PrismJS β Syntax highlighting in the code editor
- βοΈ React Simple Code Editor β Lightweight code editor component
- π‘ Axios β HTTP client for API communication
- π rehype-highlight β Syntax highlighting for markdown code blocks
- π¨ CSS β Custom styling for a modern, responsive UI
- π’ Node.js β JavaScript runtime
- π Express β Web server framework
- π€ @google/genai β Google Gemini AI SDK for code review
- π CORS β Middleware to enable cross-origin requests
- π dotenv β For environment variable management
This project follows a standard full-stack application structure, clearly separating frontend and backend concerns.
code-review/
βββ backend/ # Backend server built with Node.js and Express
β βββ .env # Environment variables (e.g., API keys, port)
β βββ package.json # Backend dependencies and scripts
β βββ server.js # Entry point for the Node.js backend server
β βββ src/ # Source code for the backend application
β βββ app.js # Express application setup and middleware
β βββ controllers/ # Handles request logic for AI interactions
β β βββ ai.controller.js # Controller for AI code review requests
β βββ routes/ # Defines API endpoints
β β βββ ai.routes.js # Routes specifically for AI services
β βββ services/ # Contains business logic and external API calls
β βββ ai.service.js # Service for interacting with Google Gemini AI
βββ Frontend/ # Frontend application built with React and Vite
βββ package.json # Frontend dependencies and scripts
βββ vite.config.js # Vite configuration for the React app
βββ index.html # Main HTML file for the frontend
βββ src/ # Source code for the React application
βββ App.jsx # Main React component
βββ App.css # Styles for the App component
βββ main.jsx # Entry point for the React application
βββ index.css # Global styles for the frontend
Follow these steps to run the project locally on your machine.
git clone https://github.com/joshi-jyoti/AI-Code-Reviewer
cd code-reviewcd backend
npm install
# Add your Google Gemini API key to .env as:
# GOOGLE_GEMINI_KEY=your_google_gemini_api_key
npx nodemoncd ../Frontend
npm install
npm run devGet started with the AI Code Reviewer in a few simple steps:
- βοΈ Write or paste code in the left editor panel.
- π Click "Review" to send your code to the AI reviewer.
- π The right panel will then display a detailed, markdown-formatted review, including:
- Strengths of your code
- Identified issues
- Suggested fixes
- General suggestions for improvement
Our AI Code Reviewer comes packed with powerful features to enhance your coding workflow:
- π€ Real-time code review using Google Gemini AI, providing immediate insights.
- π Syntax-highlighted code editing and review, making your code easy to read and understand.
- π» Professional, readable UI designed for an intuitive and pleasant user experience.
- β Actionable, structured feedback that helps you understand and implement improvements efficiently.