# poojitha-s-004/reliefops architecture

> Architecture diagram of the GitHub repository poojitha-s-004/reliefops, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/poojitha-s-004/reliefops
- Repository: https://github.com/poojitha-s-004/reliefops

## Overview

ReliefOps pairs a Django/GeoDjango API with a React coordination console. The user journey is sign-in, view operational data, report incidents or manage assistance/resources, then review coordinator-facing duplicate suggestions; most frontend workflows use simulated browser data, while authentication is integrated with the backend. Backend capabilities include domain workflows, PostGIS proximity queries, and review-only AI similarity suggestions. The sampled sources show frontend routing, auth/session handling, data-service calls, and matching orchestration. Other API and workflow links are documented at a capability level rather than verified in sampled view code.

Main entry points: [`backend/api`](https://github.com/poojitha-s-004/reliefops/tree/main/backend/api) (Django API surface), [`frontend/src/routes/AppRoutes.jsx`](https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/routes/AppRoutes.jsx) (Application routes), [`backend/matching/orchestration.py`](https://github.com/poojitha-s-004/reliefops/blob/main/backend/matching/orchestration.py) (Match orchestration), [`frontend/src/contexts/DataContext.jsx`](https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/contexts/DataContext.jsx) (Workflow data state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Coordination console"]
  node_routes["Application routes<br/>[AppRoutes.jsx]"]
  node_dashboard["Operational dashboard<br/>[DashboardPage.jsx]"]
  node_incident_ui["Incident reporting and maps"]
  node_assistance_ui["Assistance workflows<br/>[AssistancePage.jsx]"]
  node_resources_ui["Resource console<br/>[ResourcesPage.jsx]"]
  node_review_ui["Duplicate review"]
  node_data_context["Workflow data state<br/>[DataContext.jsx]"]
  node_mock_data[("Simulated workflow data<br/>[mockData.js]")]
  node_api_services["Domain API services"]
end

subgraph group_auth["Identity"]
  node_auth_context["Authentication state<br/>[AuthContext.jsx]"]
  node_auth_service["Auth API service<br/>[authService.js]"]
  node_api_client["HTTP client and refresh<br/>[apiClient.js]"]
  node_token_storage[("Browser session storage<br/>[tokenStorage.js]")]
end

subgraph group_backend["Backend operations"]
  node_api["Django API surface"]
  node_accounts[("Accounts and JWT<br/>[models.py]")]
  node_geo["Geospatial queries<br/>[geospatial.py]"]
end

subgraph group_matching["Similarity matching"]
  node_matching_orch["Match orchestration<br/>[orchestration.py]"]
  node_incident_candidates["Incident candidates<br/>[incidents.py]"]
  node_need_candidates["Need candidates<br/>[needs.py]"]
  node_scoring["Candidate scoring<br/>[scoring.py]"]
  node_embeddings["Semantic embeddings<br/>[embeddings.py]"]
  node_persistence[("Suggestion persistence<br/>[persistence.py]")]
end

subgraph group_domain["Response domains"]
  node_incident_domain["Incident workflows<br/>[workflows.py]"]
  node_assistance_domain["Assistance fulfillment<br/>[fulfillment.py]"]
  node_coordination_domain[("Coordination records<br/>[models.py]")]
  node_resource_domain["Resource workflows<br/>[workflows.py]"]
end

node_user(("Coordinator or reporter"))

node_user -->|"opens workspace"| node_routes
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_incident_ui
node_routes -->|"routes to"| node_assistance_ui
node_routes -->|"routes to"| node_resources_ui
node_routes -->|"routes to"| node_review_ui
node_user -->|"signs in"| node_auth_context
node_auth_context -->|"calls"| node_auth_service
node_auth_service -->|"sends auth requests"| node_api_client
node_auth_service -->|"reads and saves session"| node_token_storage
node_api_client -->|"reads and refreshes tokens"| node_token_storage
node_data_context -->|"loads seed data"| node_mock_data
node_data_context -->|"fetches workflow data"| node_api_services
node_incident_ui -.->|"submits reports"| node_data_context
node_assistance_ui -.->|"uses workflow data"| node_data_context
node_resources_ui -.->|"uses workflow data"| node_data_context
node_review_ui -->|"updates review state"| node_data_context
node_api -.->|"provides JWT auth"| node_accounts
node_api -.->|"exposes incident workflows"| node_incident_domain
node_api -.->|"exposes domain workflows"| node_assistance_domain
node_api -.->|"exposes domain workflows"| node_coordination_domain
node_api -.->|"exposes domain workflows"| node_resource_domain
node_api -.->|"provides proximity queries"| node_geo
node_api -.->|"offers similarity suggestions"| node_matching_orch
node_matching_orch -->|"generates candidates"| node_incident_candidates
node_matching_orch -->|"gets embedder"| node_embeddings
node_matching_orch -->|"validates radius"| node_geo
node_matching_orch -.->|"generates candidates"| node_need_candidates
node_incident_candidates -->|"uses scoring"| node_scoring
node_need_candidates -->|"uses scoring"| node_scoring
node_matching_orch -.->|"persists suggestions"| node_persistence

click node_routes "https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/routes/AppRoutes.jsx"
click node_dashboard "https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/pages/DashboardPage.jsx"
click node_incident_ui "https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/pages/ReportIncidentPage.jsx"
click node_assistance_ui "https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/pages/AssistancePage.jsx"
click node_resources_ui "https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/pages/ResourcesPage.jsx"
click node_review_ui "https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/pages/DuplicateReviewPage.jsx"
click node_data_context "https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/contexts/DataContext.jsx"
click node_mock_data "https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/data/mockData.js"
click node_api_services "https://github.com/poojitha-s-004/reliefops/tree/main/frontend/src/services"
click node_auth_context "https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/contexts/AuthContext.jsx"
click node_auth_service "https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/services/authService.js"
click node_api_client "https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/services/apiClient.js"
click node_token_storage "https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/services/tokenStorage.js"
click node_api "https://github.com/poojitha-s-004/reliefops/tree/main/backend/api"
click node_accounts "https://github.com/poojitha-s-004/reliefops/blob/main/backend/accounts/models.py"
click node_incident_domain "https://github.com/poojitha-s-004/reliefops/blob/main/backend/incidents/workflows.py"
click node_assistance_domain "https://github.com/poojitha-s-004/reliefops/blob/main/backend/assistance/fulfillment.py"
click node_coordination_domain "https://github.com/poojitha-s-004/reliefops/blob/main/backend/coordination/models.py"
click node_resource_domain "https://github.com/poojitha-s-004/reliefops/blob/main/backend/resources/workflows.py"
click node_geo "https://github.com/poojitha-s-004/reliefops/blob/main/backend/common/geospatial.py"
click node_matching_orch "https://github.com/poojitha-s-004/reliefops/blob/main/backend/matching/orchestration.py"
click node_incident_candidates "https://github.com/poojitha-s-004/reliefops/blob/main/backend/matching/incidents.py"
click node_need_candidates "https://github.com/poojitha-s-004/reliefops/blob/main/backend/matching/needs.py"
click node_scoring "https://github.com/poojitha-s-004/reliefops/blob/main/backend/matching/scoring.py"
click node_embeddings "https://github.com/poojitha-s-004/reliefops/blob/main/backend/matching/embeddings.py"
click node_persistence "https://github.com/poojitha-s-004/reliefops/blob/main/backend/matching/persistence.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_routes,node_dashboard,node_incident_ui,node_assistance_ui,node_resources_ui,node_review_ui,node_data_context,node_mock_data,node_api_services toneBlue
class node_auth_context,node_auth_service,node_api_client,node_token_storage toneAmber
class node_api,node_accounts,node_geo toneMint
class node_matching_orch,node_incident_candidates,node_need_candidates,node_scoring,node_embeddings,node_persistence toneRose
class node_incident_domain,node_assistance_domain,node_coordination_domain,node_resource_domain,node_user toneIndigo
```

## Components

### Coordination console

- [Application routes](https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/routes/AppRoutes.jsx): `frontend/src/routes/AppRoutes.jsx`
- [Operational dashboard](https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/pages/DashboardPage.jsx): `frontend/src/pages/DashboardPage.jsx`
- [Incident reporting and maps](https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/pages/ReportIncidentPage.jsx): `frontend/src/pages/ReportIncidentPage.jsx`
- [Assistance workflows](https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/pages/AssistancePage.jsx): `frontend/src/pages/AssistancePage.jsx`
- [Resource console](https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/pages/ResourcesPage.jsx): `frontend/src/pages/ResourcesPage.jsx`
- [Duplicate review](https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/pages/DuplicateReviewPage.jsx): `frontend/src/pages/DuplicateReviewPage.jsx`
- [Workflow data state](https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/contexts/DataContext.jsx): `frontend/src/contexts/DataContext.jsx`
- [Simulated workflow data](https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/data/mockData.js): `frontend/src/data/mockData.js`
- [Domain API services](https://github.com/poojitha-s-004/reliefops/tree/main/frontend/src/services): `frontend/src/services`

### Identity

- [Authentication state](https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/contexts/AuthContext.jsx): `frontend/src/contexts/AuthContext.jsx`
- [Auth API service](https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/services/authService.js): `frontend/src/services/authService.js`
- [HTTP client and refresh](https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/services/apiClient.js): `frontend/src/services/apiClient.js`
- [Browser session storage](https://github.com/poojitha-s-004/reliefops/blob/main/frontend/src/services/tokenStorage.js): `frontend/src/services/tokenStorage.js`

### Backend operations

- [Django API surface](https://github.com/poojitha-s-004/reliefops/tree/main/backend/api): `backend/api`
- [Accounts and JWT](https://github.com/poojitha-s-004/reliefops/blob/main/backend/accounts/models.py): `backend/accounts/models.py`
- [Geospatial queries](https://github.com/poojitha-s-004/reliefops/blob/main/backend/common/geospatial.py): `backend/common/geospatial.py`

### Similarity matching

- [Match orchestration](https://github.com/poojitha-s-004/reliefops/blob/main/backend/matching/orchestration.py): `backend/matching/orchestration.py`
- [Incident candidates](https://github.com/poojitha-s-004/reliefops/blob/main/backend/matching/incidents.py): `backend/matching/incidents.py`
- [Need candidates](https://github.com/poojitha-s-004/reliefops/blob/main/backend/matching/needs.py): `backend/matching/needs.py`
- [Candidate scoring](https://github.com/poojitha-s-004/reliefops/blob/main/backend/matching/scoring.py): `backend/matching/scoring.py`
- [Semantic embeddings](https://github.com/poojitha-s-004/reliefops/blob/main/backend/matching/embeddings.py): `backend/matching/embeddings.py`
- [Suggestion persistence](https://github.com/poojitha-s-004/reliefops/blob/main/backend/matching/persistence.py): `backend/matching/persistence.py`

### Response domains

- [Incident workflows](https://github.com/poojitha-s-004/reliefops/blob/main/backend/incidents/workflows.py): `backend/incidents/workflows.py`
- [Assistance fulfillment](https://github.com/poojitha-s-004/reliefops/blob/main/backend/assistance/fulfillment.py): `backend/assistance/fulfillment.py`
- [Coordination records](https://github.com/poojitha-s-004/reliefops/blob/main/backend/coordination/models.py): `backend/coordination/models.py`
- [Resource workflows](https://github.com/poojitha-s-004/reliefops/blob/main/backend/resources/workflows.py): `backend/resources/workflows.py`

### Other components

- **Coordinator or reporter**

## Connections

- Coordinator or reporter → Application routes: opens workspace (evidence: `frontend/src/routes/AppRoutes.jsx`)
- Application routes → Operational dashboard: routes to (evidence: `frontend/src/routes/AppRoutes.jsx`)
- Application routes → Incident reporting and maps: routes to (evidence: `frontend/src/routes/AppRoutes.jsx`)
- Application routes → Assistance workflows: routes to (evidence: `frontend/src/routes/AppRoutes.jsx`)
- Application routes → Resource console: routes to (evidence: `frontend/src/routes/AppRoutes.jsx`)
- Application routes → Duplicate review: routes to (evidence: `frontend/src/routes/AppRoutes.jsx`)
- Coordinator or reporter → Authentication state: signs in (evidence: `README.md`)
- Authentication state → Auth API service: calls (evidence: `frontend/src/contexts/AuthContext.jsx`)
- Auth API service → HTTP client and refresh: sends auth requests (evidence: `frontend/src/services/authService.js`)
- Auth API service → Browser session storage: reads and saves session (evidence: `frontend/src/services/authService.js`)
- HTTP client and refresh → Browser session storage: reads and refreshes tokens (evidence: `frontend/src/services/apiClient.js`)
- Workflow data state → Simulated workflow data: loads seed data (evidence: `frontend/src/contexts/DataContext.jsx`)
- Workflow data state → Domain API services: fetches workflow data (evidence: `frontend/src/contexts/DataContext.jsx`)
- Incident reporting and maps → Workflow data state: submits reports
- Assistance workflows → Workflow data state: uses workflow data
- Resource console → Workflow data state: uses workflow data
- Duplicate review → Workflow data state: updates review state (evidence: `frontend/src/pages/DuplicateReviewPage.jsx`)
- Django API surface → Accounts and JWT: provides JWT auth (evidence: `README.md`)
- Django API surface → Incident workflows: exposes incident workflows (evidence: `README.md`)
- Django API surface → Assistance fulfillment: exposes domain workflows (evidence: `README.md`)
- Django API surface → Coordination records: exposes domain workflows (evidence: `README.md`)
- Django API surface → Resource workflows: exposes domain workflows (evidence: `README.md`)
- Django API surface → Geospatial queries: provides proximity queries (evidence: `README.md`)
- Django API surface → Match orchestration: offers similarity suggestions (evidence: `README.md`)
- Match orchestration → Incident candidates: generates candidates (evidence: `backend/matching/orchestration.py`)
- Match orchestration → Semantic embeddings: gets embedder (evidence: `backend/matching/orchestration.py`)
- Match orchestration → Geospatial queries: validates radius (evidence: `backend/matching/orchestration.py`)
- Match orchestration → Need candidates: generates candidates (evidence: `backend/matching/orchestration.py`)
- Incident candidates → Candidate scoring: uses scoring (evidence: `backend/matching/incidents.py`)
- Need candidates → Candidate scoring: uses scoring (evidence: `backend/matching/needs.py`)
- Match orchestration → Suggestion persistence: persists suggestions (evidence: `backend/matching/orchestration.py`)
