AI-powered code analysis platform that provides comprehensive quality assessment, security vulnerability detection, and intelligent insights for your codebase.
- π Multi-Language Analysis: Python, JavaScript, TypeScript, Java, Go, Rust, C++, C#, Ruby, PHP
- π€ AI-Powered Insights: Advanced analysis using Google Gemini AI
- π¬ Interactive Q&A: Natural language queries about your codebase
- π Rich Reports: Comprehensive dashboards with actionable recommendations
- π GitHub Integration: Direct repository analysis from GitHub URLs
- Security: Vulnerability detection, injection flaws, authentication issues
- Performance: Bottlenecks, inefficient algorithms, resource optimization
- Code Quality: Duplication, complexity, naming conventions
- Maintainability: Technical debt, documentation, test coverage
- Best Practices: Language-specific patterns and conventions
- AST Parsing: Deep structural code analysis
- RAG Engine: Vector-based intelligent responses using FAISS
- Severity Scoring: Automated issue prioritization
- Real-time Updates: Live analysis progress tracking
# Clone the repository
git clone <repository-url>
cd code-quality-intelligence-agent
# Configure environment
cp .env.example .env
# Edit .env with your API keys
# Start all services
docker-compose up -d
# Access the application
open http://localhost:3000# Run setup script
chmod +x scripts/setup.sh
./scripts/setup.sh
# Start development servers
make dev- Python 3.11+
- Node.js 18+
- Docker & Docker Compose
- MongoDB 7.0+
# Required
GEMINI_API_KEY=your_gemini_api_key_here
# Optional but recommended
GITHUB_TOKEN=your_github_token_here- Backend Setup
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt- Frontend Setup
cd frontend
npm install- Database Setup
# Using Docker
docker run -d --name mongodb -p 27017:27017 mongo:7.0
# Or install MongoDB locally- Start Services
# Backend
cd backend && uvicorn app.main:app --reload
# Frontend
cd frontend && npm start-
π Upload/Connect Code
- Upload zip/tar archives
- Connect GitHub repositories
- Select analysis options
-
β‘ Run Analysis
- Real-time progress tracking
- Multi-language detection
- Comprehensive scanning
-
π Review Results
- Quality scores and metrics
- Issue categorization
- Actionable recommendations
-
π¬ Ask Questions
- Natural language queries
- Context-aware responses
- Source attribution
# Analyze local directory
python -m app.cli analyze /path/to/code
# Analyze GitHub repository
python -m app.cli analyze https://github.com/user/repo
# Interactive Q&A
python -m app.cli qa --report-id abc123
# Export reports
python -m app.cli export abc123 --format json
# Health check
python -m app.cli health# Start analysis
curl -X POST http://localhost:8000/api/v1/analyze \
-F "source_type=github" \
-F "source_path=https://github.com/user/repo"
# Check status
curl http://localhost:8000/api/v1/analyze/{report_id}/status
# Ask questions
curl -X POST http://localhost:8000/api/v1/ask \
-H "Content-Type: application/json" \
-d '{"question": "What are the security issues?"}'graph TB
A[Frontend React] --> B[FastAPI Backend]
B --> C[Analysis Engine]
B --> D[RAG Engine]
B --> E[MongoDB]
B --> F[FAISS Vector DB]
B --> G[Gemini AI]
C --> H[AST Parser]
C --> I[Pattern Matcher]
C --> J[Severity Scorer]
- Analysis Engine: Core code processing and issue detection
- AST Parser: Deep structural analysis for supported languages
- RAG Engine: Vector-based retrieval for intelligent Q&A
- Severity Scorer: Automated risk assessment and prioritization
# Run all tests
make test
# Backend only
cd backend && pytest tests/ -v --cov=app
# Frontend only
cd frontend && npm test
# Integration tests
pytest tests/integration/ -v -m integrationInteractive API documentation available at:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/analyze |
Start code analysis |
| GET | /api/v1/analyze/{id}/status |
Get analysis status |
| GET | /api/v1/report/{id} |
Retrieve analysis report |
| POST | /api/v1/ask |
Ask questions about code |
# Build and deploy
./scripts/deploy.sh production
# Or using Docker Compose
docker-compose -f docker-compose.prod.yml up -d# Apply manifests
kubectl apply -f k8s/- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Install pre-commit hooks
pre-commit install
# Format code
make format
# Run lints
make lintThis project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini AI for advanced code analysis
- FAISS for efficient vector similarity search
- FastAPI for the robust backend framework
- React & Material-UI for the modern frontend
- MongoDB for flexible data storage
Built with β€οΈ for developers who care about code quality
Need help? Check our documentation or open an issue