An AI-powered code analysis platform that provides instant, intelligent code reviews with advanced token compression technology. Built with Next.js 16, React 19, and powered by Google's Gemini AI and ScaleDown compression.
- π€ AI-Powered Analysis - Advanced code review using Google Gemini 2.5 Flash
- β‘ Smart Compression - Up to 70% token reduction with ScaleDown technology
- π Security First - Comprehensive security vulnerability detection
- π Quality Scoring - Automated code quality assessment (0-100 scale)
- π¨ Multi-Language Support - JavaScript, TypeScript, Python, Java, C++, Go, Rust
- π Real-time Feedback - Instant analysis as you code
- π° Cost Savings - Reduced API costs through intelligent compression
- π Dark Mode - Beautiful UI with light and dark themes
- π± Responsive Design - Works seamlessly on desktop, tablet, and mobile
- Node.js 20.x or higher
- npm, yarn, pnpm, or bun
- Google Gemini API key (Get one here)
- ScaleDown API key - optional but recommended (Get one here)
- Clone the repository
git clone https://github.com/pratham-prog861/code-review-agent.git
cd code-review-agent- Install dependencies
npm install- Set up environment variables
cp .env.example .env.localEdit .env.local and add your API keys:
GEMINI_API_KEY=your_gemini_api_key_here
SCALEDOWN_API_KEY=your_scaledown_api_key_here- Run the development server
npm run dev- Open your browser
Navigate to http://localhost:3000
- Paste your code into the editor
- Select the programming language (JavaScript, TypeScript, Python, etc.)
- Choose review depth:
- Quick Scan - Fast, focuses on critical issues (5-10s)
- Standard Review - Balanced analysis (10-20s) β Recommended
- Deep Analysis - Comprehensive review (20-40s)
- Toggle compression to save on API costs (recommended)
- Click "Review Code" and get instant feedback!
// Paste this code to try it out
async function fetchUser(id) {
const response = await fetch(`/api/users/${id}`);
return response.json();
}You'll receive:
- β Quality score (e.g., 75/100)
- π΄ Critical issues (security, bugs)
β οΈ Warnings (best practices)- π‘ Suggestions (improvements)
- π Token usage statistics
- Framework: Next.js 16 (App Router)
- UI Library: React 19
- Language: TypeScript 5
- Styling: Tailwind CSS 4
- Components: shadcn/ui (Radix UI)
- AI: Google Gemini 2.5 Flash
- Compression: ScaleDown API
- Icons: Lucide React
Comprehensive documentation is available in the docs/ folder:
- π Getting Started - Detailed installation and setup
- β‘ Features - Complete feature overview
- ποΈ Architecture - Technical architecture and design
- π API Reference - API endpoints and usage
- βοΈ Configuration - Environment variables and settings
- π User Guide - How to use the application
- π€ Contributing - Guidelines for contributors
- π§ Troubleshooting - Common issues and solutions
| Language | Focus Areas |
|---|---|
| JavaScript | ES6+, async/await, memory leaks, XSS prevention |
| TypeScript | Type safety, generics, null handling, React/Next.js patterns |
| Python | PEP 8, type hints, exception handling, security |
| Java | OOP principles, Stream API, concurrency, Spring Boot |
| C++ | Memory management, RAII, STL, move semantics |
| Go | Goroutines, error handling, interfaces, idiomatic patterns |
| Rust | Ownership, borrowing, lifetimes, unsafe code |
- Speed: 5-10 seconds
- Focus: Critical bugs and syntax errors only
- Best For: Rapid feedback, pre-commit checks
- Speed: 10-20 seconds
- Focus: Bugs, style, best practices, performance
- Best For: Regular development workflow
- Speed: 20-40 seconds
- Focus: Architecture, security, performance, edge cases
- Best For: Production code, security audits
- β Your code is never stored on our servers
- β All communication is encrypted via HTTPS
- β API keys are stored securely in environment variables
- β No third-party tracking or analytics
- β Client-side processing for maximum privacy
With ScaleDown compression enabled:
Without Compression:
1,000 reviews/month Γ 2,000 tokens = 2M tokens
Cost: ~$20/month
With Compression (70% savings):
1,000 reviews/month Γ 600 tokens = 600K tokens
Cost: ~$6/month
Monthly Savings: $14 π°# Install Vercel CLI
npm i -g vercel
# Deploy
vercel
# Set environment variables
vercel env add GEMINI_API_KEY
vercel env add SCALEDOWN_API_KEYWe welcome contributions! Please see our Contributing Guide for details.
# Fork and clone
git clone https://github.com/pratham-prog861/code-review-agent.git
# Install dependencies
npm install
# Create feature branch
git checkout -b feature/amazing-feature
# Make changes and commit
git commit -m "feat: add amazing feature"
# Push and create PR
git push origin feature/amazing-featurenpm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLintThis project is licensed under the MIT License - see the LICENSE file for details.
If you find this project helpful, please consider giving it a star on GitHub!
Made with β€οΈ by Pratham Darji