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.
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
- Docker
- Kubernetes cluster (v1.21+)
- kubectl
- GitHub account (for CI/CD)
- Set up the virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
- Run the application:
python -m flask --app api.app run --debug
Build the container:
docker build -t leetcode-analysis-api .
Run locally:
docker run -p 8080:8080 leetcode-analysis-api
- Create the namespace:
kubectl apply -f k8s/base/namespace.yaml
- Deploy Redis:
kubectl apply -f k8s/base/redis-deployment.yaml
- Deploy the API:
kubectl apply -f k8s/base/api-deployment.yaml
- Deploy monitoring:
kubectl apply -f k8s/monitoring/prometheus.yaml
kubectl apply -f k8s/monitoring/grafana.yaml
Access monitoring dashboards:
- Prometheus:
http://localhost:9090
(after port-forward) - Grafana:
http://localhost:3000
(after port-forward)
Default Grafana credentials:
- Username: admin
- Password: admin123
The system uses GitHub Actions for:
- Automated testing
- Security scanning
- Container building
- Kubernetes deployment
Pipeline workflow is defined in .github/workflows/main.yml
Security measures implemented:
- Container security scanning
- Dependency vulnerability checks
- RBAC for Kubernetes resources
- Network policies
- Regular security updates
The API provides health check endpoints:
/health
- Basic application health/metrics
- Prometheus metrics
Get analysis for a specific LeetCode user.
Response:
{
"analysis": {
"coding_patterns": {...},
"skill_assessment": {...},
"recommendations": {...}
}
}
Web interface for user analysis.
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
Please review our Security Policy before contributing.
This project is licensed under the MIT License - see the LICENSE file for details.