# louaygharsaly2025/madari_guardian architecture

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

- Interactive diagram: https://gitdiagram.com/louaygharsaly2025/madari_guardian
- Repository: https://github.com/louaygharsaly2025/madari_guardian

## Overview

**1. System shape**
Madari Guardian is a Flutter client application with a feature-rich mobile-first architecture. The core app logic lives in `lib/`, while Android/iOS/macOS/web/Windows/Linux folders are mostly platform shells and build scaffolding. The product is centered on real-time tracking, geofencing, emergency workflows, and device monitoring.

**2. App bootstrap and shared foundation**
`lib/main.dart` is the entry point and likely wires together Firebase initialization, routing, theming, and Riverpod-based state management. Shared configuration is split into `lib/firebase_options.dart`, `assets/firebase_options.json`, and the `firebase.json` deployment config, which indicates the app is tightly coupled to a Firebase project from startup onward.

**3. Presentation layer**
The `lib/screens/` folder is organized by user workflow rather than technical layer: login, guardian dashboard, emergency dashboard, geofence management, history, trusted users, profile, settings, notifications, weekly reports, offline maps, chatbot, fake call, and user guide. This suggests a dashboard-style UX where most app behavior is exposed through dedicated feature screens instead of a single generic shell.

**4. Domain models**
`lib/models/` contains the app’s main data contracts: alerts, device status, geofences, tracking logs, and users. These models define the shape of data moving between Firebase, background services, and UI screens, and they are the key boundary for drawing the domain layer in an architecture diagram.

**5. Service layer as the main orchestration boundary**
`lib/services/` is the architectural center of the app. It includes authentication, Firebase access, location tracking, geofencing, background execution, sensor monitoring, connectivity, offline synchronization, remote commands, safety check-ins, fake calls, WhatsApp integration, localization, and theming. Most feature screens appear to depend on these services rather than talking to Firebase or device APIs directly.

**6. Real-time tracking flow**
The main runtime flow is: device sensors and location updates are captured by `location_service`, `sensor_monitor_service`, and `background_service`, then persisted or broadcast through `firebase_service`. On the UI side, tracking-related screens consume the resulting models to display live maps, device vitals, and activity history, with Google Maps providing the map visualization layer.

**7. Geofencing and alerting**
`geofence_service` and `geofence_model` form a dedicated boundary-monitoring subsystem. When a device enters or exits a zone, the app likely creates `alert_model` events that surface in the dashboard, notification settings, history, and emergency views. This subsystem is one of the primary event generators in the app.

**8. Offline-first synchronization**
The presence of `connectivity_service` and `offline_sync_service` shows that the app is designed to keep operating when network state changes. Local actions and captured telemetry can be buffered during disconnection and synchronized when connectivity returns, making offline handling a first-class architectural concern rather than an edge case.

**9. Security and access control**
`auth_service` handles Firebase authentication, while the README also calls out biometric access via `local_auth` and secure storage. On the backend side, `firestore.rules` indicates that Firestore security rules are part of the enforcement boundary, so access control exists in both the client and Firebase configuration.

**10. Emergency and safety features**
Several services are explicitly emergency-oriented: `remote_command_service`, `fake_call_service`, `safety_checkin_service`, and `whatsapp_service`. These support actions like ringing/locking a monitored device, triggering a fake call, check-ins, and sending alerts through external messaging channels, which makes the app more than a passive tracker.

**11. UI polish, personalization, and multilingual support**
`theme_service`, `theme_colors`, `localization_service`, and `app_translations` show that the app separates visual and language concerns from core tracking logic. The README’s mention of glassmorphic design and multiple fonts suggests a premium UI layer that is intentionally isolated from the domain services.

**12. Firebase and cloud boundary**
The repo includes `firebase_functions.js`, `firestore.rules`, and deployment docs, which means some backend logic and security live outside the Flutter app. Firebase Auth, Firestore, and Cloud Messaging are the main cloud services, with Cloud Functions likely handling server-side events, notifications, or command orchestration.

**13. Platform integration**
Android and iOS contain the expected native bootstrap files, Firebase Android config, and platform manifests, while desktop/web folders are generated Flutter targets. Native code appears minimal, so the architecture is dominated by shared Dart code with platform plugins used for maps, biometrics, notifications, and background behavior.

