# jpromi/fire-where architecture

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

- Interactive diagram: https://gitdiagram.com/jpromi/fire-where
- Repository: https://github.com/jpromi/fire-where

## Overview

Fire Where is a mobile app for viewing public fire-service incidents across much of Austria, with fire-department profiles, regional and district browsing, incident details, and configurable preferences. The main workflow is browsing incidents and opening their details; the app also exposes department-specific incident history and favourites/settings, while an iOS widget presents an operation list. The README identifies Operation Point as the data origin. Some screen and widget implementations were not excerpted, so their links to services are shown as unverified rather than asserted.

Main entry points: [`services/FiredepartmentService.ts`](https://github.com/jpromi/fire-where/blob/main/services/FiredepartmentService.ts) (Department queries), [`services/OperationService.ts`](https://github.com/jpromi/fire-where/blob/main/services/OperationService.ts) (Incident queries), [`services/ApiClient.ts`](https://github.com/jpromi/fire-where/blob/main/services/ApiClient.ts) (API client), [`app/(tabs)/operation/index.tsx`](https://github.com/jpromi/fire-where/blob/main/app/(tabs)/operation/index.tsx) (Incident browsing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["App experience"]
  node_app_shell["App shell<br/>[_layout.tsx]"]
  node_incident_browse["Incident browsing<br/>[index.tsx]"]
  node_regional_browse["Regional browsing<br/>[&#91;districtId&#93;.tsx]"]
  node_incident_detail["Incident details<br/>[&#91;uuid&#93;.tsx]"]
  node_department_browse["Department search<br/>[index.tsx]"]
  node_department_profile["Department profile<br/>[index.tsx]"]
  node_department_operations["Department incidents<br/>[operation.tsx]"]
  node_settings_ui["Settings screens<br/>[index.tsx]"]
end

subgraph group_domain["Incident domain"]
  node_operation_model["Operation model<br/>[Operation.ts]"]
  node_operation_variables["Incident presentation"]
end

subgraph group_data["Data and preferences"]
  node_firedepartment_service["Department queries"]
  node_operation_service["Incident queries"]
  node_service_status["Service status<br/>[ServiceService.ts]"]
  node_api_client["API client<br/>[ApiClient.ts]"]
  node_favourites["Favourites"]
  node_settings_service["Settings storage<br/>[SettingService.ts]"]
  node_settings_local["Settings cache"]
end

subgraph group_widget["iOS widget"]
  node_ios_widget["Operation list widget"]
  node_ios_operation_service["iOS incident queries"]
  node_ios_api_client["iOS API client<br/>[ApiClient.swift]"]
end

node_user(("App user"))
node_operation_point["Operation Point API"]

node_user -->|"opens app"| node_app_shell
node_app_shell -.->|"routes to"| node_incident_browse
node_user -.->|"browses incidents"| node_incident_browse
node_incident_browse -.->|"requests incidents"| node_operation_service
node_regional_browse -.->|"requests region"| node_operation_service
node_incident_detail -.->|"loads incident"| node_operation_service
node_department_browse -.->|"searches departments"| node_firedepartment_service
node_department_profile -.->|"loads department"| node_firedepartment_service
node_department_operations -.->|"loads incidents"| node_firedepartment_service
node_settings_ui -.->|"reads settings"| node_settings_service
node_operation_service -->|"sends requests"| node_api_client
node_firedepartment_service -->|"sends requests"| node_api_client
node_service_status -->|"sends requests"| node_api_client
node_api_client -->|"fetches data"| node_operation_point
node_settings_service -->|"updates cache"| node_settings_local
node_ios_widget -->|"loads operation list"| node_ios_operation_service
node_ios_operation_service -->|"requests operations"| node_ios_api_client

click node_app_shell "https://github.com/jpromi/fire-where/blob/main/app/_layout.tsx"
click node_incident_browse "https://github.com/jpromi/fire-where/blob/main/app/(tabs)/operation/index.tsx"
click node_regional_browse "https://github.com/jpromi/fire-where/blob/main/app/(tabs)/operation/%5BfederalStateId%5D/%5BdistrictId%5D.tsx"
click node_incident_detail "https://github.com/jpromi/fire-where/blob/main/app/(tabs)/operation/details/%5Buuid%5D.tsx"
click node_department_browse "https://github.com/jpromi/fire-where/blob/main/app/(tabs)/firedepartment/index.tsx"
click node_department_profile "https://github.com/jpromi/fire-where/blob/main/app/(tabs)/firedepartment/%5Buuid%5D/index.tsx"
click node_department_operations "https://github.com/jpromi/fire-where/blob/main/app/(tabs)/firedepartment/%5Buuid%5D/operation.tsx"
click node_settings_ui "https://github.com/jpromi/fire-where/blob/main/app/(tabs)/settings/index.tsx"
click node_operation_model "https://github.com/jpromi/fire-where/blob/main/models/Operation.ts"
click node_firedepartment_service "https://github.com/jpromi/fire-where/blob/main/services/FiredepartmentService.ts"
click node_operation_service "https://github.com/jpromi/fire-where/blob/main/services/OperationService.ts"
click node_service_status "https://github.com/jpromi/fire-where/blob/main/services/ServiceService.ts"
click node_api_client "https://github.com/jpromi/fire-where/blob/main/services/ApiClient.ts"
click node_favourites "https://github.com/jpromi/fire-where/blob/main/services/local/FavouritesService.ts"
click node_settings_service "https://github.com/jpromi/fire-where/blob/main/services/local/SettingService.ts"
click node_settings_local "https://github.com/jpromi/fire-where/blob/main/services/local/SettingLocalService.ts"
click node_operation_variables "https://github.com/jpromi/fire-where/blob/main/services/local/OperationVariablesService.ts"
click node_ios_widget "https://github.com/jpromi/fire-where/blob/main/ios/OperationListWidget/OperationListWidget.swift"
click node_ios_operation_service "https://github.com/jpromi/fire-where/blob/main/ios/Shared/Networking/OperationService.swift"
click node_ios_api_client "https://github.com/jpromi/fire-where/blob/main/ios/Shared/Networking/ApiClient.swift"

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_app_shell,node_incident_browse,node_regional_browse,node_incident_detail,node_department_browse,node_department_profile,node_department_operations,node_settings_ui,node_user toneBlue
class node_operation_model,node_operation_variables toneAmber
class node_firedepartment_service,node_operation_service,node_service_status,node_api_client,node_favourites,node_settings_service,node_settings_local,node_operation_point toneMint
class node_ios_widget,node_ios_operation_service,node_ios_api_client toneRose
```

## Components

### App experience

- [App shell](https://github.com/jpromi/fire-where/blob/main/app/_layout.tsx): `app/_layout.tsx`
- [Incident browsing](https://github.com/jpromi/fire-where/blob/main/app/(tabs)/operation/index.tsx): `app/(tabs)/operation/index.tsx`
- [Regional browsing](https://github.com/jpromi/fire-where/blob/main/app/(tabs)/operation/%5BfederalStateId%5D/%5BdistrictId%5D.tsx): `app/(tabs)/operation/[federalStateId]/[districtId].tsx`
- [Incident details](https://github.com/jpromi/fire-where/blob/main/app/(tabs)/operation/details/%5Buuid%5D.tsx): `app/(tabs)/operation/details/[uuid].tsx`
- [Department search](https://github.com/jpromi/fire-where/blob/main/app/(tabs)/firedepartment/index.tsx): `app/(tabs)/firedepartment/index.tsx`
- [Department profile](https://github.com/jpromi/fire-where/blob/main/app/(tabs)/firedepartment/%5Buuid%5D/index.tsx): `app/(tabs)/firedepartment/[uuid]/index.tsx`
- [Department incidents](https://github.com/jpromi/fire-where/blob/main/app/(tabs)/firedepartment/%5Buuid%5D/operation.tsx): `app/(tabs)/firedepartment/[uuid]/operation.tsx`
- [Settings screens](https://github.com/jpromi/fire-where/blob/main/app/(tabs)/settings/index.tsx): `app/(tabs)/settings/index.tsx`

### Incident domain

- [Operation model](https://github.com/jpromi/fire-where/blob/main/models/Operation.ts): `models/Operation.ts`
- [Incident presentation](https://github.com/jpromi/fire-where/blob/main/services/local/OperationVariablesService.ts): `services/local/OperationVariablesService.ts`

### Data and preferences

- [Department queries](https://github.com/jpromi/fire-where/blob/main/services/FiredepartmentService.ts): `services/FiredepartmentService.ts`
- [Incident queries](https://github.com/jpromi/fire-where/blob/main/services/OperationService.ts): `services/OperationService.ts`
- [Service status](https://github.com/jpromi/fire-where/blob/main/services/ServiceService.ts): `services/ServiceService.ts`
- [API client](https://github.com/jpromi/fire-where/blob/main/services/ApiClient.ts): `services/ApiClient.ts`
- [Favourites](https://github.com/jpromi/fire-where/blob/main/services/local/FavouritesService.ts): `services/local/FavouritesService.ts`
- [Settings storage](https://github.com/jpromi/fire-where/blob/main/services/local/SettingService.ts): `services/local/SettingService.ts`
- [Settings cache](https://github.com/jpromi/fire-where/blob/main/services/local/SettingLocalService.ts): `services/local/SettingLocalService.ts`

### iOS widget

- [Operation list widget](https://github.com/jpromi/fire-where/blob/main/ios/OperationListWidget/OperationListWidget.swift): `ios/OperationListWidget/OperationListWidget.swift`
- [iOS incident queries](https://github.com/jpromi/fire-where/blob/main/ios/Shared/Networking/OperationService.swift): `ios/Shared/Networking/OperationService.swift`
- [iOS API client](https://github.com/jpromi/fire-where/blob/main/ios/Shared/Networking/ApiClient.swift): `ios/Shared/Networking/ApiClient.swift`

### Other components

- **App user**
- **Operation Point API**

## Connections

- App user → App shell: opens app
- App shell → Incident browsing: routes to
- App user → Incident browsing: browses incidents
- Incident browsing → Incident queries: requests incidents
- Regional browsing → Incident queries: requests region
- Incident details → Incident queries: loads incident
- Department search → Department queries: searches departments
- Department profile → Department queries: loads department
- Department incidents → Department queries: loads incidents
- Settings screens → Settings storage: reads settings (evidence: `app/(tabs)/settings/index.tsx`)
- Incident queries → API client: sends requests (evidence: `services/OperationService.ts`)
- Department queries → API client: sends requests (evidence: `services/FiredepartmentService.ts`)
- Service status → API client: sends requests (evidence: `services/ServiceService.ts`)
- API client → Operation Point API: fetches data (evidence: `README.md`)
- Settings storage → Settings cache: updates cache (evidence: `services/local/SettingService.ts`)
- Operation list widget → iOS incident queries: loads operation list (evidence: `ios/OperationListWidget/OperationListWidget.swift`)
- iOS incident queries → iOS API client: requests operations (evidence: `ios/Shared/Networking/OperationService.swift`)
