An intelligent code review assistant powered by Google's Gemini AI — built with Next.js for seamless deployment.
Features • Quick Start • Deploy • Tech Stack
AI Code Reviewer Pro is a full-stack Next.js application that leverages Google's Gemini AI to provide comprehensive, intelligent code reviews. The AI acts as a senior developer with 7+ years of experience, analyzing your code for:
- 🐛 Bug Detection — Identifies potential errors and logical flaws
- ⚡ Performance Optimization — Suggests improvements for better efficiency
- 🔒 Security Analysis — Spots common vulnerabilities (XSS, SQL injection, etc.)
- 📖 Best Practices — Recommends industry-standard coding practices
- 🎨 Code Quality — Ensures clean, maintainable, and well-structured code
- 📈 Scalability — Advises on making code adaptable for future growth
- Modern UI — Sleek split-screen editor with real-time syntax highlighting
- Dark / Light Theme — Toggle between themes with persistent preference
- AI-Powered Reviews — Google Gemini 2.0 Flash for rapid, accurate analysis
- Markdown Output — Reviews formatted with headers, code blocks, and lists
- Responsive Design — Works on desktop, tablet, and mobile
- One-Click Deploy — Optimized for Vercel and Netlify
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Frontend | React 19, Prism.js, React Markdown, Rehype Highlight |
| Backend | Next.js API Routes (serverless) |
| AI | Google Gemini 2.0 Flash (@google/generative-ai) |
| Styling | CSS Variables, custom theming |
├── app/
│ ├── api/
│ │ └── review/
│ │ └── route.js # API route — calls Gemini AI
│ ├── components/
│ │ └── CodeReviewer.jsx # Main client component
│ ├── globals.css # Enhanced theme & styles
│ ├── layout.js # Root layout with metadata
│ └── page.js # Home page
├── public/ # Static assets
├── .env.local # Environment variables (not committed)
├── .env.example # Example env file
├── next.config.mjs # Next.js configuration
└── package.json
- Node.js 18+ installed
- A Google Gemini API key — Get one here
# Clone the repository
git clone https://github.com/your-username/code-reviewer-pro.git
cd code-reviewer-pro
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env.localEdit .env.local and add your API key:
GOOGLE_GEMINI_API=your_google_gemini_api_key_herenpm run devOpen http://localhost:3000 in your browser.
npm run build
npm start- Push your code to GitHub
- Go to vercel.com/new and import your repository
- Add the environment variable
GOOGLE_GEMINI_APIin the Vercel dashboard - Click Deploy — done!
- Push your code to GitHub
- Go to app.netlify.com and import your repository
- Set Build command to
npm run buildand Publish directory to.next - Add the environment variable
GOOGLE_GEMINI_APIin Site Settings → Environment Variables - Install the Next.js runtime plugin for Netlify
- Click Deploy
| Variable | Description | Required |
|---|---|---|
GOOGLE_GEMINI_API |
Google Gemini API key | Yes |
Sends code to the Gemini AI for review.
Request Body:
{
"code": "function sum() { return 1 + 1 }"
}Response: Markdown-formatted review string.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.