# froic4567/subay_app architecture

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

- Interactive diagram: https://gitdiagram.com/froic4567/subay_app
- Repository: https://github.com/froic4567/subay_app

## Overview

SUBAY is a Flutter flood-monitoring and safer-routing app. The intended user workflow is to open the app, inspect flood conditions on a map, use location context, and seek a safer route; login, notifications, and profile management are additional capabilities. The README documents these features and some as still in development, but Dart implementation excerpts were not provided, so internal screen-to-service calls cannot be verified. The graph uses README evidence for documented capabilities and marks unverified wiring as dashed.

Main entry points: [`lib/screens/home_screen.dart`](https://github.com/froic4567/subay_app/blob/main/lib/screens/home_screen.dart) (Home and navigation), [`lib/screens/map_screen.dart`](https://github.com/froic4567/subay_app/blob/main/lib/screens/map_screen.dart) (Flood map), [`lib/screens/routing_screen.dart`](https://github.com/froic4567/subay_app/blob/main/lib/screens/routing_screen.dart) (Routing screen), [`lib/main.dart`](https://github.com/froic4567/subay_app/blob/main/lib/main.dart) (Flutter app entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App experience"]
  node_entry["Flutter app entry<br/>[main.dart]"]
  node_home["Home and navigation<br/>[home_screen.dart]"]
end

subgraph group_flood["Flood and maps"]
  node_map["Flood map<br/>[map_screen.dart]"]
  node_osm["OpenStreetMap"]
  node_geocoding["Geocoding service"]
  node_cctv["CCTV service<br/>[cctv_service.dart]"]
end

subgraph group_journey["Routing and location"]
  node_routing["Routing screen"]
  node_planner["Route planner<br/>[route_planner.dart]"]
  node_location["GPS location"]
end

subgraph group_account["Account and alerts"]
  node_login["Login screen<br/>[login_screen.dart]"]
  node_notifications["Notification screen"]
  node_profile["Profile screen"]
  node_auth["Authentication service<br/>[auth_service.dart]"]
end

node_user(("App user"))

node_user -->|"opens"| node_entry
node_entry -.->|"navigates"| node_home
node_home -.->|"opens"| node_map
node_map -->|"displays map"| node_osm
node_map -.->|"uses GPS"| node_location
node_home -.->|"opens"| node_routing
node_routing -.->|"delegates"| node_planner
node_routing -.->|"uses GPS"| node_location
node_home -.->|"opens"| node_login
node_login -.->|"authenticates"| node_auth
node_home -.->|"opens"| node_notifications
node_home -.->|"opens"| node_profile

click node_entry "https://github.com/froic4567/subay_app/blob/main/lib/main.dart"
click node_home "https://github.com/froic4567/subay_app/blob/main/lib/screens/home_screen.dart"
click node_login "https://github.com/froic4567/subay_app/blob/main/lib/screens/login_screen.dart"
click node_map "https://github.com/froic4567/subay_app/blob/main/lib/screens/map_screen.dart"
click node_geocoding "https://github.com/froic4567/subay_app/blob/main/lib/services/geocoding_service.dart"
click node_routing "https://github.com/froic4567/subay_app/blob/main/lib/screens/routing_screen.dart"
click node_planner "https://github.com/froic4567/subay_app/blob/main/lib/services/route_planner.dart"
click node_notifications "https://github.com/froic4567/subay_app/blob/main/lib/screens/notification_screen.dart"
click node_profile "https://github.com/froic4567/subay_app/blob/main/lib/screens/profile_screen.dart"
click node_auth "https://github.com/froic4567/subay_app/blob/main/lib/services/auth_service.dart"
click node_cctv "https://github.com/froic4567/subay_app/blob/main/lib/services/cctv_service.dart"

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_entry,node_home,node_user toneBlue
class node_map,node_osm,node_geocoding,node_cctv toneAmber
class node_routing,node_planner,node_location toneMint
class node_login,node_notifications,node_profile,node_auth toneRose
```

## Components

### App experience

- [Flutter app entry](https://github.com/froic4567/subay_app/blob/main/lib/main.dart): `lib/main.dart`
- [Home and navigation](https://github.com/froic4567/subay_app/blob/main/lib/screens/home_screen.dart): `lib/screens/home_screen.dart`

### Flood and maps

- [Flood map](https://github.com/froic4567/subay_app/blob/main/lib/screens/map_screen.dart): `lib/screens/map_screen.dart`
- **OpenStreetMap**
- [Geocoding service](https://github.com/froic4567/subay_app/blob/main/lib/services/geocoding_service.dart): `lib/services/geocoding_service.dart`
- [CCTV service](https://github.com/froic4567/subay_app/blob/main/lib/services/cctv_service.dart): `lib/services/cctv_service.dart`

### Routing and location

- [Routing screen](https://github.com/froic4567/subay_app/blob/main/lib/screens/routing_screen.dart): `lib/screens/routing_screen.dart`
- [Route planner](https://github.com/froic4567/subay_app/blob/main/lib/services/route_planner.dart): `lib/services/route_planner.dart`
- **GPS location**

### Account and alerts

- [Login screen](https://github.com/froic4567/subay_app/blob/main/lib/screens/login_screen.dart): `lib/screens/login_screen.dart`
- [Notification screen](https://github.com/froic4567/subay_app/blob/main/lib/screens/notification_screen.dart): `lib/screens/notification_screen.dart`
- [Profile screen](https://github.com/froic4567/subay_app/blob/main/lib/screens/profile_screen.dart): `lib/screens/profile_screen.dart`
- [Authentication service](https://github.com/froic4567/subay_app/blob/main/lib/services/auth_service.dart): `lib/services/auth_service.dart`

### Other components

- **App user**

## Connections

- App user → Flutter app entry: opens (evidence: `README.md`)
- Flutter app entry → Home and navigation: navigates
- Home and navigation → Flood map: opens
- Flood map → OpenStreetMap: displays map (evidence: `README.md`)
- Flood map → GPS location: uses GPS
- Home and navigation → Routing screen: opens
- Routing screen → Route planner: delegates
- Routing screen → GPS location: uses GPS
- Home and navigation → Login screen: opens
- Login screen → Authentication service: authenticates
- Home and navigation → Notification screen: opens
- Home and navigation → Profile screen: opens
