Skip to content

Repository files navigation

🤖 AI Code Reviewer

🔥 Build a complete AI-Powered Code Reviewer using Python, Gemini API, Static Analysis, Radon & Streamlit in just one project!

📌 Part of: Super Sunday Project Series 🚀

  • 👉 New AI/ML project every Sunday
  • 👉 Learn by building real-world applications
  • 👉 Beginner Friendly + Industry Level Concepts

[Watch Full Video](https://youtu.be/YOUR_VIDEO_LINK)


⭐ Support & Follow

If this project helps you:

  • ⭐ Star this repository
  • 👨‍💻 Follow me on GitHub for more AI projects
  • 📺 Subscribe to my YouTube Channel
  • 🚀 Share this project with your friends

🎥 Project Overview

An intelligent AI Code Reviewer built using Python, Gemini API, Static Analysis, Radon & Streamlit.

Instead of simply checking whether your code runs, this application performs a detailed review of your Python code by combining traditional code analysis techniques with the power of Google's Gemini AI.

The system helps developers and students:

✅ Detect syntax errors
✅ Analyze code complexity
✅ Measure maintainability
✅ Perform static code analysis
✅ Generate AI-powered code reviews
✅ Suggest best coding practices
✅ Improve code readability and quality


✨ Features

🤖 AI Code Review

  • Gemini API integration
  • Intelligent code analysis
  • AI-generated suggestions
  • Code optimization recommendations

🛡️ Syntax Checker

  • Detect syntax errors instantly
  • Highlight invalid Python code
  • Beginner-friendly error messages

📊 Code Complexity Analysis

  • Cyclomatic Complexity
  • Maintainability Index
  • Complexity grading
  • Function-wise analysis

🔍 Static Code Analysis

  • Detect unused variables
  • Find potential issues
  • Analyze function structure
  • Improve code quality

💡 AI Suggestions

  • Performance improvements
  • Readability enhancements
  • Best coding practices
  • Clean code recommendations

⚡ Streamlit Dashboard

  • Modern UI
  • Interactive code editor
  • Instant analysis
  • Beautiful report generation

📸 Application Preview

🏠 Home Dashboard

Screenshot 2026-07-24 131654

✍️ Improvements

Screenshot 2026-07-24 132141

📊 Complexity Analysis

Screenshot 2026-07-24 132159 Screenshot 2026-07-24 132302

🤖 AI Review Report

Screenshot 2026-07-24 132320 Screenshot 2026-07-24 132333

🚀 Getting Started

📌 Prerequisites

Before running this project, install:

  • Python 3.10+
  • pip
  • Gemini API Key

⚙️ Installation

1️⃣ Clone Repository

git clone https://github.com/YOUR_USERNAME/AI-Code-Reviewer.git

2️⃣ Move to Project Folder

cd AI-Code-Reviewer

3️⃣ Install Required Libraries

pip install -r requirements.txt

4️⃣ Configure Gemini API

Create a .env file inside the project directory.

GEMINI_API_KEY=YOUR_API_KEY

5️⃣ Run the Application

streamlit run app.py

🧠 AI Workflow

Step 1

User writes or pastes Python code.

⬇️

Step 2

Syntax Checker validates the code.

⬇️

Step 3

Static Analyzer examines the program structure.

⬇️

Step 4

Radon calculates:

  • Cyclomatic Complexity
  • Maintainability Index

⬇️

Step 5

Gemini API reviews the complete code.

⬇️

Step 6

Final AI Review Report is generated.


📊 Analysis Features

✅ Syntax Validation

✅ Static Code Analysis

✅ Cyclomatic Complexity

✅ Maintainability Index

✅ AI-Based Code Review

✅ Performance Suggestions

✅ Best Practice Recommendations

✅ Clean Code Guidance


🛠️ Technologies Used

Technology Purpose
Python Core Programming
Streamlit Web Application
Gemini API AI Code Review
Radon Complexity Analysis
AST Static Code Analysis
Streamlit Ace Code Editor
Google GenAI SDK Gemini Integration

📂 Project Structure

AI-Code-Reviewer/
│
├── app.py
├── reviewer.py
├── complexity.py
├── static_analysis.py
├── syntax_checker.py
├── utils.py
├── test.py
├── requirements.txt
├── README.md
└── .gitignore

📈 Code Quality Metrics

The application evaluates:

  • Cyclomatic Complexity
  • Maintainability Index
  • Syntax Validation
  • Static Analysis
  • Code Readability
  • AI Quality Score
  • Performance Suggestions

🎯 Learning Outcomes

By building this project, you will learn:

✅ Streamlit Dashboard Development

✅ Gemini API Integration

✅ Prompt Engineering

✅ Static Code Analysis using AST

✅ Cyclomatic Complexity

✅ Maintainability Index

✅ Code Quality Analysis

✅ Python Project Structure

✅ Environment Variables (.env)

✅ AI Application Development


🌟 Future Improvements

  • Multi-language support
  • GitHub Repository Review
  • PDF Review Report
  • Code Security Analysis
  • AI Bug Detection
  • Code Refactoring Suggestions
  • Docker Support
  • Authentication System
  • Team Collaboration
  • Cloud Deployment

☁️ Deployment

Deploy this application using:

  • Streamlit Community Cloud
  • Render
  • Railway
  • Hugging Face Spaces
  • Azure App Service
  • AWS EC2

🤝 Contributing

Contributions are always welcome!

If you'd like to improve this project:

  1. Fork this repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to GitHub
  5. Open a Pull Request

📜 License

This project is licensed under the MIT License.


👨‍💻 Developed By

Mahesh Verma

🚀 AI/ML Educator | Full Stack Developer | Content Creator

📺 YouTube: Study Trigger

📸 Instagram: https://www.instagram.com/studytrigger/

🔗 LinkedIn: https://www.linkedin.com/in/studytrigger/

💻 GitHub: https://github.com/YOUR_USERNAME


⭐ If You Like This Project

Please support by:

⭐ Starring this repository

🍴 Forking the project

📺 Subscribing to Study Trigger

🤝 Sharing with your friends

💬 Giving your valuable feedback


🔥 Super Sunday Project Series

🚀 Every Sunday = One New Real-World AI/ML Project

Recent Projects:

  • 📊 Student Result Analysis System
  • 💰 Smart Expense Tracker
  • 🧹 Data Cleaning Tool
  • 🤖 AI Interview Preparation System
  • 🛒 Smart Shopping Decision Assistant
  • 📈 Sales Prediction System
  • 🤖 AI Code Reviewer

Stay Connected ❤️

Happy Coding! 🚀

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages