A cloud-native microservices management platform with an integrated API gateway and real-time ChatOps interface. This project demonstrates a complete microservices architecture with service orchestration, load balancing, and interactive network management capabilities. It features:
- API Gateway: Centralized entry point for all microservices with load balancing and health monitoring
- Three Core Microservices: User, Product, and Order services with RESTful APIs
- Real-time ChatOps: WebSocket-based command interface for interactive service management
- Role-based Access Control: Separate interfaces for managers and clients with different permissions
- Service Health Monitoring: Automatic health checks and status reporting
- Load Balancing: Round-robin load distribution for product service requests
The system follows a distributed architecture with the following components:
- API Gateway (Port 8000): Main entry point that routes requests to appropriate services
- User Service (Port 8001): Manages user data and authentication
- Product Service (Port 8002): Handles product catalog and inventory
- Order Service (Port 8003): Manages orders and transactions
- Web Frontend: Interactive dashboard for service management
- WebSocket ChatOps: Real-time command interface for system operations
- Start/stop individual microservices
- Real-time health status monitoring
- Service failure simulation and recovery
- Automatic health checks every 10 seconds
- Complete CRUD operations for users, products, and orders
- Search and filtering capabilities
- Purchase and order processing workflows
- Inventory management with stock tracking
- Load balancing between service instances
- Request routing with timeout handling
- Service discovery and endpoint management
- Connection pooling and resource management
- Real-time WebSocket communication
- Command-based service control
- Role-specific command permissions
- System-wide broadcast notifications
- Interactive help and command history
- Visual service status indicators
- Role-based UI (Manager/Client views)
- Real-time activity logs
- System architecture visualization
- One-click service testing
- Backend: FastAPI, Python 3.11+
- Frontend: HTML5, CSS3, JavaScript (ES6+)
- Communication: REST APIs, WebSocket, gRPC (protobuf)
- Deployment: Uvicorn ASGI server
- Protocol: HTTP/1.1, WebSocket protocol
project-root/
├── api_gateway/
│ ├── main.py # Main API gateway application
│ ├── config.py # Configuration settings
│ └── ... # Other gateway files
├── user_service/
│ └── server.py # User service implementation
├── product_service/
│ └── server.py # Product service implementation
├── order_service/
│ └── server.py # Order service implementation
├── frontend/
│ ├── index.html # Main dashboard
│ ├── style.css # Styling
│ └── script.js # Frontend logic
├── protobuf/
│ ├── user.proto # gRPC service definition
│ ├── user_pb2.py # Generated Python classes
│ └── user_pb2_grpc.py # Generated gRPC client/server
└── test_grpc.py # gRPC test client
- Service Orchestration: Manage microservices lifecycle through API or ChatOps
- Load Testing: Test load balancing with concurrent requests
- Fault Tolerance: Simulate service failures and test recovery mechanisms
- System Monitoring: Real-time monitoring of all services and their health status
- Interactive Management: Use ChatOps for command-line style system administration
- Role-based Operations: Different interfaces for system administrators and regular users
The system is designed as an educational tool for understanding microservices architecture, API gateways, and real-time system management while providing practical, production-like features for service orchestration and monitoring.