# it24101153/rescuesrilanka-sef_kdy_se_02 architecture

> Architecture diagram of the GitHub repository it24101153/rescuesrilanka-sef_kdy_se_02, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/it24101153/rescuesrilanka-sef_kdy_se_02
- Repository: https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02

## Overview

Rescue Sri Lanka is a disaster-response platform with a web coordination console and a backend API; the tree also shows a mobile client, but its application source is not present. The main workflow is incident or help-request intake, analysis and prioritization, then resource/team coordination and dispatch decisions. The graph includes resource operations, safety zones, notifications, and authentication as related capabilities. The README is empty, so product scope and unsampled subsystem wiring are inferred cautiously from the tree and sampled excerpts.

Main entry points: [`frontend/src/App.tsx`](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/frontend/src/App.tsx) (Console app), [`backend/RescueSriLanka.Api/Program.cs`](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Program.cs) (Rescue API), [`backend/RescueSriLanka.Api/Features/ComponentA/Controllers/IncidentsController.cs`](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentA/Controllers/IncidentsController.cs) (Incident endpoints), [`backend/RescueSriLanka.Api/Features/ComponentA/Services/ImageStorageService.cs`](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentA/Services/ImageStorageService.cs) (Incident photos)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web console"]
  node_console["Console app<br/>[App.tsx]"]
  node_incident_ui["Incident dashboard"]
  node_help_ui["Help dashboard"]
  node_rescue_ui["Rescue dashboard"]
  node_auth_ui["Sign-in<br/>[authService.ts]"]
end

subgraph group_intake["Incident and requests"]
  node_incident_controller["Incident endpoints"]
  node_incident_service["Incident handling<br/>[IncidentService.cs]"]
  node_analysis_agent["Incident analysis"]
  node_image_service["Incident photos"]
  node_help_controller["Help requests"]
  node_help_service["Request handling"]
  node_planner["Workflow planner"]
  node_safety_zones["Safety zones"]
  node_notifications["Notifications"]
end

subgraph group_response["Response coordination"]
  node_resource_controller["Resource endpoints"]
  node_resource_service["Resource management"]
  node_dispatch_controller["Dispatch endpoints"]
  node_dispatch_service["Dispatch decisions<br/>[DispatchService.cs]"]
  node_orchestrator["Agent orchestration"]
  node_safety["Safety validation"]
  node_teams["Rescue teams"]
  node_dispatch_db[("Coordination data")]
end

subgraph group_platform["Shared platform"]
  node_api["Rescue API<br/>[Program.cs]"]
  node_auth_controller["Auth endpoints<br/>[AuthController.cs]"]
  node_auth_service["Authentication<br/>[AuthService.cs]"]
  node_app_db[("Application data<br/>[AppDbContext.cs]")]
  node_image_store["Image storage<br/>[IImageStore.cs]"]
  node_gemini["Gemini analysis"]
  node_email["Email service<br/>[IEmailSender.cs]"]
end

node_citizen(("Citizen"))
node_coordinator(("Coordinator"))
node_mobile(("Mobile client"))

node_citizen -->|"uses"| node_console
node_coordinator -->|"uses"| node_console
node_console -->|"renders"| node_auth_ui
node_console -->|"routes"| node_incident_ui
node_console -->|"routes"| node_help_ui
node_console -->|"routes"| node_rescue_ui
node_auth_ui -->|"signs in"| node_api
node_incident_ui -->|"requests data"| node_api
node_help_ui -->|"requests data"| node_api
node_rescue_ui -->|"requests data"| node_api
node_mobile -->|"submits requests"| node_api
node_api -->|"hosts"| node_auth_controller
node_auth_controller -->|"calls"| node_auth_service
node_auth_service -->|"reads/writes"| node_app_db
node_incident_controller -->|"calls"| node_incident_service
node_incident_controller -->|"uploads photos"| node_image_service
node_image_service -->|"records images"| node_app_db
node_image_service -->|"stores/loads bytes"| node_image_store
node_incident_controller -->|"runs analysis"| node_analysis_agent
node_help_controller -->|"calls"| node_help_service
node_help_controller -->|"triggers workflow"| node_planner
node_planner -.->|"analyzes requests"| node_gemini
node_resource_controller -->|"calls"| node_resource_service
node_dispatch_controller -->|"calls"| node_dispatch_service
node_dispatch_service -->|"reads/writes"| node_dispatch_db
node_teams -->|"manages teams"| node_dispatch_db
node_safety_zones -->|"reads/writes"| node_app_db
node_notifications -.->|"sends mail"| node_email

