AI-powered GitHub Pull Request reviewer built with Next.js, BullMQ, Redis, Groq LLMs, and distributed worker infrastructure.
GitReview AI automatically analyzes GitHub Pull Requests using an asynchronous AI pipeline.
The system fetches PR diffs, parses changed files, runs semantic code analysis using LLMs, aggregates findings, and generates structured review reports.
The architecture is intentionally designed like a production distributed system instead of a simple synchronous AI wrapper.
- AI-powered GitHub Pull Request analysis
- Asynchronous distributed review pipeline
- BullMQ + Redis queue architecture
- Background worker processing
- Real-time frontend polling
- Structured PR review reports
- Risk level scoring
- Semantic issue detection
- Queue observability with Bull Board
- Production deployment on Vercel + Render
- Persistent report storage with PostgreSQL
- Next.js 16
- React
- TypeScript
- Tailwind CSS
- React Hook Form
- Zod
- BullMQ
- Redis (Upstash)
- PostgreSQL (Neon)
- Drizzle ORM
- Express
- Groq API
- LLM-powered semantic code analysis
- Vercel (Frontend + API)
- Render (Worker Service)
User submits GitHub PR
↓
Next.js API validates request
↓
Job added to BullMQ queue
↓
Redis persists queued job
↓
Worker service consumes job
↓
Pipeline stages execute
• Fetching
• Parsing
• Analyzing
• Aggregating
• Complete
↓
Results stored in PostgreSQL
↓
Frontend polls status endpoint
↓
Review report rendered
The worker fetches:
- Pull Request metadata
- Changed files
- Git diffs
- Repository information
using the GitHub API.
The raw diff is cleaned and chunked into structured reviewable units.
This stage prepares code changes for semantic AI analysis.
Each chunk is analyzed using Groq-hosted LLMs.
The AI model looks for:
- Bugs
- Security issues
- Performance problems
- Maintainability concerns
- Reliability risks
Each finding includes:
- Severity
- File path
- Line number
- Description
- Suggested fix
AI findings are combined into:
- Final summary
- Risk level
- Metrics
- Structured findings list
The review is stored in PostgreSQL and exposed through report APIs.
The frontend automatically redirects to the final report page after polling detects completion.
GitReview AI uses BullMQ + Redis for asynchronous processing.
Benefits of this architecture:
- Non-blocking frontend UX
- Persistent jobs
- Retry handling
- Worker scalability
- Fault tolerance
- Distributed processing
Bull Board is integrated for queue observability.
Dashboard includes:
- Queue depth
- Active jobs
- Completed jobs
- Failed jobs
- Processing metrics
The worker includes structured operational logs for:
- Stage execution
- Pipeline timing
- Slow review detection
- Queue processing visibility
Example structured log:
{
"event": "stage_completed",
"stage": "analyzing",
"reviewId": "abc123",
"durationMs": 4210
}git clone https://github.com/aakash811/GitReview.git
cd GitReviewpnpm installCreate:
.env
Required variables:
AUTH_SECRET=
AUTH_GITHUB_ID=
AUTH_GITHUB_SECRET=
DATABASE_URL=
REDIS_URL=
UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=
GROQ_API_KEY=
GITHUB_TOKEN=
NEXT_PUBLIC_APP_URL=pnpm db:pushpnpm devServices:
- Frontend → http://localhost:3000
- Worker → http://localhost:3001
- Bull Board → http://localhost:3000/admin/queues
Hosted on Vercel.
Responsibilities:
- UI rendering
- API routes
- Authentication
- Queue job creation
- Status polling
Hosted on Render.
Responsibilities:
- Queue consumption
- AI analysis
- Pipeline execution
- Bull Board dashboard
- Worker health monitoring
Example findings generated by the system:
- Potential null pointer exception
- Unsafe array access
- Performance bottlenecks
- Missing validation
- Maintainability concerns
Each finding contains:
- Severity
- File path
- Line number
- Explanation
- Suggested fix
This dashboard provides operational visibility into:
- Queue depth
- Active jobs
- Failed jobs
- Completed jobs
- Processing throughput
- Worker health
It demonstrates the distributed asynchronous infrastructure powering the review pipeline.
- Multi-model AI evaluation
- GitHub OAuth private repo support
- Inline PR comments
- Vector-based code retrieval
- Incremental PR reviews
- Streaming AI analysis
- Team dashboards
- Webhook-triggered reviews
Most AI projects stop at synchronous chat interfaces.
GitReview AI focuses on:
- Distributed systems
- Background processing
- Queue-based architectures
- Production observability
- Infrastructure design
- AI-driven semantic code review
The goal was to build a production-style engineering system rather than a simple AI demo.
Aakash Borse
GitHub: https://github.com/aakash811


