How aryaa-7/relief-link works
ReliefLink is an offline-capable disaster-relief reporting hub: phone reports reach a FastAPI service, are stored in MongoDB, and are triaged by a background worker using a networked Ollama server or rule-based fallback. Coordinators review reports, update cases, manage AI-server settings, and request resource matching through a locally served dashboard. The README documents the Flutter client and offline sync, but this tree contains no Flutter application source; its internal workflow is therefore represented only at the documented boundary. Relationships for unsampled routes are limited to indexed references or README statements.
Main entry points: main.py FastAPI hub · worker.py Background AI worker · store.py MongoDB store operations · admin.py Admin endpoints
Components 20
Clients
- Coordinator dashboard
dashboard/src/App.jsx - Dashboard API client
dashboard/src/api.js
Hub API
- FastAPI hub
app/main.py - Report endpoints
app/routes/reports.py - Admin endpoints
app/routes/admin.py - Resource endpoints
app/routes/resources.py - Matching endpoints
app/routes/matches.py - Location endpoints
app/routes/locations.py - API models
app/models.py
AI Triage
- Background AI worker
app/worker.py - AI triage and validation
app/ai/triage.py - Ollama client
app/ai/ollama_client.py - Rule-based fallback
app/ai/fallback.py - AI runtime status
app/runtime.py - Ollama AI server
Relief Data
- MongoDB store operations
app/store.py - MongoDB
Coordination
- Resource matching
app/store.py
Other components
- Volunteer phones
- Coordinator
Connections 31
- Volunteer phones → FastAPI hub: submits reports
- Coordinator → Coordinator dashboard: reviews cases
- Coordinator dashboard → Dashboard API client: calls
dashboard/src/App.jsx - Dashboard API client → FastAPI hub: polls and updates
- FastAPI hub → Report endpoints: routes requests
app/main.py - FastAPI hub → Admin endpoints: routes requests
app/main.py - FastAPI hub → Resource endpoints: routes requests
app/main.py - FastAPI hub → Matching endpoints: routes requests
app/main.py - FastAPI hub → Location endpoints: routes requests
app/main.py - FastAPI hub → Background AI worker: starts worker
app/main.py - Report endpoints → MongoDB store operations: stores and queries
app/routes/reports.py - Admin endpoints → MongoDB store operations: reads and saves
app/routes/admin.py - Admin endpoints → Ollama client: tests connection
app/routes/admin.py - Admin endpoints → AI runtime status: updates settings
app/routes/admin.py - Background AI worker → MongoDB store operations: claims and saves reports
app/worker.py - Background AI worker → AI triage and validation: runs triage
app/worker.py - Background AI worker → Rule-based fallback: uses on failure
app/worker.py - Background AI worker → Ollama client: checks availability
app/worker.py - AI triage and validation → Ollama client: requests model output
app/ai/triage.py - Ollama client → AI runtime status: reads connection settings
app/ai/ollama_client.py - Ollama client → Ollama AI server: sends HTTP requests
app/ai/ollama_client.py - Background AI worker → AI runtime status: updates AI status
app/worker.py - MongoDB store operations → MongoDB: reads and writes
app/store.py - Resource endpoints → MongoDB store operations: stores and lists resources
app/routes/resources.py - Matching endpoints → MongoDB store operations: runs and lists matches
app/routes/matches.py - Matching endpoints → Resource matching: requests matching
app/routes/matches.py - Resource matching → MongoDB: reads resources and reports
app/store.py - Location endpoints → API models: returns location data
app/routes/locations.py - Report endpoints → API models: validates API data
app/routes/reports.py - Coordinator dashboard → Admin endpoints: configures AI server
dashboard/src/App.jsx - Coordinator dashboard → Matching endpoints: requests matching
dashboard/src/App.jsx