click node_console "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/frontend/src/App.tsx"
click node_incident_ui "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/frontend/src/components/componentA/DisasterDashboard.tsx"
click node_help_ui "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/frontend/src/components/componentB/HelpRequestDashboard.tsx"
click node_rescue_ui "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/frontend/src/components/componentD/RescueCoordinatorDashboard.tsx"
click node_auth_ui "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/frontend/src/shared/auth/authService.ts"
click node_api "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Program.cs"
click node_auth_controller "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Controllers/AuthController.cs"
click node_auth_service "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Services/AuthService.cs"
click node_app_db "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Data/AppDbContext.cs"
click node_incident_controller "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentA/Controllers/IncidentsController.cs"
click node_incident_service "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentA/Services/IncidentService.cs"
click node_analysis_agent "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentA/Agents/IncidentAnalysisAgent/IncidentAnalysisAgent.cs"
click node_image_service "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentA/Services/ImageStorageService.cs"
click node_image_store "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Services/Storage/IImageStore.cs"
click node_help_controller "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentB/Controllers/HelpRequestsController.cs"
click node_help_service "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentB/Services/HelpRequestService.cs"
click node_planner "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentB/Agents/PlannerAgent/PlannerAgentService.cs"
click node_gemini "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentB/Services/GeminiAnalysisService.cs"
click node_resource_controller "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentC/Controllers/ResourcesController.cs"
click node_resource_service "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentC/Services/ResourceManagementService.cs"
click node_dispatch_controller "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentD/Controllers/DispatchesController.cs"
click node_dispatch_service "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentD/Services/DispatchService.cs"
click node_orchestrator "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentD/Agents/Orchestration/AgentOrchestrator.cs"
click node_safety "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentD/Agents/SafetyValidation/SafetyValidationAgent.cs"
click node_teams "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentD/Services/RescueTeamService.cs"
click node_dispatch_db "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentD/Data/ComponentDDbContext.cs"
click node_safety_zones "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentA/Services/SafetyZoneService.cs"
click node_notifications "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentA/Services/Notifications/NotificationService.cs"
click node_email "https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Services/Email/IEmailSender.cs"

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_console,node_incident_ui,node_help_ui,node_rescue_ui,node_auth_ui,node_mobile toneBlue
class node_incident_controller,node_incident_service,node_analysis_agent,node_image_service,node_help_controller,node_help_service,node_planner,node_safety_zones,node_notifications toneAmber
class node_resource_controller,node_resource_service,node_dispatch_controller,node_dispatch_service,node_orchestrator,node_safety,node_teams,node_dispatch_db toneMint
class node_api,node_auth_controller,node_auth_service,node_app_db,node_image_store,node_gemini,node_email toneRose
class node_citizen,node_coordinator toneIndigo
```

## Components

### Web console

- [Console app](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Incident dashboard](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/frontend/src/components/componentA/DisasterDashboard.tsx): `frontend/src/components/componentA/DisasterDashboard.tsx`
- [Help dashboard](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/frontend/src/components/componentB/HelpRequestDashboard.tsx): `frontend/src/components/componentB/HelpRequestDashboard.tsx`
- [Rescue dashboard](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/frontend/src/components/componentD/RescueCoordinatorDashboard.tsx): `frontend/src/components/componentD/RescueCoordinatorDashboard.tsx`
- [Sign-in](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/frontend/src/shared/auth/authService.ts): `frontend/src/shared/auth/authService.ts`

### Incident and requests

- [Incident endpoints](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentA/Controllers/IncidentsController.cs): `backend/RescueSriLanka.Api/Features/ComponentA/Controllers/IncidentsController.cs`
- [Incident handling](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentA/Services/IncidentService.cs): `backend/RescueSriLanka.Api/Features/ComponentA/Services/IncidentService.cs`
- [Incident analysis](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentA/Agents/IncidentAnalysisAgent/IncidentAnalysisAgent.cs): `backend/RescueSriLanka.Api/Features/ComponentA/Agents/IncidentAnalysisAgent/IncidentAnalysisAgent.cs`
- [Incident photos](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentA/Services/ImageStorageService.cs): `backend/RescueSriLanka.Api/Features/ComponentA/Services/ImageStorageService.cs`
- [Help requests](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentB/Controllers/HelpRequestsController.cs): `backend/RescueSriLanka.Api/Features/ComponentB/Controllers/HelpRequestsController.cs`
- [Request handling](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentB/Services/HelpRequestService.cs): `backend/RescueSriLanka.Api/Features/ComponentB/Services/HelpRequestService.cs`
- [Workflow planner](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentB/Agents/PlannerAgent/PlannerAgentService.cs): `backend/RescueSriLanka.Api/Features/ComponentB/Agents/PlannerAgent/PlannerAgentService.cs`
- [Safety zones](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentA/Services/SafetyZoneService.cs): `backend/RescueSriLanka.Api/Features/ComponentA/Services/SafetyZoneService.cs`
- [Notifications](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentA/Services/Notifications/NotificationService.cs): `backend/RescueSriLanka.Api/Features/ComponentA/Services/Notifications/NotificationService.cs`

### Response coordination

- [Resource endpoints](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentC/Controllers/ResourcesController.cs): `backend/RescueSriLanka.Api/Features/ComponentC/Controllers/ResourcesController.cs`
- [Resource management](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentC/Services/ResourceManagementService.cs): `backend/RescueSriLanka.Api/Features/ComponentC/Services/ResourceManagementService.cs`
- [Dispatch endpoints](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentD/Controllers/DispatchesController.cs): `backend/RescueSriLanka.Api/Features/ComponentD/Controllers/DispatchesController.cs`
- [Dispatch decisions](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentD/Services/DispatchService.cs): `backend/RescueSriLanka.Api/Features/ComponentD/Services/DispatchService.cs`
- [Agent orchestration](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentD/Agents/Orchestration/AgentOrchestrator.cs): `backend/RescueSriLanka.Api/Features/ComponentD/Agents/Orchestration/AgentOrchestrator.cs`
- [Safety validation](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentD/Agents/SafetyValidation/SafetyValidationAgent.cs): `backend/RescueSriLanka.Api/Features/ComponentD/Agents/SafetyValidation/SafetyValidationAgent.cs`
- [Rescue teams](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentD/Services/RescueTeamService.cs): `backend/RescueSriLanka.Api/Features/ComponentD/Services/RescueTeamService.cs`
- [Coordination data](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentD/Data/ComponentDDbContext.cs): `backend/RescueSriLanka.Api/Features/ComponentD/Data/ComponentDDbContext.cs`

### Shared platform

- [Rescue API](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Program.cs): `backend/RescueSriLanka.Api/Program.cs`
- [Auth endpoints](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Controllers/AuthController.cs): `backend/RescueSriLanka.Api/Controllers/AuthController.cs`
- [Authentication](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Services/AuthService.cs): `backend/RescueSriLanka.Api/Services/AuthService.cs`
- [Application data](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Data/AppDbContext.cs): `backend/RescueSriLanka.Api/Data/AppDbContext.cs`
- [Image storage](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Services/Storage/IImageStore.cs): `backend/RescueSriLanka.Api/Services/Storage/IImageStore.cs`
- [Gemini analysis](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Features/ComponentB/Services/GeminiAnalysisService.cs): `backend/RescueSriLanka.Api/Features/ComponentB/Services/GeminiAnalysisService.cs`
- [Email service](https://github.com/it24101153/rescuesrilanka-sef_kdy_se_02/blob/main/backend/RescueSriLanka.Api/Services/Email/IEmailSender.cs): `backend/RescueSriLanka.Api/Services/Email/IEmailSender.cs`

### Other components

- **Citizen**
- **Coordinator**
- **Mobile client**

## Connections

- Citizen → Console app: uses
- Coordinator → Console app: uses
- Console app → Sign-in: renders
- Console app → Incident dashboard: routes
- Console app → Help dashboard: routes
- Console app → Rescue dashboard: routes
- Sign-in → Rescue API: signs in
- Incident dashboard → Rescue API: requests data
- Help dashboard → Rescue API: requests data
- Rescue dashboard → Rescue API: requests data
- Mobile client → Rescue API: submits requests
- Rescue API → Auth endpoints: hosts
- Auth endpoints → Authentication: calls
- Authentication → Application data: reads/writes
- Incident endpoints → Incident handling: calls
- Incident endpoints → Incident photos: uploads photos
- Incident photos → Application data: records images
- Incident photos → Image storage: stores/loads bytes
- Incident endpoints → Incident analysis: runs analysis
- Help requests → Request handling: calls
- Help requests → Workflow planner: triggers workflow
- Workflow planner → Gemini analysis: analyzes requests
- Resource endpoints → Resource management: calls
- Dispatch endpoints → Dispatch decisions: calls
- Dispatch decisions → Coordination data: reads/writes
- Rescue teams → Coordination data: manages teams
- Safety zones → Application data: reads/writes
- Notifications → Email service: sends mail
