Back to Projects

CodeReview AI
An AI-powered code review assistant that catches bugs and suggests improvements before your teammates do
Node.jsTypeScriptOpenAI APIGitHub APIPostgreSQLRedisDocker
The Problem
Code reviews are bottlenecks. Senior devs spend hours reviewing PRs, junior devs wait days for feedback. Automated linters catch syntax issues but miss logic bugs and architectural problems.
The Approach
Built a GitHub App that analyzes PRs using GPT-4 with custom prompts trained on best practices. It comments inline on specific lines, suggests refactors, and flags potential bugs. Integrates with existing CI/CD workflows.
The Impact
Reduced average PR review time by 40% in pilot teams. Caught 15+ production bugs before merge. Now used by 3 engineering teams internally.
Build Notes
How It Works
- GitHub webhook triggers on PR open/update
- Fetch diff and file contents
- Chunk code into reviewable segments
- Send to GPT-4 with context-aware prompts
- Parse response and post as inline comments
Prompt Engineering
The secret sauce is in the prompts:
You are a senior engineer reviewing code.
Focus on:
- Logic errors and edge cases
- Security vulnerabilities
- Performance issues
- Code clarity and maintainability
Do NOT comment on:
- Style issues (leave to linters)
- Minor naming preferences
- Things that are clearly intentional
Rate Limiting
Used Redis to queue reviews and respect GitHub API limits.