**14. Practical diagram view**
If you draw the architecture, the clearest layout is: user-facing screens on one side, a central service layer in the middle, and Firebase/device APIs on the other side. The most important data flows are location/sensor events into services, services into Firestore/Firebase Messaging, and cloud/device updates back into dashboards, alerts, and history views.

Main entry points: [`lib/services/firebase_service.dart`](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/firebase_service.dart) (Firebase), [`lib/main.dart`](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/main.dart) (Main), [`lib/models/alert_model.dart`](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/models/alert_model.dart) (Alert), [`lib/models/tracking_log_model.dart`](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/models/tracking_log_model.dart) (Tracking log)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_lib_main["Main<br/>Flutter entry<br/>[main.dart]"]
  node_lib_firebase_options["Firebase opts<br/>Firebase config"]
end

subgraph group_presentation["Presentation"]
  node_screen_login["Login<br/>auth screen<br/>[login_screen.dart]"]
  node_screen_dashboard["Dashboard<br/>tracking UI"]
  node_screen_emergency["Emergency"]
  node_screen_geofence["Geofences<br/>zone UI"]
  node_screen_history["History<br/>activity UI"]
  node_screen_settings["Settings<br/>preferences UI"]
  node_screen_offline["Offline maps<br/>map UI"]
  node_screen_chatbot["Chatbot<br/>assistant UI"]
end

subgraph group_domain["Domain models"]
  node_model_alert{{"Alert<br/>event model<br/>[alert_model.dart]"}}
  node_model_device{{"Device status<br/>status model"}}
  node_model_geofence{{"Geofence<br/>zone model"}}
  node_model_log{{"Tracking log<br/>history model"}}
  node_model_user{{"User<br/>identity model<br/>[user_model.dart]"}}
end

subgraph group_services["Services"]
  node_svc_firebase[("Firebase<br/>backend gateway")]
  node_svc_auth["Auth<br/>identity service<br/>[auth_service.dart]"]
  node_svc_location["Location<br/>tracking service"]
  node_svc_sensor["Sensors<br/>monitoring service"]
  node_svc_geofence["Geofencing<br/>boundary service"]
  node_svc_background["Background<br/>runtime service"]
  node_svc_offline["Offline sync<br/>sync service"]
  node_svc_connectivity["Connectivity<br/>network service"]
  node_svc_commands["Remote commands<br/>control service"]
  node_svc_safety["Safety check-in<br/>safety service"]
  node_svc_fall["Fall detection<br/>safety service"]
  node_svc_whatsapp["WhatsApp<br/>messaging service"]
  node_svc_theme["Theme<br/>ui service<br/>[theme_service.dart]"]
  node_svc_i18n["Localization<br/>ui service"]
end

subgraph group_cloud["Cloud boundary"]
  node_cloud_rules["Firestore rules<br/>firebase rules<br/>[firestore.rules]"]
  node_cloud_functions["Functions<br/>serverless"]
  node_cloud_json["Firebase JSON<br/>deploy config<br/>[firebase.json]"]
end

subgraph group_platform["Platform shells"]
  node_platform_android["Android<br/>native shell"]
  node_platform_ios["iOS<br/>native shell<br/>[AppDelegate.swift]"]
end

