https://github.com/abdul-wahab619/ai-code-reviewer
AI Code Reviewer is a web app that reviews and suggests improvements for code using AI. Built with React, Express, Node.js, MySQL, and Prisma ORM, it integrates Google Gemini Flash 2.0 API for AI-powered code analysis. Users can register, submit code for review, update past reviews.
https://github.com/abdul-wahab619/ai-code-reviewer
abdulwahab ai expressjs gemini-api mern mysq nodejs prisma-orm reactjs
Last synced: 3 months ago
JSON representation
AI Code Reviewer is a web app that reviews and suggests improvements for code using AI. Built with React, Express, Node.js, MySQL, and Prisma ORM, it integrates Google Gemini Flash 2.0 API for AI-powered code analysis. Users can register, submit code for review, update past reviews.
- Host: GitHub
- URL: https://github.com/abdul-wahab619/ai-code-reviewer
- Owner: abdul-wahab619
- Created: 2025-02-13T07:36:10.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-02-13T07:51:08.000Z (3 months ago)
- Last Synced: 2025-02-13T08:34:06.562Z (3 months ago)
- Topics: abdulwahab, ai, expressjs, gemini-api, mern, mysq, nodejs, prisma-orm, reactjs
- Language: JavaScript
- Homepage:
- Size: 0 Bytes
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# AI Code Reviewer
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**.
## 🚀 Features
- **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**## 🛠️ Tech Stack
### Frontend:
- React.js
- Tailwind CSS
- React Router
- Axios
- Prism.js (for code highlighting)### Backend:
- Node.js
- Express.js
- Prisma ORM
- MySQL
- JWT (Authentication)
- Bcrypt.js (Password Hashing)### AI Integration:
- Google Gemini Flash 2.0 API
## 📌 Installation & Setup
### 1️⃣ Clone the Repository
```sh
git clone https://github.com/abdul-wahab619/ai-code-reviewer.git
cd ai-code-reviewer
```### 2️⃣ Backend Setup
#### Install dependencies:
```sh
cd backend
npm install
```#### Set up `.env` file:
Create a `.env` file in the **backend** directory with the following variables:
```env
DATABASE_URL=mysql://root:password@localhost:3306/code-reviewer
JWT_SECRET=your_secret_key
GEMINI_API_KEY=your_gemini_api_key
```#### Run Prisma Migrations:
```sh
npx prisma migrate dev --name init
```#### Start the backend server:
```sh
npm start
```Backend will run on `http://localhost:3000`.
### 3️⃣ Frontend Setup
#### Install dependencies:
```sh
cd frontend
npm install
```#### Start the frontend server:
```sh
npm run dev
```Frontend will run on `http://localhost:5173`.
## 📡 API Endpoints
### **Auth Routes**
| Method | Route | Description |
| ------ | -------------- | -------------------- |
| POST | /auth/register | Register a new user |
| POST | /auth/login | Login user & get JWT |### **AI Review Routes**
| 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 |## 📷 Screenshots

## 📝 License
This project is open-source and available under the [MIT License](LICENSE).