A comprehensive AI-powered recommendation system with microservices architecture, featuring real-time data processing, machine learning models, and a modern web interface.
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β API Server β β AI Server β
β (React+Vite) βββββΊβ (Go/Fiber) βββββΊβ (Python) β
β Port: 5173 β β Port: 2030 β β Port: 9999 β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
βββββββββββββββββββββββββΌββββββββββββββββββββββββ
β
βββββββββββββββββββ βββββββββββββββββββ
β Redis β β Prometheus β
β (Cache/DB) β β (Monitoring) β
β Port: 6379 β β Port: 9090 β
βββββββββββββββββββ βββββββββββββββββββ
- Docker Desktop (Windows/Mac) or Docker Engine (Linux)
- Docker Compose v2.0+
- Git
- curl (for testing)
git clone <repository-url>
cd VRecommendation# Copy development environment
copy .env.development .env
# Or use the Makefile
make install# Using Docker Compose
docker-compose up -d
# Or using Makefile
make start# Check all services
make health
# Or manually
curl http://localhost:2030/api/v1/ping
curl http://localhost:9999/api/v1/health
curl http://localhost:5173- Frontend: http://localhost:5173
- API Server: http://localhost:2030
- AI Server: http://localhost:9999
- Prometheus: http://localhost:9090
# Installation & Setup
make install # Install dependencies and setup environment
make build # Build all Docker images
# Service Management
make start # Start all services
make stop # Stop all services
make restart # Restart all services
make status # Show service status
# Development
make dev # Start development environment
make dev-api # Run API server locally
make dev-ai # Run AI server locally
make dev-frontend # Run frontend locally
# Monitoring & Logs
make logs # Show all service logs
make logs-api # Show API server logs
make logs-ai # Show AI server logs
make health # Check service health
make urls # Show all service URLs
# Testing
make test # Run all tests
make test-api # Run API server tests
make test-ai # Run AI server tests
# Maintenance
make clean # Clean containers and volumes
make clean-all # Full cleanup
make backup # Backup data
make update # Update services
# Utilities
make help # Show all available commands# Start services
start.cmd
# Stop services
stop.cmd
# Test system
test-system.cmd# Start services
./docker-start.sh
# Backend development
./run_backend.sh
# Frontend development
./run_frontend.shKey environment variables in .env:
# Authentication
JWT_SECRET_KEY=your-jwt-secret-key
SESSION_SECRET=your-session-secret
# API Server
API_SERVER_HOST=0.0.0.0
API_SERVER_PORT=2030
# AI Server
AI_SERVER_HOST=0.0.0.0
AI_SERVER_PORT=9999
# Frontend
FRONTEND_PORT=5173
VITE_API_SERVER_URL=http://localhost:2030
VITE_AI_SERVER_URL=http://localhost:9999
# Redis
REDIS_HOST=redis
REDIS_PORT=6379
# Database (MySQL/MongoDB)
MYSQL_HOST=mysql
MYSQL_PORT=3306
MYSQL_USER=admin
MYSQL_PASSWORD=your-password
# CORS
CORS_ORIGINS=http://localhost:5173,http://localhost:3000Each service has its own configuration directory:
- API Server:
backend/api_server/config/ - AI Server:
backend/ai_server/config/ - Frontend:
frontend/project/
# Run comprehensive system tests
make test
# Or use Windows script
test-system.cmd# API Server
curl http://localhost:2030/api/v1/ping
curl -H "Authorization: Bearer YOUR_TOKEN" http://localhost:2030/api/v1/activity-logs/all
# AI Server
curl http://localhost:9999/api/v1/health
curl http://localhost:9999/api/v1/list_models
curl http://localhost:9999/api/v1/list_tasks
# Frontend
curl http://localhost:5173# Check Docker
docker --version
docker-compose --version
# Check service status
make status
docker-compose ps
# View logs
make logsDefault ports used: 2030, 9999, 5173, 9090, 6379
# Check port usage (Windows)
netstat -ano | findstr :2030
# Kill process using port (Windows)
taskkill /PID <PID> /F- Ensure
CORS_ORIGINSincludes your frontend URL - Check AI server logs for CORS errors
- Verify frontend is accessing correct API URLs
# Check JWT secret configuration
echo %JWT_SECRET_KEY%
# Verify token format
# JWT tokens should start with "eyJ"# Clean Docker system
make docker-clean
# Full Docker reset
make docker-reset
# Rebuild images
make rebuild# View specific service logs
make logs-api
make logs-ai
make logs-frontend
# Follow logs in real-time
docker-compose logs -f
# Filter logs
docker-compose logs ai_server | grep ERROR-
Setup Development Environment
make dev
-
Run Services Individually
# API Server (Go) make dev-api # AI Server (Python) make dev-ai # Frontend (React+Vite) make dev-frontend
-
Make Changes and Test
# Test your changes make test # Check service health make health
-
Build and Deploy
make build make start
VRecommendation/
βββ backend/
β βββ api_server/ # Go API server
β β βββ main.go
β β βββ internal/
β β βββ pkg/
β β βββ config/
β βββ ai_server/ # Python AI server
β βββ src/
β βββ config/
β βββ models/
β βββ tasks/
βββ frontend/
β βββ project/ # React + Vite frontend
β βββ src/
β βββ public/
β βββ package.json
βββ docs/ # Documentation
βββ diagrams/ # Architecture diagrams
βββ docker-compose.yml # Service orchestration
βββ Makefile # Build automation
βββ README.md # This file
# Check all services
make health
# Prometheus metrics
curl http://localhost:9090/metrics
# Service status
make status- Prometheus: http://localhost:9090
- Service Logs:
make logs - Redis Monitoring:
make shell-redis
# Create backup
make backup
# Backup Redis data
make db-backup# Reset Redis
make db-reset
# Open Redis CLI
make shell-redis
# View Redis data
docker-compose exec redis redis-cli-
Configure Environment
# Create production .env cp .env.development .env.production # Edit with production values
-
Deploy
make prod-build make prod
-
Monitoring
make health make logs
- Change default JWT secrets
- Use strong passwords for databases
- Configure proper CORS origins
- Enable HTTPS in production
- Use Docker secrets for sensitive data
# Health check
GET /api/v1/ping
# Activity logs (requires auth)
GET /api/v1/activity-logs/all# Health check
GET /api/v1/health
# List models
GET /api/v1/list_models
# List tasks
GET /api/v1/list_tasks
# List data chefs
GET /api/v1/list_data_chefs
# Scheduler status
GET /api/v1/get_scheduler_status
# Get recommendations
POST /api/v1/recommend- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Run the test suite
- Submit a pull request
- Follow existing code style
- Add tests for new features
- Update documentation
- Use descriptive commit messages
- Issues: Create an issue on GitHub
- Documentation: Check
docs/directory - Logs: Use
make logsfor debugging - System Test: Run
test-system.cmd(Windows) ormake test
- Initial release
- Microservices architecture
- Docker containerization
- Makefile automation
- Comprehensive testing
- CORS support
- JWT authentication
- Redis caching
- Prometheus monitoring