Skip to content

AIReviewMate is an AI-powered code reviewer that analyzes code in real time, suggests improvements, highlights issues, and enables seamless GitHub PR integration for developers.

Notifications You must be signed in to change notification settings

AppajiDheeraj/AIReviewMate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AIReviewMate โ€” Real-time AI Code Review Platform

AIReviewMate Logo

License Next.js Node.js PostgreSQL DrizzleORM OpenAI Status Contributions PRs Platform


๐ŸŽฅ Live Demo

Watch the Supademo


๐Ÿ“น Project Video

Watch the Project Video


๐Ÿง  Overview

AIReviewMate is a modern AI-driven code review platform that streamlines the process of analyzing, improving, and maintaining code quality across multiple languages. Built with a microservices architecture, it provides real-time insights, GitHub integration, and secure authentication for teams and individual developers.

The goal is to empower developers to focus on logic and creativity while the AI ensures efficiency, maintainability, and consistency.


๐Ÿ—๏ธ System Architecture Overview

---
config:
theme: neutral
look: handDrawn
---
flowchart TD
U["๐Ÿ‘ค User"] --> F["๐ŸŒ Frontend (Next.js Dashboard)"]
F --> G["๐Ÿšช API Gateway"]
G --> A["๐Ÿ” Auth Service"]
G --> L["๐Ÿง  LLM Service"]
G --> H["๐Ÿ’ณ Credits Service"]
G --> N["๐Ÿ“ฃ Notify Service"]
G --> R["๐Ÿ™ GitHub Service"]


L -->|Uses| O["๐Ÿค– OpenAI API"]
H --> D["๐Ÿ—„๏ธ PostgreSQL DB (Drizzle ORM)"]
A --> D
R --> D
N --> D


F -.-> L
F -.-> R


classDef service fill:#111111,stroke:#333,stroke-width:2px;
classDef external fill:#111111,stroke:#666,stroke-width:1px,stroke-dasharray: 5 5;


class G,A,L,H,N,R service;
class O,D external;


subgraph Services
A
L
H
N
R
end


subgraph External Dependencies
O
D
end
Loading

Sequence Flow Diagram

sequenceDiagram
    participant U as User / Frontend
    participant AG as API Gateway (Express + Proxy)
    participant Auth as Auth Service
    participant Credits as Credits Service
    participant LLM as LLM Service
    participant GitHub as GitHub Service
    participant Notify as Notify Service
    participant DB as Shared Postgres DB

    %% Signup Flow
    U->>AG: POST /api/auth/signup
    AG->>Auth: Forward signup request
    Auth->>DB: Insert user record
    DB-->>Auth: Confirmation
    Auth-->>AG: Signup response + JWT
    AG->>Notify: Send welcome email
    AG-->>U: Response with user + token

    %% Login Flow
    U->>AG: POST /api/auth/login
    AG->>Auth: Forward login request
    Auth->>DB: Validate user credentials
    DB-->>Auth: User data
    Auth-->>AG: JWT + user data
    AG->>Notify: Optional login alert email
    AG-->>U: Response with user + token

    %% Code Review Flow
    U->>AG: POST /api/llm/review
    AG->>LLM: Forward code for review
    LLM-->>AG: Return code review suggestions
    AG->>Credits: Deduct 5 credits
    AG-->>U: Return suggestions + improved code

    %% GitHub Commit Flow
    U->>AG: POST /api/github/commit
    AG->>GitHub: Forward commit request
    GitHub-->>AG: Commit confirmation
    AG->>Credits: Deduct 10 credits
    AG->>Notify: Commit success email
    AG-->>U: Response with commit URLs

    %% Pull Request Flow
    U->>AG: POST /api/github/pull-request
    AG->>GitHub: Forward PR request
    GitHub-->>AG: PR confirmation / URL
    AG->>Credits: Deduct 10 credits
    AG->>Notify: PR created email
    AG-->>U: Response with PR URL
Loading

๐Ÿงฉ Microservice Breakdown

Service Responsibility Tech Stack
API Gateway Central entry point. Routes and validates requests across services. Node.js, Express.js
Auth Service Handles registration, login, JWT tokens, and bcrypt-based hashing. Node.js, Express, JWT
LLM Service Core AI engine communicating with OpenAI to analyze and generate categorized reviews. Node.js, OpenAI API
GitHub Service Integrates with GitHub for repo fetching, PR creation, and commit-based analysis. Octokit, Node.js
Credits Service Manages usage-based limits, tracks API consumption per user. Express.js, PostgreSQL
Notify Service Sends emails and alerts for reviews, updates, or plan expiry. NodeMailer, MicroQueue
Shared DB (Drizzle) Unified schema layer for relational data persistence. PostgreSQL, Drizzle ORM

๐Ÿš€ Key Features

๐Ÿง  Intelligent AI Review Engine

  • Multi-language code analysis (C++, Python, JS, TS, Java, etc.)

  • Generates categorized improvement feedback:

    • โš™๏ธ Best Practices
    • ๐Ÿชฒ Bug Detection & Fixes
    • ๐ŸŽฏ Optimization Suggestions
    • ๐Ÿงฉ Readability & Maintainability