node_lib_main -->|"loads config"| node_lib_firebase_options
node_lib_main -->|"starts auth"| node_svc_auth
node_lib_main -->|"applies theme"| node_svc_theme
node_lib_main -->|"loads locale"| node_svc_i18n
node_svc_auth -->|"builds user"| node_model_user
node_svc_firebase -->|"reads/writes"| node_model_user
node_svc_firebase -->|"persists alerts"| node_model_alert
node_svc_firebase -->|"stores logs"| node_model_log
node_svc_firebase -->|"syncs status"| node_model_device
node_svc_location -->|"emits logs"| node_model_log
node_svc_sensor -->|"feeds signals"| node_svc_fall
node_svc_location -->|"evaluates zones"| node_svc_geofence
node_svc_geofence -->|"uses zones"| node_model_geofence
node_svc_geofence -->|"raises alert"| node_model_alert
node_svc_background -->|"runs tracking"| node_svc_location
node_svc_background -->|"runs sensing"| node_svc_sensor
node_svc_offline -->|"observes network"| node_svc_connectivity
node_svc_offline -->|"reconciles data"| node_svc_firebase
node_svc_commands -->|"dispatches control"| node_svc_firebase
node_svc_whatsapp -->|"shares alert"| node_model_alert
node_svc_safety -->|"creates alert"| node_model_alert
node_screen_dashboard -->|"shows status"| node_model_device
node_screen_dashboard -->|"shows history"| node_model_log
node_screen_emergency -->|"shows alerts"| node_model_alert
node_screen_geofence -->|"edits zones"| node_model_geofence
node_screen_history -->|"renders logs"| node_model_log
node_screen_login -->|"auth flows"| node_svc_auth
node_screen_settings -->|"tunes theme"| node_svc_theme
node_screen_settings -->|"tunes language"| node_svc_i18n
node_screen_offline -->|"sync view"| node_svc_offline
node_screen_chatbot -.->|"assistant data"| node_svc_firebase
node_cloud_functions -.->|"complements"| node_cloud_rules
node_cloud_json -->|"deploys"| node_cloud_functions
node_platform_android -->|"launches app"| node_lib_main
node_platform_ios -->|"launches app"| node_lib_main

