An intelligent web application that leverages the Google Gemini API to provide instant, expert-level code reviews. Paste your code and receive detailed feedback on quality, best practices, performance, and potential bugs, just as you would from a senior developer.

- Interactive Code Editor: A clean, simple code editor with JavaScript syntax highlighting powered by PrismJS.
- Expert AI Analysis: The backend uses Google's
gemini-2.0-flashmodel with a detailed system instruction to act as a Senior Code Reviewer with 7+ years of experience. - Comprehensive Feedback: The review covers:
- Code Quality & Best Practices
- Efficiency & Performance Bottlenecks
- Error Detection & Security Vulnerabilities
- Readability & Maintainability
- Adherence to DRY & SOLID principles
- Formatted Output: The AI's response is rendered as Markdown, preserving code blocks, lists, and other formatting for easy reading.
- Modern Tech Stack: Built with a React/Vite frontend and a Node.js/Express backend.
Follow these instructions to get the project up and running on your local machine.
- Node.js (v18.x or later recommended)
- npm or yarn
- A Google Gemini API Key. You can get one from Google AI Studio.
For this guide, we'll assume your project is structured with separate frontend and backend directories.
First, let's configure and run the backend server.
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install
-
Create an environment file: Create a file named
.envin thebackendroot directory. -
Add your API key to the
.envfile:# .env GOOGLE_GEMINI_KEY="YOUR_GOOGLE_GEMINI_API_KEY"
Replace
YOUR_GOOGLE_GEMINI_API_KEYwith your actual key. -
Start the backend server:
npm start
The server should now be running on
http://localhost:3000.
Now, let's get the React frontend running.
-
Open a new terminal and navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start the frontend development server:
npm run dev
The React application should now be running and accessible at
http://localhost:5173(or another port if 5173 is busy).
- Open your web browser and navigate to the frontend URL (e.g.,
http://localhost:5173). - You will see a code editor on the left and an empty review panel on the right.
- Paste or write any JavaScript code snippet into the editor.
- Click the "Review" button.
- The application will send your code to the backend, which queries the Gemini API.
- The AI-generated code review will appear in the right-hand panel, formatted for readability.
Contributions are welcome! If you have suggestions for improvements, please feel free to fork the repository, create a new branch, and submit a pull request.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.