Skip to content

aanyacloud/ai-code-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 AI Code Analyzer

An AI-powered web application that analyzes source code, detects errors, explains logic, and suggests improvements.

This project is built using Flask and Groq API and is suitable for first-year students as a mini project.


🚀 Features

  • 🔍 Detects programming language
  • 📖 Explains code in simple terms
  • ❌ Finds errors in code
  • 🚀 Suggests improvements
  • ⏱ Shows time & space complexity
  • ⭐ Gives code quality score
  • 📋 Copy improved code easily
  • 🎨 Clean and simple UI

🛠 Technologies Used

  • Python
  • Flask
  • Groq API
  • HTML, CSS
  • JavaScript

📂 Project Structure

ai-code-analyzer/ │ ├── app.py ├── templates/ │ └── index.html ├── static/ │ └── style.css ├── .env └── README.md


⚙️ How to Run the Project

Step 1: Install Dependencies

pip install flask groq python-dotenv
Step 2: Create .env file
GROQ_API_KEY=your_api_key_here
Step 3: Run the App
python app.py
Step 4: Open Browser
http://127.0.0.1:5000
🧪 Sample Input
def add(a, b):
    return a + b
📌 Output Includes
Language detection

Code explanation

Errors (if any)

Improvements

Time & space complexity

Improved code

🎓 Academic Use
✔ Suitable for first-year project
✔ Simple and understandable
✔ Practical implementation
✔ Good for viva and demonstration

🔐 Note
Do not upload your .env file to GitHub.

📌 Author
Aanya Cloud
GitHub: https://github.com/aanyacloud

⭐ Future Improvements
Syntax highlighting

File upload support

PDF report generation

Deployment to cloud

About

AI Code Analyzer built with Flask + Groq API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors