https://github.com/rahul-s-bhatt/ai-analysis-for-leetcode
The repository "ai-analysis-for-leetcode" is a project that utilizes AI to analyze LeetCode profile. It is primarily written in Python, with some HTML and Dockerfile components.
https://github.com/rahul-s-bhatt/ai-analysis-for-leetcode
ai docker leetcode ml python software-engineering
Last synced: about 2 months ago
JSON representation
The repository "ai-analysis-for-leetcode" is a project that utilizes AI to analyze LeetCode profile. It is primarily written in Python, with some HTML and Dockerfile components.
- Host: GitHub
- URL: https://github.com/rahul-s-bhatt/ai-analysis-for-leetcode
- Owner: rahul-s-bhatt
- License: mit
- Created: 2025-02-09T11:00:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-15T09:16:32.000Z (6 months ago)
- Last Synced: 2026-04-28T15:47:55.733Z (about 2 months ago)
- Topics: ai, docker, leetcode, ml, python, software-engineering
- Language: Python
- Homepage: https://ai-analysis-for-leetcode.onrender.com/
- Size: 218 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LeetCode Analysis System
An advanced analytics tool that provides deep insights into your LeetCode profile, helping you understand your coding patterns, track progress, and optimize your learning path.
[](https://github.com/yourusername/ai-analysis-for-leetcode/actions/workflows/security.yml)
[](https://github.com/yourusername/ai-analysis-for-leetcode/pulls?q=is%3Apr+author%3Aapp%2Fdependabot)
[](SECURITY.md)
## Architecture Overview
The system is built with a modern, scalable architecture:
- Flask-based REST API with async support
- Redis caching layer
- Prometheus metrics and Grafana dashboards
- Kubernetes deployment with high availability
- Automated CI/CD pipeline
## Prerequisites
- Docker
- Kubernetes cluster (v1.21+)
- kubectl
- GitHub account (for CI/CD)
## Local Development
1. Set up the virtual environment:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
```
2. Run the application:
```bash
python -m flask --app api.app run --debug
```
## Docker Build
Build the container:
```bash
docker build -t leetcode-analysis-api .
```
Run locally:
```bash
docker run -p 8080:8080 leetcode-analysis-api
```
## Kubernetes Deployment
1. Create the namespace:
```bash
kubectl apply -f k8s/base/namespace.yaml
```
2. Deploy Redis:
```bash
kubectl apply -f k8s/base/redis-deployment.yaml
```
3. Deploy the API:
```bash
kubectl apply -f k8s/base/api-deployment.yaml
```
4. Deploy monitoring:
```bash
kubectl apply -f k8s/monitoring/prometheus.yaml
kubectl apply -f k8s/monitoring/grafana.yaml
```
## Monitoring
Access monitoring dashboards:
- Prometheus: `http://localhost:9090` (after port-forward)
- Grafana: `http://localhost:3000` (after port-forward)
Default Grafana credentials:
- Username: admin
- Password: admin123
## CI/CD Pipeline
The system uses GitHub Actions for:
- Automated testing
- Security scanning
- Container building
- Kubernetes deployment
Pipeline workflow is defined in `.github/workflows/main.yml`
## Security
Security measures implemented:
- Container security scanning
- Dependency vulnerability checks
- RBAC for Kubernetes resources
- Network policies
- Regular security updates
## Health Checks
The API provides health check endpoints:
- `/health` - Basic application health
- `/metrics` - Prometheus metrics
## API Documentation
### Endpoints
#### GET /api/analysis/{username}
Get analysis for a specific LeetCode user.
Response:
```json
{
"analysis": {
"coding_patterns": {...},
"skill_assessment": {...},
"recommendations": {...}
}
}
```
#### POST /
Web interface for user analysis.
## Contributing
1. Fork the repository
2. Create your feature branch
3. Commit your changes
4. Push to the branch
5. Create a new Pull Request
Please review our [Security Policy](SECURITY.md) before contributing.
## 📝 License
This project is licensed under the MIT License - see the LICENSE file for details.