Intelligent code analysis and automated bug injection system powered by advanced AI technology
- 🚀 Frontend: https://code-review-and-bug-generator-front.vercel.app/
- ⚙️ Backend API: https://code-review-and-bug-generator-backend-2.onrender.com
This platform is an AI-driven code analysis and bug injection tool designed to help developers, QA engineers, and software teams improve code quality and test robustness. It leverages cutting-edge artificial intelligence to automatically review code, identify potential issues, and generate realistic bugs for testing purposes.
✅ Automated Code Review - Instantly analyze code snippets to detect bugs, security vulnerabilities, code smells, and best practice violations
✅ Intelligent Bug Injection - Generate realistic bugs with customizable types, severity levels, and quantities for comprehensive testing
✅ Code Quality Metrics - Get detailed metrics including quality scores, security ratings, bug density, and issue distribution
- Software Developers - Get instant code reviews and improve code quality before deployment
- QA Engineers - Generate realistic test cases and edge-case scenarios automatically
- Code Reviewers - Streamline the review process with AI-assisted analysis
- Students & Learners - Understand common coding mistakes and best practices
- Tech Teams - Establish consistent code quality standards across projects
Receive comprehensive issue reports with:
- Issue title, type, and severity level (Low, Medium, High, Critical)
- Exact line numbers where issues occur
- Detailed descriptions of each problem
- Actionable suggestions for fixes
Get quantified insights including:
- Overall code quality score (0-100)
- Security rating (0-100)
- Bug density count
- Critical issue count
- Distribution by category (security, performance, code smells, best practices)
Generate modified code with:
- Intentionally injected bugs based on your specifications
- Complete documentation of each bug's type, location, and description
- Customizable severity levels (1-10 scale)
- Variable bug counts for comprehensive testing
- FastAPI - High-performance Python web framework
- Python 3.x - Core programming language
- LangChain - AI orchestration and prompt engineering
- Google Gemini AI - Advanced language model for code analysis
- Uvicorn - ASGI server for production deployment
- Render - Cloud deployment platform for backend services
- Vercel - Frontend hosting and deployment
- CORS - Cross-origin resource sharing for secure API access
- Python 3.8 or higher
- Google Gemini API key
# Clone the repository
git clone https://github.com/jayanth9844/code-review-and-bug-generator-backend.git
# Navigate to project directory
cd code-review-and-bug-generator-backend
# Install dependencies
pip install -r requirements.txt
# Set up environment variables
# Create a .env file with your API key:
# API_KEY=your_gemini_api_key_here
# Run the server
uvicorn app.main:app --reloadThe API will be available at http://localhost:8000
Once the server is running, visit:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
- Pre-Commit Code Review - Scan code before committing to catch issues early
- Testing Automation - Generate bug scenarios for comprehensive test coverage
- Security Audits - Identify potential security vulnerabilities automatically
- Learning Tool - Understand common coding mistakes and improve skills
- CI/CD Integration - Incorporate automated code quality checks in pipelines
code-review-and-bug-generator-backend/
├── app/
│ ├── main.py # FastAPI application entry point
│ ├── services.py # Core AI-powered analysis services
│ └── api/ # API route handlers
├── requirements.txt # Python dependencies
├── .env # Environment configuration
└── README.md # Project documentation
Contributions are welcome! Feel free to submit issues or pull requests to improve the platform.
This project is available for educational and professional use.
Jayanth Raj G
Backend Developer & AI Engineer
⭐ Star this repository if you find it helpful!