๐Ÿชถ Developer Experience Focused

  • Real-time code editing & AI review panel.
  • Syntax highlighting, dark/light themes.
  • Export reviewed code or open PR directly.

๐Ÿ›ก๏ธ Authentication & Security

  • JWT-based authentication.
  • Role-based route protection.
  • Secure hashing with bcrypt.

๐Ÿงฑ Modular & Scalable

  • Each service runs independently.
  • Dockerized deployment with shared network.
  • Easy scaling and fault isolation.

โš™๏ธ Tech Stack

Category Technology
Frontend Next.js 15, React 19, TailwindCSS, ShadCN/UI
Backend Node.js, Express.js, Microservices Architecture
Database PostgreSQL + Drizzle ORM
AI Engine OpenAI GPT Models
Auth & Security JWT, bcrypt, CORS
Version Control GitHub API (Octokit)
Notifications NodeMailer, Custom Webhooks
Deployment Docker, Vercel / Railway / Render

๐Ÿงฉ Folder Structure

appajidheeraj-aireviewmate-slofy/
โ”œโ”€โ”€ apps/
โ”‚   โ”œโ”€โ”€ frontend/          # User Dashboard (Next.js + ShadCN)
โ”‚   โ””โ”€โ”€ landing-page/      # Marketing Site
โ”œโ”€โ”€ services/
โ”‚   โ”œโ”€โ”€ api-gateway/       # API routing hub
โ”‚   โ”œโ”€โ”€ auth-service/      # JWT-based authentication
โ”‚   โ”œโ”€โ”€ credits-service/   # Usage and credits management
โ”‚   โ”œโ”€โ”€ github-service/    # GitHub integration and PR automation
โ”‚   โ”œโ”€โ”€ llm-service/       # AI code analysis using OpenAI
โ”‚   โ””โ”€โ”€ notify-service/    # Email and notification service
โ””โ”€โ”€ shared/
    โ””โ”€โ”€ db/                # Drizzle ORM schema, migrations & connection

๐Ÿงฐ Setup & Installation

1๏ธโƒฃ Clone Repository

git clone https://github.com/appajidheeraj/aireviewmate.git
cd appajidheeraj-aireviewmate-slofy

2๏ธโƒฃ Install Dependencies

cd apps/frontend && npm install
cd ../../services/auth-service && npm install #Similarly for all microservices

3๏ธโƒฃ Environment Configuration

Create .env files for each microservice:

OPENAI_API_KEY=sk-xxxx
DATABASE_URL=postgresql://user:pass@localhost:5432/aireviewmate
JWT_SECRET=supersecretkey
GITHUB_TOKEN=ghp_xxxxxx

4๏ธโƒฃ Start All Services

npm run dev        #For frontend
nodemon server.js  #For microservices

๐Ÿ” Workflow

  1. Frontend sends code snippets to API Gateway.
  2. API Gateway authenticates request and routes to LLM Service.
  3. LLM Service analyzes code using OpenAI API and categorizes feedback.
  4. Response is stored via Credits Service (for tracking usage).
  5. Notify Service optionally sends notifications.
  6. Frontend Dashboard displays structured AI suggestions.

๐Ÿ“Š Data Flow Diagram

User โ”€โ–ถ Frontend (Next.js) โ”€โ–ถ API Gateway โ”€โ–ถ Auth Svc / LLM Svc / GitHub Svc
                                              โ”‚
                                              โ–ผ
                                         PostgreSQL DB

๐Ÿงญ API Endpoints

Endpoint Method Description
/api/review POST Submit code snippet for AI review
/api/auth/signup POST Create new user account
/api/auth/login POST Authenticate user
/api/github/pr POST Create GitHub PR with reviewed code
/api/credits GET Check remaining credit usage

๐ŸŽฌ Demo & Screenshots

  • Frontend Dashboard:

  • Code Review Panel:

  • PR Integration:

(Placeholders for GIFs and demo videos can be added here)

๐Ÿ“š References & Inspirations

  • Monaco Editor & React integration

  • Code diff visualization techniques (CodeGrid)

  • Neon DB + Drizzle ORM for relational database handling

  • YouTube tutorials on microservices and AI integration

  • GSAP for smooth UI/UX transitions

  • OpenAI structured prompt examples


๐Ÿ”ฎ Roadmap

  • Collaborative Multi-user Code Review
  • LLM Fine-tuning for Specific Languages
  • VS Code Extension Integration
  • Advanced Usage Analytics Dashboard
  • AI Code Explanation Narrator (Voice Support)

๐Ÿง‘โ€๐Ÿ’ป Author

Appaji Dheeraj

Building tools that empower developers through AI โœจ

๐ŸŒ LinkedIn ยท ๐Ÿ™ GitHub


๐Ÿ“œ License

This project is licensed under the MIT License.


โญ If you find this project helpful, consider giving it a star!

About

AIReviewMate is an AI-powered code reviewer that analyzes code in real time, suggests improvements, highlights issues, and enables seamless GitHub PR integration for developers.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages