How gofies/ghms works
Main Components
A. Client Layer:
• React Frontend (Port 3000)
• Different user interfaces (Patient, Doctor, Admin, Lab Staff)
• Redux state management
• UI component library structure
B. API Gateway/Load Balancer:
• Nginx configuration (nginx.conf)
• SSL/TLS termination
• Routing logic
C. Backend Services:
• Node.js/Express API (Port 5000)
• Authentication/Authorization middleware
• Controller layers for different user types
• Model layer with MongoDB schemas
D. AI Services:
• LLM Service for chat functionality (Port 8000)
• File processing service
• Model inference service
E. Database Layer:
• MongoDB Cluster
• Config servers
• Router servers (Ports 27117, 27118)
• Shard servers
• Data replication and partitioning
F. Monitoring Stack:
• Prometheus for metrics
• Grafana for visualization
• Promtail for log aggregation
Connection Flows
• User → Frontend → API Gateway
• API Gateway → Backend Services
• Backend Services → MongoDB Cluster
• Backend Services → AI Services
• All Services → Monitoring Stack
Key Elements to Highlight
A. Security Layer:
• JWT authentication flow
• Middleware protection
• SSL/TLS encryption
B. Service Separation:
• Different controller groups (admin, doctor, patient, lab)
• Modular frontend components
• Microservices architecture
C. Data Flow:
• REST API routes
• Database queries
• Real-time updates
• File processing
Additional Details
Annotations for:
• Docker container boundaries
• Network isolation
• Environment configurations
• Scaling points
• Backup systems
Deployment Information
Show:
• CI/CD pipeline integration
• Container orchestration
• Environment separation (dev/prod)
• Health check endpoints