click node_lib_main "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/main.dart"
click node_lib_firebase_options "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/firebase_options.dart"
click node_screen_login "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/screens/login_screen.dart"
click node_screen_dashboard "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/screens/guardian_dashboard.dart"
click node_screen_emergency "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/screens/emergency_dashboard_screen.dart"
click node_screen_geofence "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/screens/geofence_screen.dart"
click node_screen_history "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/screens/history_screen.dart"
click node_screen_settings "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/screens/settings_screen.dart"
click node_screen_offline "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/screens/offline_maps_screen.dart"
click node_screen_chatbot "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/screens/chatbot_screen.dart"
click node_model_alert "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/models/alert_model.dart"
click node_model_device "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/models/device_status_model.dart"
click node_model_geofence "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/models/geofence_model.dart"
click node_model_log "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/models/tracking_log_model.dart"
click node_model_user "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/models/user_model.dart"
click node_svc_firebase "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/firebase_service.dart"
click node_svc_auth "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/auth_service.dart"
click node_svc_location "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/location_service.dart"
click node_svc_sensor "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/sensor_monitor_service.dart"
click node_svc_geofence "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/geofence_service.dart"
click node_svc_background "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/background_service.dart"
click node_svc_offline "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/offline_sync_service.dart"
click node_svc_connectivity "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/connectivity_service.dart"
click node_svc_commands "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/remote_command_service.dart"
click node_svc_safety "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/safety_checkin_service.dart"
click node_svc_fall "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/fall_detection_service.dart"
click node_svc_whatsapp "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/whatsapp_service.dart"
click node_svc_theme "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/theme_service.dart"
click node_svc_i18n "https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/localization_service.dart"
click node_cloud_rules "https://github.com/louaygharsaly2025/madari_guardian/blob/main/firestore.rules"
click node_cloud_functions "https://github.com/louaygharsaly2025/madari_guardian/blob/main/firebase_functions.js"
click node_cloud_json "https://github.com/louaygharsaly2025/madari_guardian/blob/main/firebase.json"
click node_platform_android "https://github.com/louaygharsaly2025/madari_guardian/blob/main/android/app/google-services.json"
click node_platform_ios "https://github.com/louaygharsaly2025/madari_guardian/blob/main/ios/Runner/AppDelegate.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_lib_main,node_lib_firebase_options toneBlue
class node_screen_login,node_screen_dashboard,node_screen_emergency,node_screen_geofence,node_screen_history,node_screen_settings,node_screen_offline,node_screen_chatbot toneAmber
class node_model_alert,node_model_device,node_model_geofence,node_model_log,node_model_user toneMint
class node_svc_firebase,node_svc_auth,node_svc_location,node_svc_sensor,node_svc_geofence,node_svc_background,node_svc_offline,node_svc_connectivity,node_svc_commands,node_svc_safety,node_svc_fall,node_svc_whatsapp,node_svc_theme,node_svc_i18n toneRose
class node_cloud_rules,node_cloud_functions,node_cloud_json toneIndigo
class node_platform_android,node_platform_ios toneTeal
```

## Components

### App shell

Bootstrap and shared Flutter entrypoints.

- [Main](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/main.dart): Flutter entry · App bootstrap; likely wires Firebase, routing, and app-wide state. · `lib/main.dart`
- [Firebase opts](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/firebase_options.dart): Firebase config · Generated Firebase configuration used by the Flutter client. · `lib/firebase_options.dart`

### Presentation

User-facing screens organized by workflow.

- [Login](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/screens/login_screen.dart): auth screen · User sign-in and access entry point. · `lib/screens/login_screen.dart`
- [Dashboard](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/screens/guardian_dashboard.dart): tracking UI · Primary guardian overview for live status and activity. · `lib/screens/guardian_dashboard.dart`
- [Emergency](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/screens/emergency_dashboard_screen.dart): emergency UI · Emergency workflow and high-priority alerts view. · `lib/screens/emergency_dashboard_screen.dart`
- [Geofences](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/screens/geofence_screen.dart): zone UI · Create and manage monitored zones. · `lib/screens/geofence_screen.dart`
- [History](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/screens/history_screen.dart): activity UI · Past tracking logs and event timeline. · `lib/screens/history_screen.dart`
- [Settings](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/screens/settings_screen.dart): preferences UI · App preferences including notifications and behavior. · `lib/screens/settings_screen.dart`
- [Offline maps](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/screens/offline_maps_screen.dart): map UI · Offline map and field-use experience. · `lib/screens/offline_maps_screen.dart`
- [Chatbot](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/screens/chatbot_screen.dart): assistant UI · Conversational helper and support workflow. · `lib/screens/chatbot_screen.dart`

### Domain models

Core data contracts shared across the app.

- [Alert](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/models/alert_model.dart): event model · Alert and incident payload shared across features. · `lib/models/alert_model.dart`
- [Device status](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/models/device_status_model.dart): status model · Current monitored device state and health. · `lib/models/device_status_model.dart`
- [Geofence](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/models/geofence_model.dart): zone model · Boundary and zone definition contract. · `lib/models/geofence_model.dart`
- [Tracking log](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/models/tracking_log_model.dart): history model · Captured location and activity history records. · `lib/models/tracking_log_model.dart`
- [User](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/models/user_model.dart): identity model · Guardian and tracked-user profile data. · `lib/models/user_model.dart`

### Services

Client-side orchestration and device/Firebase integrations.

- [Firebase](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/firebase_service.dart): backend gateway · Primary Firestore/Auth/Messaging integration boundary. · `lib/services/firebase_service.dart`
- [Auth](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/auth_service.dart): identity service · Authentication and sign-in coordination. · `lib/services/auth_service.dart`
- [Location](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/location_service.dart): tracking service · Live location capture and movement updates. · `lib/services/location_service.dart`
- [Sensors](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/sensor_monitor_service.dart): monitoring service · Sensor-based monitoring and device signals. · `lib/services/sensor_monitor_service.dart`
- [Geofencing](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/geofence_service.dart): boundary service · Zone evaluation and enter/exit detection. · `lib/services/geofence_service.dart`
- [Background](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/background_service.dart): runtime service · Persistent background execution and task handling. · `lib/services/background_service.dart`
- [Offline sync](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/offline_sync_service.dart): sync service · Buffers and reconciles data when connectivity changes. · `lib/services/offline_sync_service.dart`
- [Connectivity](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/connectivity_service.dart): network service · Network-state awareness for offline-first behavior. · `lib/services/connectivity_service.dart`
- [Remote commands](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/remote_command_service.dart): control service · Remote actions such as ring, lock, or command dispatch. · `lib/services/remote_command_service.dart`
- [Safety check-in](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/safety_checkin_service.dart): safety service · Check-in and safety workflow support. · `lib/services/safety_checkin_service.dart`
- [Fall detection](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/fall_detection_service.dart): safety service · Fall/event detection from sensors. · `lib/services/fall_detection_service.dart`
- [WhatsApp](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/whatsapp_service.dart): messaging service · External messaging and alert delivery integration. · `lib/services/whatsapp_service.dart`
- [Theme](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/theme_service.dart): ui service · App theme selection and visual state. · `lib/services/theme_service.dart`
- [Localization](https://github.com/louaygharsaly2025/madari_guardian/blob/main/lib/services/localization_service.dart): ui service · Language selection and translation lookup. · `lib/services/localization_service.dart`

### Cloud boundary

Firebase configuration, deployment, and server-side rules/functions.

- [Firestore rules](https://github.com/louaygharsaly2025/madari_guardian/blob/main/firestore.rules): firebase rules · Server-side access control for Firestore data. · `firestore.rules`
- [Functions](https://github.com/louaygharsaly2025/madari_guardian/blob/main/firebase_functions.js): serverless · Firebase Cloud Functions for backend events or notifications. · `firebase_functions.js`
- [Firebase JSON](https://github.com/louaygharsaly2025/madari_guardian/blob/main/firebase.json): deploy config · Firebase project deployment configuration. · `firebase.json`

### Platform shells

Native host projects and generated platform scaffolding.

- [Android](https://github.com/louaygharsaly2025/madari_guardian/blob/main/android/app/google-services.json): native shell · Android host app and Firebase bootstrap. · `android/app/google-services.json`
- [iOS](https://github.com/louaygharsaly2025/madari_guardian/blob/main/ios/Runner/AppDelegate.swift): native shell · iOS host app and runner configuration. · `ios/Runner/AppDelegate.swift`

## Connections

- Main → Firebase opts: loads config · Bootstrap uses generated Firebase options.
- Main → Auth: starts auth · App startup delegates login/session setup.
- Main → Theme: applies theme · Initializes shared visual state.
- Main → Localization: loads locale · Initializes language resources.
- Auth → User: builds user · Authentication resolves user identity data.
- Firebase → User: reads/writes · Persists and retrieves user profiles.
- Firebase → Alert: persists alerts · Stores alert and incident events.
- Firebase → Tracking log: stores logs · Uploads tracking history and telemetry.
- Firebase → Device status: syncs status · Synchronizes device health/state.
- Location → Tracking log: emits logs · Turns live position updates into history records.
- Sensors → Fall detection: feeds signals · Sensor stream can trigger fall detection.
- Location → Geofencing: evaluates zones · Location updates are checked against boundaries.
- Geofencing → Geofence: uses zones · Boundary evaluation depends on geofence definitions.
- Geofencing → Alert: raises alert · Zone violations become alert events.
- Background → Location: runs tracking · Background execution keeps location capture alive.
- Background → Sensors: runs sensing · Background execution supports device monitoring.
- Offline sync → Connectivity: observes network · Sync behavior depends on connectivity state.
- Offline sync → Firebase: reconciles data · Buffered events are pushed to cloud services.
- Remote commands → Firebase: dispatches control · Remote commands are mediated through backend services.
- WhatsApp → Alert: shares alert · Alerts can be forwarded through messaging channels.
- Safety check-in → Alert: creates alert · Check-in failures or safety events become alerts.
- Dashboard → Device status: shows status · Dashboard presents current monitored device state.
- Dashboard → Tracking log: shows history · Dashboard summarizes recent tracking activity.
- Emergency → Alert: shows alerts · Emergency UI centers on incident events.
- Geofences → Geofence: edits zones · Geofence UI manages boundary definitions.
- History → Tracking log: renders logs · History view displays tracking records.
- Login → Auth: auth flows · Login screen uses authentication service.
- Settings → Theme: tunes theme · Settings can adjust appearance.
- Settings → Localization: tunes language · Settings can adjust app locale.
- Offline maps → Offline sync: sync view · Offline maps are tied to offline sync behavior.
- Chatbot → Firebase: assistant data · Chat/assistant features likely use shared backend data.
- Functions → Firestore rules: complements · Server-side processing sits alongside security rules.
- Firebase JSON → Functions: deploys · Firebase deployment config includes serverless services.
- Android → Main: launches app · Android host boots the shared Flutter entrypoint.
- iOS → Main: launches app · iOS host boots the shared Flutter entrypoint.
