AI Code Refactoring Assistant
An intelligent web application that uses AI to automatically refactor and improve source code.
Team Members
Project Overview
This application helps developers improve their code by using AI to refactor it. Users can paste code or upload files, and receive a cleaner, more maintainable version along with explanations of the changes.
This is a team project following Agile methodology for a software engineering course.
Features (In Development)
- Text input for code submission
- File upload capability
- AI-powered code refactoring using Google Gemini API
- Side-by-side comparison of original and refactored code
- Explanation of changes made
Technology Stack
Frontend:
Backend:
AI:
Project Structure
code-refactoring-app/
├── backend/
│ ├── app.py
│ ├── requirements.txt
│ ├── .env
│ └── venv/
├── frontend/
│ └── index.html
└── uploads/
Installation
Prerequisites
- Python 3.8+
- Git
- Google Gemini API key
Setup Steps
- Clone the repository
git clone https://github.com/your-username/code-refactoring-app.git
cd code-refactoring-app
- Set up backend
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
- Create .env file in backend folder
GEMINI_API_KEY=your_api_key_here
PORT=5000
- Run the application
- Open frontend/index.html in your browser
Usage
- Open the application in your browser
- Paste your code or upload a file
- Click “Refactor Code”
- View the improved code and explanation
Development Timeline
- Sprint 1 (Weeks 3-4): Basic UI and backend setup
- Sprint 2 (Weeks 5-7): AI integration
- Sprint 3 (Weeks 8-9): Polish and explanations
- Sprint 4 (Weeks 10-11): Testing and final demo
Current Status
Currently in active development. Core features are functional but undergoing testing and refinement.
Contributing
This is a class project. Team members should:
- Create a feature branch for new work
- Commit changes regularly with clear messages
- Test before pushing to main branch
Notes
- Keep your API key secure - never commit .env file
- Supported file types: .txt,.js,.py,.java,.cpp,.c,.cs,.php,.html,.css,.json,.xml,.rb,.swift
License
This project is for educational purposes as part of a software engineering course.