A comprehensive, enterprise-grade microservices learning management system built with modern cloud-native technologies and deployed on Azure.
-
Clone the repository
git clone <repository-url> cd modex
-
Configure environment
cp .env.example .env # Edit .env with your configuration -
Start services with Docker Compose
docker-compose up -d
-
Access the platform
- API Gateway: http://localhost:3000
- Health checks: http://localhost:3000/health
-
Deploy infrastructure
# Full deployment ./infrastructure/scripts/deploy.sh # Or step by step ./infrastructure/scripts/deploy.sh infrastructure ./infrastructure/scripts/deploy.sh applications
-
Access production endpoints
- API: https://api.modex.platform
- Monitoring: Grafana dashboard in AKS
- Logs: Azure Application Insights
- API Gateway (Port 3000): Request routing, authentication, rate limiting
- Course Management (Port 3002): Course CRUD, content management, categories
- Enrollment (Port 3003): Student registration, enrollment, progress tracking
- Assessment (Port 3004): Quiz creation, submissions, automated grading
- Payment (Port 3005): Stripe integration, subscriptions, billing
- Analytics (Port 3006): Event tracking, dashboards, performance metrics
Backend:
- TypeScript/Node.js with Express.js
- Go with Gin framework
- PostgreSQL with Drizzle ORM (TypeScript) / GORM (Go)
- Redis for caching and sessions
- JWT authentication
Infrastructure:
- Azure Kubernetes Service (AKS) - Container orchestration
- Azure PostgreSQL Flexible Server - Managed database
- Azure Cache for Redis - Managed caching
- Azure Container Registry - Container images
- Azure Application Insights - Application monitoring
- Azure Key Vault - Secrets management
DevOps & Automation:
- Terraform - Infrastructure as Code
- Helm - Kubernetes application deployment
- Ansible - Configuration management
- GitHub Actions - CI/CD pipelines
- Docker - Containerization
- AKS cluster with auto-scaling node pools
- PostgreSQL Flexible Server with high availability
- Azure Cache for Redis with private endpoints
- Key Vault for secrets management
- Application Insights for monitoring
- Virtual Network with dedicated subnets
- Helm charts for all microservices
- Horizontal Pod Autoscaler
- Network policies for security
- Service monitors for Prometheus
- Ingress with SSL termination
GET /health- Health checkPOST /auth/login- User authenticationPOST /auth/register- User registration/*- Proxy to microservices
GET /api/courses- List coursesPOST /api/courses- Create courseGET /api/courses/:id- Get course detailsPUT /api/courses/:id- Update courseDELETE /api/courses/:id- Delete course
POST /api/enrollments- Enroll in courseGET /api/enrollments/user/:userId- User enrollmentsPUT /api/enrollments/:id/progress- Update progress
GET /api/assessments- List assessmentsPOST /api/assessments- Create assessmentPOST /api/submissions- Submit assessmentGET /api/submissions/:id/grade- Get grade
POST /api/payments- Create paymentPOST /api/subscriptions- Manage subscriptionsPOST /api/stripe/webhook- Stripe webhooks
POST /api/analytics/events- Track eventsGET /api/analytics/dashboard- Analytics dashboardGET /api/analytics/courses/:id- Course analytics
- Authentication: JWT-based authentication across all services
- Authorization: Role-based access control (admin, instructor, student)
- Network Security: Azure Network Security Groups and Kubernetes Network Policies
- Secrets Management: Azure Key Vault integration
- SSL/TLS: Automatic certificate management with cert-manager
- Input Validation: Comprehensive validation and sanitization
- Rate Limiting: API Gateway and Nginx rate limiting
- Container Security: Non-root containers, read-only filesystems
# TypeScript services
cd services/api-gateway && npm test
cd services/enrollment && npm test
cd services/payment && npm test
cd services/analytics && npm test
# Go services
cd services/course-management && go test ./...
cd services/assessment && go test ./...- Trivy - Container and filesystem vulnerability scanning
- CodeQL - Static application security testing
- Snyk - Dependency vulnerability scanning
- GitLeaks - Secrets detection
- Azure Application Insights - Application performance monitoring
- Prometheus - Metrics collection
- Grafana - Dashboards and visualization
- Azure Log Analytics - Centralized logging
- High response time alerts
- Error rate monitoring
- Resource utilization alerts
- Service availability monitoring
All services expose health endpoints:
GET /health- Service health statusGET /ready- Readiness check
- Security Scanning - Vulnerability and secrets scanning
- Testing - Unit and integration tests
- Building - Container image builds
- Infrastructure - Terraform plan and apply
- Deployment - Helm deployments to AKS
- Verification - Health checks and smoke tests
- Azure CLI
- Terraform 1.6+
- kubectl
- Helm 3.12+
- Docker
Development:
NODE_ENV=development
DATABASE_URL=postgresql://user:pass@localhost:5432/modex
REDIS_URL=redis://localhost:6379Production (Azure):
NODE_ENV=production
DATABASE_URL=# Retrieved from Azure Key Vault
REDIS_URL=# Retrieved from Azure Key Vault
JWT_SECRET=# Retrieved from Azure Key Vault
STRIPE_SECRET_KEY=# Retrieved from Azure Key Vault# Full production deployment
./infrastructure/scripts/deploy.sh
# Infrastructure only
./infrastructure/scripts/deploy.sh infrastructure
# Applications only
./infrastructure/scripts/deploy.sh applications
# Cleanup
./infrastructure/scripts/cleanup.sh- Create service directory:
services/new-service/ - Add to
docker-compose.yml - Create Dockerfile
- Add Terraform resources if needed
- Create Helm templates
- Update CI/CD pipeline
- Configure routing in API Gateway
TypeScript services use Drizzle migrations:
cd services/[service-name]
npm run db:generate
npm run db:migrateGo services use GORM auto-migration on startup.
# Grafana dashboard
kubectl port-forward -n monitoring svc/prometheus-grafana 3000:80
# Prometheus
kubectl port-forward -n monitoring svc/prometheus-kube-prometheus-prometheus 9090:9090# Check pod status
kubectl get pods -n modex-platform
# View logs
kubectl logs -n modex-platform deployment/api-gateway
# Exec into pod
kubectl exec -it -n modex-platform deployment/api-gateway -- /bin/sh# Manual scaling
kubectl scale deployment api-gateway --replicas=5 -n modex-platform
# HPA status
kubectl get hpa -n modex-platformThis project is licensed under the MIT License.
For support and questions:
- Create an issue in the repository
- Check Azure Application Insights for application logs
- Review Kubernetes events:
kubectl get events -n modex-platform - Monitor Grafana dashboards for performance metrics
- High Availability: Multi-zone deployment with auto-scaling
- Disaster Recovery: Automated backups and geo-redundancy
- Security Compliance: Enterprise-grade security controls
- Monitoring: Comprehensive observability and alerting
- DevOps Automation: Full CI/CD with infrastructure as code
- Cost Optimization: Resource optimization and monitoring
Enterprise-grade microservices learning platform π