How chaitanya697/gridrelief works
GridRelief coordinates resource requests across independent relief centers: requests are accepted, queued, ranked against shareable inventory, then presented for supplier approval, partial approval, or rejection. A dashboard provides the operator workflow, live events, queue health, and optional service controls. The sampled service code establishes the event and HTTP relationships shown; README documentation supplies the dashboard UI capabilities. Inventory, requests, and allocation state are in memory, and approvals do not deduct center stock.
Main entry points: dashboard/main.py Dashboard Gateway · allocation-service/main.py Priority Ranking · request-service/main.py Request Intake · center-service/main.py Center Management
Components 18
Request Coordination
- Request Intake
request-service/main.py - Request Records
request-service/main.py - Center Management
center-service/main.py - Center Inventory
center-service/main.py - Stock Discovery
center-service/main.py
Allocation Decisions
- Request Consumer
allocation-service/main.py - Allocation State
allocation-service/main.py - Priority Ranking
allocation-service/main.py - Supplier Recommendations
allocation-service/main.py - Supplier Decisions
allocation-service/main.py
Operator Dashboard
- Web Console
dashboard/index.html - Dashboard Gateway
dashboard/main.py - Live Event Stream
dashboard/main.py - Queue Monitor
dashboard/main.py - Service Controls
dashboard/main.py
Messaging and Services
- RabbitMQ Broker
- Docker Engine
Other components
- Relief Operator
Connections 29
- Relief Operator → Web Console: uses console
README.md - Web Console → Dashboard Gateway: calls API
README.md - Dashboard Gateway → Request Intake: forwards requests
dashboard/main.py - Dashboard Gateway → Center Management: forwards center changes
dashboard/main.py - Dashboard Gateway → Supplier Decisions: forwards decisions
dashboard/main.py - Dashboard Gateway → Request Intake: fetches requests
dashboard/main.py - Dashboard Gateway → Center Management: fetches centers
dashboard/main.py - Dashboard Gateway → Supplier Recommendations: fetches recommendations
dashboard/main.py - Request Intake → Request Records: records request
request-service/main.py - Request Intake → RabbitMQ Broker: publishes request.created
request-service/main.py - Center Management → Center Inventory: updates inventory
center-service/main.py - Center Management → RabbitMQ Broker: publishes inventory.updated
center-service/main.py - Request Consumer → RabbitMQ Broker: consumes request.created
allocation-service/main.py - Request Consumer → Allocation State: records requests
allocation-service/main.py - Request Consumer → Priority Ranking: triggers recompute
allocation-service/main.py - Priority Ranking → Stock Discovery: fetches shareable stock
allocation-service/main.py - Priority Ranking → Allocation State: ranks pending requests
allocation-service/main.py - Priority Ranking → Supplier Recommendations: updates recommendations
allocation-service/main.py - Supplier Recommendations → RabbitMQ Broker: publishes allocation.recommended
allocation-service/main.py - Supplier Decisions → Allocation State: records decision
allocation-service/main.py - Supplier Decisions → RabbitMQ Broker: publishes approval or rejection
allocation-service/main.py - Dashboard Gateway → Live Event Stream: serves event stream
dashboard/main.py - Live Event Stream → RabbitMQ Broker: listens to events
dashboard/main.py - Dashboard Gateway → Queue Monitor: serves queue health
dashboard/main.py - Queue Monitor → RabbitMQ Broker: reads queue depth
dashboard/main.py - Dashboard Gateway → Service Controls: routes controls
dashboard/main.py - Service Controls → Docker Engine: starts or stops containers
dashboard/main.py - Dashboard Gateway → RabbitMQ Broker: purges queue on reset
dashboard/main.py - Service Controls → Relief Operator: reports control status