TrackML is a full-stack tool for tracking, managing, and analyzing machine learning models. It supports organizing models, extracting insights using AI, and integrating with external APIs for automation and enrichment.

- ML practitioners struggle to track explored models and research
- Manual model metadata entry is tedious and error-prone
- Lack of AI-powered insights for model comparison and selection
Integrates HuggingFace API for auto-filling model metadata and Google Gemini for comparative analysis. Features comprehensive Nginx caching and reverse proxy setup with multi-level cache hierarchy, achieving optimized static asset delivery and API response times on AWS EC2.
TrackML is a comprehensive tool for tracking and managing machine learning models. It helps users keep track of models they've explored, studied, or plan to use in the future, with powerful features powered by Gemini AI and HuggingFace integration.
Features
- Track ML model details including name, developer, type, and parameters
- Organize models with tags and status updates
- Search and filter models by various criteria
- Dashboard view with model statistics and insights
- Auto-fill model information from HuggingFace
- Model insights and comparative analysis using Gemini AI
- Responsive design for all devices
- Secure authentication system
- Cross-Origin Resource Sharing (CORS) enabled
- AWS EC2 deployment ready
Architecture
Frontend Architecture
- Framework: React 18+ with Vite for fast development and building
- Language: TypeScript for type safety
- Styling: TailwindCSS for utility-first styling
- Routing: React Router v6 for client-side navigation
- State Management: React Context API
- API Integration: Axios for HTTP requests
- Build Tool: Vite
Backend Architecture
- Framework: Flask for lightweight and flexible REST API
- Database: SQLAlchemy ORM with SQLite/PostgreSQL
- Authentication: JWT-based authentication
- API Integration:
- Google Gemini API for AI-powered insights
- HuggingFace API for model information
- CORS: Flask-CORS for secure cross-origin requests
- Environment: Python 3.8+
Infrastructure
- Hosting: AWS EC2
- Domain & SSL: AWS Route 53 & ACM
- Database: AWS RDS (Optional)
- Static Files: AWS S3 (Optional)
Nginx Reverse Proxy & Caching
Reverse Proxy Configuration
- Load Balancing: Round-robin distribution across backend servers
- SSL Termination: HTTPS handling at proxy level
- Header Management:
- X-Real-IP forwarding
- X-Forwarded-For handling
- Custom header modifications
- Request Routing:
- Path-based routing
- Subdomain routing
- WebSocket support
Caching Implementation
-
Caching Layers:
proxy_cache_path /path/to/cache levels=1:2 keys_zone=my_cache:10m max_size=10g inactive=60m use_temp_path=off;- Multi-level cache hierarchy
- Memory-based caching (10MB zone)
- Disk-based caching (10GB max)
- 60-minute cache retention
-
Cache Configuration:
- Static asset caching
- API response caching
- Cache bypass rules
- Cache purge mechanisms
-
Cache Control:
location /api/v1/ { proxy_cache my_cache; proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; proxy_cache_valid 200 60m; proxy_cache_valid 404 1m; proxy_cache_key $scheme$request_method$host$request_uri; }- Status-based cache rules
- Method-based caching
- Custom cache keys
- Stale cache handling
Performance Optimizations
-
Compression:
gzip on; gzip_types text/plain text/css application/json application/javascript text/xml; gzip_min_length 1000; gzip_comp_level 6;- GZIP compression
- Brotli compression support
- Compression thresholds
- Content type filtering
-
Buffer Settings:
client_body_buffer_size 10K; client_header_buffer_size 1k; client_max_body_size 8m; large_client_header_buffers 2 1k;- Request buffering
- Response buffering
- Body size limits
- Header size optimization
-
Connection Handling:
keepalive_timeout 65; keepalive_requests 100;- Keep-alive settings
- Connection pooling
- Worker processes
- Event handling
Security Measures
-
Rate Limiting:
limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;- IP-based limiting
- Burst handling
- Zone configuration
- Custom rate rules
-
Security Headers:
add_header X-Frame-Options "SAMEORIGIN"; add_header X-XSS-Protection "1; mode=block"; add_header X-Content-Type-Options "nosniff";- XSS protection
- CSRF prevention
- Content sniffing prevention
- Frame protection
Monitoring & Logging
-
Access Logging:
log_format custom '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent" ' '$request_time';- Custom log formats
- Error logging
- Performance logging
- Debug logging
-
Metrics Collection:
- Response time tracking
- Cache hit/miss ratios
- Error rate monitoring
- Bandwidth usage
High Availability Setup
-
Failover Configuration:
- Backup servers
- Health checks
- Automatic failover
- Load balancing
-
SSL Configuration:
ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256; ssl_prefer_server_ciphers off;- Modern SSL protocols
- Strong cipher suites
- OCSP stapling
- Session handling
Project Structure
TrackML/
├── backend/
│ ├── models/ # Database models
│ │ └── models.py # SQLAlchemy models
│ ├── routes/ # API endpoints
│ │ ├── auth_routes.py
│ │ └── model_routes.py
│ ├── services/ # Business logic
│ │ ├── gemini_service.py
│ │ └── huggingface_service.py
│ ├── config.py # Configuration
│ └── run.py # Application entry point
├── frontend/
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API client
│ │ └── types/ # TypeScript types
│ └── public/
└── deployment/
├── nginx/ # Nginx configuration
└── systemd/ # Systemd service files
API Documentation
Authentication Endpoints
POST /api/v1/auth/register- Register new userPOST /api/v1/auth/login- Login userPOST /api/v1/auth/logout- Logout user
Model Endpoints
GET /api/v1/models- List all modelsGET /api/v1/models/<id>- Get specific modelPOST /api/v1/models- Create new modelPUT /api/v1/models/<id>- Update modelDELETE /api/v1/models/<id>- Delete modelGET /api/v1/models/search- Search modelsPOST /api/v1/models/autofill- Auto-fill model details
License
This project is licensed under the MIT License - see the LICENSE file for details.