AI-powered repository intelligence, code review, and automated remediation platform.
AI Code Enhancer combines deterministic static analysis with LLM-powered code review to analyze source repositories, identify bugs, security vulnerabilities, performance problems, maintainability issues, and code-quality concerns β and generate targeted fixes that can be reviewed through an interactive diff workflow.
The project is built with a React + Monaco Editor frontend and a FastAPI backend, with support for Google Gemini and Groq as the AI providers.
AI Code Enhancer goes beyond sending individual code snippets to an LLM.
It analyzes a repository through multiple layers:
Source Repository
β
βΌ
Repository Analysis
β
βββββββββββββββΌββββββββββββββ
βΌ βΌ βΌ
Static Analysis Dependency Architecture
Analysis Analysis
β β β
βββββββββββββββΌββββββββββββββ
βΌ
AI Code Review
Gemini / Groq
β
βΌ
Finding Normalization
β
βΌ
Quality Scoring
β
βΌ
Review Findings
β
βΌ
AI Remediation
β
βΌ
Unified Diff
β
ββββββββ΄βββββββ
βΌ βΌ
Review Apply
This creates a hybrid analysis workflow where deterministic tooling provides objective signals while AI provides higher-level reasoning and remediation.
Analyze source code using LLM-powered review to identify:
- π Potential bugs
- π Security vulnerabilities
- β‘ Performance problems
- π§Ή Maintainability issues
- π¨ Code-quality and style problems
β οΈ Severity-ranked findings- π Line-level findings
- π‘ Improvement recommendations
The project currently supports two LLM providers:
Used for high-quality code analysis and remediation.
Provides an alternative high-speed inference path for AI-powered analysis.
The application uses a provider abstraction so the rest of the analysis pipeline does not need to depend directly on a specific LLM provider.
AI Review Engine
β
ββββββββββ΄βββββββββ
βΌ βΌ
Gemini Groq
Only these two providers are intentionally supported in the current version.
AI Code Enhancer combines deterministic tooling with AI analysis.
Static analysis helps identify issues that can be detected reliably by dedicated tools, while the LLM provides contextual reasoning and higher-level recommendations.
Source Code
β
ββββΊ Static Analysis
β βββ Ruff
β βββ Bandit
β βββ JavaScript / TypeScript analysis
β
ββββΊ AI Analysis
βββ Gemini
βββ Groq
β
Finding Aggregation
β
Finding Normalization
β
Quality Score
This reduces dependence on a single analysis technique.
The application can work with multi-file repositories rather than only isolated code snippets.
Repository analysis provides information about:
- Source files
- Directory structure
- File relationships
- Supported source types
- Repository-level findings
This allows the AI review process to reason about code in a broader project context.
The project analyzes relationships between source files and their dependencies.
This helps identify:
- Import relationships
- Module dependencies
- Dependency structure
- Potential dependency-related problems
AI Code Enhancer can analyze the structural relationships within a repository.
The architecture analysis can identify:
- File-to-file relationships
- Import graphs
- Dependency structure
- Circular dependencies
- Architectural relationships
The frontend presents this information in an interactive repository-analysis workflow.
The project aggregates analysis results into an overall quality assessment.
The scoring system considers areas such as:
- Overall quality
- Security
- Performance
- Maintainability
- Reliability
- Style
Example:
CODE QUALITY
Overall 78 / 100
Security 91
Performance 67
Maintainability 74
Reliability 71
Style 86
The score provides a quick high-level view while the individual findings provide the detailed reasoning behind it.
Detected issues can be passed back to the AI engine to generate targeted remediation.
Instead of blindly replacing an entire source file, the application provides an interactive workflow:
Finding
β
Generate AI Fix
β
Proposed Changes
β
Unified Diff
β
Review
β
Apply / Reject
This makes AI-generated modifications easier to inspect before applying them.
The frontend uses Monaco Editor to provide a development-environment-style editing experience.
It supports:
- Source-code viewing
- Code editing
- Finding navigation
- Line-level issue inspection
- Diff visualization
- Proposed fix review
βββββββββββββββββββββββββββββββββββββββββββββ
β React Frontend β
β β
β ββββββββββββββ ββββββββββββββββββββββ β
β β File / Repoβ β Monaco Editor β β
β β Upload β β + Diff Viewer β β
β ββββββββ¬ββββββ βββββββββββ¬βββββββββββ β
β β β β
β ββββββββββββ¬βββββββββ β
ββββββββββββββββββββββΌββββββββββββββββββββββ
β HTTP
βΌ
βββββββββββββββββββββββββββββββββββββββββββββ
β FastAPI Backend β
β β
β Repository Analysis β
β Dependency Analysis β
β Architecture Analysis β
β Static Analysis β
β AI Review β
β Quality Scoring β
β Remediation β
ββββββββββββββββββββββ¬βββββββββββββββββββββββ
β
ββββββββββββ΄βββββββββββ
βΌ βΌ
ββββββββββββββββββββ ββββββββββββββββββββ
β Static Analysis β β AI Providers β
β β β β
β Ruff β β Google Gemini β
β Bandit β β Groq β
β JS/TS Analysis β β β
ββββββββββ¬ββββββββββ ββββββββββ¬ββββββββββ
β β
ββββββββββββ¬ββββββββββββ
βΌ
ββββββββββββββββββββββ
β Finding Aggregator β
β + Normalization β
β + Quality Scoring β
ββββββββββββ¬ββββββββββ
β
βΌ
Review Findings
β
βΌ
AI Remediation
β
βΌ
Unified Diff
- React
- Monaco Editor
- Axios
- Tailwind CSS
- JavaScript
- Python
- FastAPI
- Pydantic
- Uvicorn
- Static analysis tooling
- Repository analysis utilities
- Google Gemini
- Groq
- Ruff
- Bandit
- JavaScript / TypeScript analysis
- Dependency analysis
- Architecture analysis
- Custom finding normalization
- Quality scoring
AI_Code_Enhancer/
β
βββ backend/
β βββ app/
β β βββ ai/
β β βββ analyzers/
β β βββ ...
β β
β βββ tests/
β βββ main.py
β βββ config.py
β βββ requirements.txt
β βββ ...
β
βββ frontend/
β βββ public/
β βββ src/
β β βββ components/
β β βββ ...
β β βββ App.js
β βββ package.json
β βββ package-lock.json
β
βββ .env.example
βββ .gitignore
βββ README.md
The exact internal module structure may evolve as the project develops.
Make sure the following are installed:
- Python 3.10+
- Node.js
- npm
- A Google Gemini API key
- A Groq API key
git clone https://github.com/arjungupt771/AI_Code_Enhancer.git
cd AI_Code_EnhancerCreate and activate a virtual environment:
cd backend
python -m venv .venvsource .venv/bin/activate.venv\Scripts\activateInstall backend dependencies:
pip install -r requirements.txtReturn to the project root:
cd ..Create the local environment file:
cp .env.example .envOn Windows, you can also create .env manually from .env.example.
Configure your API credentials:
GEMINI_API_KEY=your_gemini_api_key_here
GROQ_API_KEY=your_groq_api_key_hereConfigure the models according to the environment variables supported by the backend.
Example:
GEMINI_MODEL=gemini-2.5-flash
GROQ_MODEL=openai/gpt-oss-120bNever commit .env or real API keys to GitHub.
From the project root:
cd backend
uvicorn main:app --reload --host 127.0.0.1 --port 8000The backend will be available at:
http://127.0.0.1:8000
FastAPI's interactive documentation is available at:
http://127.0.0.1:8000/docs
Open another terminal:
cd frontend
npm install
npm startThe frontend will normally be available at:
http://localhost:3000
If the frontend supports a configurable backend URL, configure it through the frontend environment file.
Example:
REACT_APP_API_BASE_URL=http://127.0.0.1:8000A typical repository review follows this process:
1. Upload Repository
β
2. Repository Structure Analysis
β
3. Dependency Analysis
β
4. Architecture Analysis
β
5. Static Analysis
β
6. AI Review
ββββββ΄βββββ
βΌ βΌ
Gemini Groq
ββββββ¬βββββ
β
7. Finding Normalization
β
8. Quality Scoring
β
9. Review Findings
β
10. Generate AI Fix
β
11. Review Unified Diff
β
12. Apply or Reject Changes
The backend exposes API endpoints for application health, code review, remediation, and supporting analysis workflows.
Checks whether the backend is running.
Example:
curl http://127.0.0.1:8000/healthReviews uploaded source code and returns structured findings.
The review workflow can incorporate:
- Static analysis
- AI analysis
- Finding normalization
- Severity classification
- Quality scoring
The selected AI provider/model is used for the AI portion of the review.
Generates a proposed remediation based on source code and detected findings.
The resulting changes can be reviewed through the frontend's diff workflow before being applied.
API request/response schemas may evolve as the project continues to be refined. The FastAPI documentation at
/docsis the authoritative local API reference.
Backend tests are located under:
backend/tests/
Run the backend test suite with:
PYTHONPATH=. pytest backend/tests -qYou can also perform a Python compilation check:
python -m compileall -q backendFor the frontend:
cd frontend
npm run test:ciBuild verification:
npm run buildBefore making a release/final push, verify both the backend test suite and frontend build successfully.
AI Code Enhancer uses environment variables for sensitive configuration.
Never commit:
.env
or actual API credentials.
The repository should also exclude local development artifacts such as:
.venv/
node_modules/
__pycache__/
.pytest_cache/
*.db
build/
dist/
API keys should only exist in the local environment or an appropriate secret-management system.
The current version focuses on local repository analysis and AI-assisted code review.
The project intentionally prioritizes:
- Code quality
- Repository intelligence
- Static analysis
- AI reasoning
- Gemini + Groq integration
- Quality scoring
- AI remediation
- Interactive review
- Clean project architecture
- Portfolio-quality implementation
The project is not currently focused on deployment infrastructure or production CI/CD integration.
The original development roadmap has now been consolidated into the current implementation.
- Repository cleanup and project stabilization
- Environment-based configuration
- FastAPI backend
- React frontend
- Monaco Editor integration
- Multi-file code analysis
- Static analysis integration
- Structured AI responses
- Gemini integration
- Groq integration
- Repository analysis
- Dependency analysis
- Architecture analysis
- Finding normalization
- Code-quality scoring
- AI-powered remediation
- Unified diff workflow
- Interactive review/apply workflow
- Backend test coverage
- Frontend integration
Potential future improvements may include:
- More advanced language-specific analyzers
- Improved architecture visualization
- More sophisticated remediation validation
- Expanded test coverage
- Additional repository-level intelligence
- Improved review UX
- Performance optimization for large repositories
These are optional improvements rather than required components of the current project.
Traditional static analysis tools are effective at detecting deterministic problems, while LLMs are capable of understanding broader context and suggesting higher-level improvements.
AI Code Enhancer combines both approaches:
Static Analysis
β
β Deterministic Findings
β
βΌ
βββββββββββββ
β β
β Aggregatorβ
β β
βββββββ¬ββββββ
β
β
AI Analysis
β
β Contextual Reasoning
βΌ
Unified Review
β
βΌ
Quality Score
β
βΌ
AI Remediation
The result is a more comprehensive development workflow than either static analysis or an isolated AI code-review prompt alone.
Contributions and improvements are welcome.
When contributing:
- Keep changes focused.
- Add tests for new functionality.
- Avoid committing secrets.
- Keep frontend/backend API contracts synchronized.
- Document significant architectural changes.
- Preserve the existing provider abstraction.
- Verify the project locally before submitting changes.
This project is currently maintained as an AI engineering portfolio project.
Arjun Gupta
GitHub:
https://github.com/arjungupt771
Repository:
https://github.com/arjungupt771/AI_Code_Enhancer