AI Code Reviewer is a web application that allows users to submit code and receive AI-generated reviews. The project is built using React, Express, Node.js, MySQL, and Prisma ORM. The AI reviews are powered by Google Gemini Flash 2.0 API.
- User Authentication (Register/Login) using JWT & bcrypt
- AI-Powered Code Review using Google Gemini Flash 2.0 API
- Code Editor with syntax highlighting
- View & Manage Past Reviews
- Secure API with Token-Based Authentication
- Professional UI using Tailwind CSS
- React.js
- Tailwind CSS
- React Router
- Axios
- Prism.js (for code highlighting)
- Node.js
- Express.js
- Prisma ORM
- MySQL
- JWT (Authentication)
- Bcrypt.js (Password Hashing)
- Google Gemini Flash 2.0 API
git clone https://github.com/abdul-wahab619/ai-code-reviewer.git
cd ai-code-reviewercd backend
npm installCreate a .env file in the backend directory with the following variables:
DATABASE_URL=mysql://root:password@localhost:3306/code-reviewer
JWT_SECRET=your_secret_key
GEMINI_API_KEY=your_gemini_api_keynpx prisma migrate dev --name initnpm startBackend will run on http://localhost:3000.
cd frontend
npm installnpm run devFrontend will run on http://localhost:5173.
| Method | Route | Description |
|---|---|---|
| POST | /auth/register | Register a new user |
| POST | /auth/login | Login user & get JWT |
| Method | Route | Description |
|---|---|---|
| POST | /ai/get-review | Submit code & get AI review |
| GET | /ai/past-prompts | Get past reviews |
| DELETE | /ai/past-prompts/:id | Delete a past review |
| PUT | /ai/past-prompts/:id | Update a past review |
This project is open-source and available under the MIT License.
