An advanced, full-stack AI-powered code review application that analyzes code snippets to identify bugs, highlight security vulnerabilities, and suggest architectural improvements using the Google Gemini AI.
- Intelligent Code Analysis: Uses Google's Gemini 2.5 Flash model for deep code inspection.
- Premium User Interface: A highly polished, modern, dark-mode glassmorphism UI with smooth micro-animations.
- Secure Authentication: Role-based access control with stateless JSON Web Tokens (JWT). Users can log in safely using either their username or email address.
- Multi-Language Support: Native editor support for analyzing Java, Python, JavaScript, TypeScript, C++, Go, Rust, Kotlin, and PHP.
- Interactive Code Editor: Integrated Monaco Editor (the engine behind VS Code) directly in the browser.
- Review History Tracking: Stores all past AI reviews in a PostgreSQL database for easy tracking over time.
Frontend
- React 18 (via Vite)
- Axios (API & Interceptors)
- React Router v6 (Protected Navigation Guards)
- Monaco Editor (Browser-based code editing)
- Tailwind CSS / Vanilla CSS (Custom Design System with CSS variables and Glassmorphism effects)
Backend
- Java 17 & Spring Boot 3.4.3
- Spring Security & JWT (Authentication & Authorization)
- Spring Data JPA & Hibernate (ORM)
- PostgreSQL (Relational Database)
- Maven (Dependency Management)
Before you begin, ensure you have met the following requirements:
- Java Development Kit (JDK) 17+ installed.
- Node.js (LTS) & npm installed.
- PostgreSQL database installed and running locally on port
5432. - A Google Gemini API Key.
Create a local PostgreSQL database named aicodereviewer:
CREATE DATABASE aicodereviewer;Ensure your local Postgres instance has a user postgres with the password root. If your setup differs, update the application.properties file in the backend.
- Navigate to the backend directory:
cd backend - Update the
application.propertiesfile (src/main/resources/application.properties) with your API Key:gemini.api.key=YOUR_GEMINI_API_KEY - Run the Spring Boot application (this auto-creates the database tables):
The backend will start on
./mvnw spring-boot:run
http://localhost:8080.
- Open a new terminal and navigate to the frontend directory:
cd frontend - Install the node dependencies:
npm install
- Start the Vite development server:
The frontend will start on
npm run dev
http://localhost:5173.
Authentication (/api/auth)
POST /api/auth/register- Register a new userPOST /api/auth/login- Authenticate and receive JWT
Code Review (/api/review) (Requires Bearer Token)
POST /api/review/code- Submit code snippet for AI analysisGET /api/review/history- Retrieve user's past code reviewsGET /api/review/{id}- Fetch details of a specific review
This project places a heavy emphasis on design. The styling system uses sophisticated dark themes, subtle gradient glows, and standard OS-style window framing for the best possible user experience. All styles are defined natively in index.css.