Skip to content

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.

Notifications You must be signed in to change notification settings

abdul-wahab619/AI-Code-Reviewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

git clone https://github.com/abdul-wahab619/ai-code-reviewer.git
cd ai-code-reviewer

2️⃣ Backend Setup

Install dependencies:

cd backend
npm install

Set up .env file:

Create 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_key

Run Prisma Migrations:

npx prisma migrate dev --name init

Start the backend server:

npm start

Backend will run on http://localhost:3000.

3️⃣ Frontend Setup

Install dependencies:

cd frontend
npm install

Start the frontend server:

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

AI Code Reviewer

📝 License

This project is open-source and available under the MIT License.

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published