8000 GitHub - kupendrav/code-reviewer-pro: Ai powered Code Reviewer · GitHub
[go: up one dir, main page]

Skip to content

kupendrav/code-reviewer-pro

Repository files navigation

🤖 AI Code Reviewer Pro

AI Code Reviewer Next.js Google Gemini Vercel

An intelligent code review assistant powered by Google's Gemini AI — built with Next.js for seamless deployment.

FeaturesQuick StartDeployTech Stack


🎯 Overview

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

✨ Features

  • 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

🛠 Tech Stack

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

📁 Project Structure

├── 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

🚀 Quick Start

Prerequisites

  • Node.js 18+ installed
  • A Google Gemini API keyGet one here

Installation

# 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.local

Edit .env.local and add your API key:

GOOGLE_GEMINI_API=your_google_gemini_api_key_here

Development

npm run dev

Open http://localhost:3000 in your browser.

Production Build

npm run build
npm start

☁️ Deploy to Vercel / Netlify

Vercel (Recommended)

  1. Push your code to GitHub
  2. Go to vercel.com/new and import your repository
  3. Add the environment variable GOOGLE_GEMINI_API in the Vercel dashboard
  4. Click Deploy — done!

Deploy with Vercel

Netlify

  1. Push your code to GitHub
  2. Go to app.netlify.com and import your repository
  3. Set Build command to npm run build and Publish directory to .next
  4. Add the environment variable GOOGLE_GEMINI_API in Site Settings → Environment Variables
  5. Install the Next.js runtime plugin for Netlify
  6. Click Deploy

🔑 Environment Variables

Variable Description Required
GOOGLE_GEMINI_API Google Gemini API key Yes

📝 API Reference

POST /api/review

Sends code to the Gemini AI for review.

Request Body:

{
  "code": "function sum() { return 1 + 1 }"
}

Response: Markdown-formatted review string.


🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is open source and available under the MIT License.

About

Ai powered Code Reviewer

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

0