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.
---
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
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
| 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 |
-
Multi-language code analysis (C++, Python, JS, TS, Java, etc.)
-
Generates categorized improvement feedback:
- โ๏ธ Best Practices
- ๐ชฒ Bug Detection & Fixes
- ๐ฏ Optimization Suggestions
- ๐งฉ Readability & Maintainability
- Real-time code editing & AI review panel.
- Syntax highlighting, dark/light themes.
- Export reviewed code or open PR directly.
- JWT-based authentication.
- Role-based route protection.
- Secure hashing with bcrypt.
- Each service runs independently.
- Dockerized deployment with shared network.
- Easy scaling and fault isolation.
| 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 |
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
git clone https://github.com/appajidheeraj/aireviewmate.git
cd appajidheeraj-aireviewmate-slofycd apps/frontend && npm install
cd ../../services/auth-service && npm install #Similarly for all microservicesCreate .env files for each microservice:
OPENAI_API_KEY=sk-xxxx
DATABASE_URL=postgresql://user:pass@localhost:5432/aireviewmate
JWT_SECRET=supersecretkey
GITHUB_TOKEN=ghp_xxxxxxnpm run dev #For frontend
nodemon server.js #For microservices- Frontend sends code snippets to API Gateway.
- API Gateway authenticates request and routes to LLM Service.
- LLM Service analyzes code using OpenAI API and categorizes feedback.
- Response is stored via Credits Service (for tracking usage).
- Notify Service optionally sends notifications.
- Frontend Dashboard displays structured AI suggestions.
User โโถ Frontend (Next.js) โโถ API Gateway โโถ Auth Svc / LLM Svc / GitHub Svc
โ
โผ
PostgreSQL DB
| 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 |
-
Frontend Dashboard:
-
Code Review Panel:
-
PR Integration:
(Placeholders for GIFs and demo videos can be added here)
-
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
- 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)
Appaji Dheeraj
Building tools that empower developers through AI โจ
This project is licensed under the MIT License.
โญ If you find this project helpful, consider giving it a star!

