# geopredia/georisk-app architecture

> Architecture diagram of the GitHub repository geopredia/georisk-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/geopredia/georisk-app
- Repository: https://github.com/geopredia/georisk-app

## Overview

GeoPredIA is a Flutter prototype for assessing geological, environmental, and social risks across mining zones. Users explore portfolio KPIs and zones, consult an assistant, inspect IoT signals and dataset sources, review proposed decisions, and compare multi-perspective analyses. The dashboard has a distinct data-access layer; the README also documents a BTP API with a packaged-data fallback. The sampled source is platform-hosting code rather than feature implementation, so feature relationships rely on README statements; internal calls among feature modules are not inferred.

Main entry points: [`lib/main.dart`](https://github.com/geopredia/georisk-app/blob/main/lib/main.dart) (GeoPredIA app), [`windows/runner/flutter_window.cpp`](https://github.com/geopredia/georisk-app/blob/main/windows/runner/flutter_window.cpp) (Windows Flutter host), [`lib/features/assistant/presentation/screens/assistant_screen.dart`](https://github.com/geopredia/georisk-app/blob/main/lib/features/assistant/presentation/screens/assistant_screen.dart) (Conversational assistant), [`lib/features/dashboard/presentation/screens/dashboard_screen.dart`](https://github.com/geopredia/georisk-app/blob/main/lib/features/dashboard/presentation/screens/dashboard_screen.dart) (Risk dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["GeoPredIA app<br/>[main.dart]"]
  node_assistant["Conversational assistant"]
  node_joule["Joule assistant service"]
  node_profile["Profile"]
  node_windows_host["Windows Flutter host<br/>[flutter_window.cpp]"]
  node_win32_window["Native window<br/>[win32_window.cpp]"]
end

subgraph group_risk["Risk analysis"]
  node_dashboard["Risk dashboard"]
  node_dashboard_data["Dashboard data access"]
  node_mining_data["Mining dataset"]
  node_zone_detail["Zone detail"]
  node_multiagent["Multiagent analysis"]
end

subgraph group_operations["Review and monitoring"]
  node_iot["IoT monitoring"]
  node_review["Human review inbox"]
  node_review_manager["Review decisions"]
end

subgraph group_data["Data and integration"]
  node_hana_view["HANA dataset view"]
  node_btp{{"BTP API"}}
  node_local_data["Packaged demo data"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"provides view"| node_dashboard
node_app -->|"provides view"| node_multiagent
node_app -->|"provides view"| node_iot
node_app -->|"provides view"| node_review
node_app -->|"provides view"| node_assistant
node_app -->|"provides view"| node_hana_view
node_app -->|"offers zone details"| node_zone_detail
node_app -->|"provides view"| node_profile
node_app -->|"consumes API"| node_btp
node_app -->|"uses as fallback"| node_local_data
node_windows_host -->|"inherits window"| node_win32_window
node_windows_host -->|"delegates messages"| node_win32_window
node_dashboard -.->|"shows portfolio data"| node_dashboard_data
node_dashboard_data -.->|"loads dataset"| node_mining_data
node_assistant -.->|"uses assistant service"| node_joule
node_review -.->|"records decisions"| node_review_manager

click node_app "https://github.com/geopredia/georisk-app/blob/main/lib/main.dart"
click node_dashboard "https://github.com/geopredia/georisk-app/blob/main/lib/features/dashboard/presentation/screens/dashboard_screen.dart"
click node_dashboard_data "https://github.com/geopredia/georisk-app/blob/main/lib/features/dashboard/data/repositories/dashboard_repository_impl.dart"
click node_mining_data "https://github.com/geopredia/georisk-app/blob/main/lib/features/dashboard/data/services/mining_dataset_service.dart"
click node_zone_detail "https://github.com/geopredia/georisk-app/blob/main/lib/features/zone_detail/presentation/screens/zone_detail_screen.dart"
click node_multiagent "https://github.com/geopredia/georisk-app/blob/main/lib/features/multiagent_analysis/presentation/screens/multiagent_analysis_screen.dart"
click node_assistant "https://github.com/geopredia/georisk-app/blob/main/lib/features/assistant/presentation/screens/assistant_screen.dart"
click node_joule "https://github.com/geopredia/georisk-app/blob/main/lib/features/assistant/data/services/joule_data_assistant.dart"
click node_iot "https://github.com/geopredia/georisk-app/blob/main/lib/features/iot_sentinel/presentation/screens/iot_sentinel_screen.dart"
click node_review "https://github.com/geopredia/georisk-app/blob/main/lib/features/review_approval/presentation/screens/review_inbox_screen.dart"
click node_review_manager "https://github.com/geopredia/georisk-app/blob/main/lib/features/review_approval/data/services/review_manager_service.dart"
click node_hana_view "https://github.com/geopredia/georisk-app/blob/main/lib/features/hana_dataset/presentation/screens/hana_dataset_screen.dart"
click node_profile "https://github.com/geopredia/georisk-app/blob/main/lib/features/profile/presentation/screens/profile_screen.dart"
click node_local_data "https://github.com/geopredia/georisk-app/tree/main/assets/data"
click node_windows_host "https://github.com/geopredia/georisk-app/blob/main/windows/runner/flutter_window.cpp"
click node_win32_window "https://github.com/geopredia/georisk-app/blob/main/windows/runner/win32_window.cpp"

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,node_assistant,node_joule,node_profile,node_windows_host,node_win32_window,node_user toneBlue
class node_dashboard,node_dashboard_data,node_mining_data,node_zone_detail,node_multiagent toneAmber
class node_iot,node_review,node_review_manager toneMint
class node_hana_view,node_btp,node_local_data toneRose
```

## Components

### App experience

- [GeoPredIA app](https://github.com/geopredia/georisk-app/blob/main/lib/main.dart): `lib/main.dart`
- [Conversational assistant](https://github.com/geopredia/georisk-app/blob/main/lib/features/assistant/presentation/screens/assistant_screen.dart): `lib/features/assistant/presentation/screens/assistant_screen.dart`
- [Joule assistant service](https://github.com/geopredia/georisk-app/blob/main/lib/features/assistant/data/services/joule_data_assistant.dart): `lib/features/assistant/data/services/joule_data_assistant.dart`
- [Profile](https://github.com/geopredia/georisk-app/blob/main/lib/features/profile/presentation/screens/profile_screen.dart): `lib/features/profile/presentation/screens/profile_screen.dart`
- [Windows Flutter host](https://github.com/geopredia/georisk-app/blob/main/windows/runner/flutter_window.cpp): `windows/runner/flutter_window.cpp`
- [Native window](https://github.com/geopredia/georisk-app/blob/main/windows/runner/win32_window.cpp): `windows/runner/win32_window.cpp`

### Risk analysis

- [Risk dashboard](https://github.com/geopredia/georisk-app/blob/main/lib/features/dashboard/presentation/screens/dashboard_screen.dart): `lib/features/dashboard/presentation/screens/dashboard_screen.dart`
- [Dashboard data access](https://github.com/geopredia/georisk-app/blob/main/lib/features/dashboard/data/repositories/dashboard_repository_impl.dart): `lib/features/dashboard/data/repositories/dashboard_repository_impl.dart`
- [Mining dataset](https://github.com/geopredia/georisk-app/blob/main/lib/features/dashboard/data/services/mining_dataset_service.dart): `lib/features/dashboard/data/services/mining_dataset_service.dart`
- [Zone detail](https://github.com/geopredia/georisk-app/blob/main/lib/features/zone_detail/presentation/screens/zone_detail_screen.dart): `lib/features/zone_detail/presentation/screens/zone_detail_screen.dart`
- [Multiagent analysis](https://github.com/geopredia/georisk-app/blob/main/lib/features/multiagent_analysis/presentation/screens/multiagent_analysis_screen.dart): `lib/features/multiagent_analysis/presentation/screens/multiagent_analysis_screen.dart`

### Review and monitoring

- [IoT monitoring](https://github.com/geopredia/georisk-app/blob/main/lib/features/iot_sentinel/presentation/screens/iot_sentinel_screen.dart): `lib/features/iot_sentinel/presentation/screens/iot_sentinel_screen.dart`
- [Human review inbox](https://github.com/geopredia/georisk-app/blob/main/lib/features/review_approval/presentation/screens/review_inbox_screen.dart): `lib/features/review_approval/presentation/screens/review_inbox_screen.dart`
- [Review decisions](https://github.com/geopredia/georisk-app/blob/main/lib/features/review_approval/data/services/review_manager_service.dart): `lib/features/review_approval/data/services/review_manager_service.dart`

### Data and integration

- [HANA dataset view](https://github.com/geopredia/georisk-app/blob/main/lib/features/hana_dataset/presentation/screens/hana_dataset_screen.dart): `lib/features/hana_dataset/presentation/screens/hana_dataset_screen.dart`
- **BTP API**
- [Packaged demo data](https://github.com/geopredia/georisk-app/tree/main/assets/data): `assets/data`

### Other components

- **User**

## Connections

- User → GeoPredIA app: uses (evidence: `README.md`)
- GeoPredIA app → Risk dashboard: provides view (evidence: `README.md`)
- GeoPredIA app → Multiagent analysis: provides view (evidence: `README.md`)
- GeoPredIA app → IoT monitoring: provides view (evidence: `README.md`)
- GeoPredIA app → Human review inbox: provides view (evidence: `README.md`)
- GeoPredIA app → Conversational assistant: provides view (evidence: `README.md`)
- GeoPredIA app → HANA dataset view: provides view (evidence: `README.md`)
- GeoPredIA app → Zone detail: offers zone details (evidence: `README.md`)
- GeoPredIA app → Profile: provides view (evidence: `README.md`)
- GeoPredIA app → BTP API: consumes API (evidence: `README.md`)
- GeoPredIA app → Packaged demo data: uses as fallback (evidence: `README.md`)
- Windows Flutter host → Native window: inherits window (evidence: `windows/runner/flutter_window.cpp`)
- Windows Flutter host → Native window: delegates messages (evidence: `windows/runner/flutter_window.cpp`)
- Risk dashboard → Dashboard data access: shows portfolio data
- Dashboard data access → Mining dataset: loads dataset
- Conversational assistant → Joule assistant service: uses assistant service
- Human review inbox → Review decisions: records decisions
