# vawnz/faster_app architecture

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

- Interactive diagram: https://gitdiagram.com/vawnz/faster_app
- Repository: https://github.com/vawnz/faster_app

## Overview

FASTER is a campus emergency-response app for students and FAST medical officers. Its principal workflow is a student sending a room- and floor-localized distress signal, followed by officer monitoring and emergency-history review. The README also documents interactive campus maps and separate role portals. Dart implementation excerpts were not provided, so connections among those app modules are shown as unverified rather than inferred from module names; the Windows host is included only as platform runtime scaffolding.

Main entry points: [`lib/modules/home/home_screen.dart`](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/home/home_screen.dart) (Student Home), [`lib/modules/admin/admin_main_screen.dart`](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/admin/admin_main_screen.dart) (Officer Portal), [`lib/modules/auth/login_screen.dart`](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/auth/login_screen.dart) (Login), [`lib/modules/admin/admin_home_tab.dart`](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/admin/admin_home_tab.dart) (Officer Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_student["Student Experience"]
  node_login["Login<br/>[login_screen.dart]"]
  node_student_home["Student Home<br/>[home_screen.dart]"]
  node_map["Campus Map<br/>[map_screen.dart]"]
  node_map_data["Map Layout"]
  node_map_search["Map Search<br/>[map_search.dart]"]
  node_sos["Distress Signal<br/>[home_screen.dart]"]
  node_contacts["Emergency Contacts"]
  node_guidance["First-Aid Guidance"]
  node_profile["Student Profile"]
end

subgraph group_officer["Officer Response"]
  node_admin_home["Officer Dashboard"]
  node_heatmap["Live Heatmap"]
  node_admin_history["Emergency History"]
  node_admin_profile["Officer Profile"]
  node_admin_shell["Officer Portal"]
  node_distress_model["Distress Record"]
  node_sync["Distress Sync"]
end

subgraph group_shared["Shared App Services"]
  node_app_entry["App Entry<br/>[main.dart]"]
  node_profile_model["Student Record"]
  node_supabase_service["Supabase Service"]
end

subgraph group_platform["Platform Runtime"]
  node_win_entry["Windows Entry<br/>[main.cpp]"]
  node_flutter_window["Flutter Window<br/>[flutter_window.cpp]"]
  node_win_window["Win32 Window<br/>[win32_window.cpp]"]
  node_plugin_reg["Plugin Registration"]
end

node_student_actor(("Student"))
node_officer_actor(("FAST Officer"))
node_supabase[("Supabase")]

node_student_actor -.->|"opens portal"| node_login
node_officer_actor -.->|"opens portal"| node_login
node_login -.->|"enters student view"| node_student_home
node_student_actor -.->|"sends SOS"| node_sos
node_sos -.->|"delivers signal"| node_admin_home
node_student_home -.->|"opens map"| node_map
node_map -.->|"uses layout"| node_map_data
node_map -.->|"supports search"| node_map_search
node_student_home -.->|"offers contacts"| node_contacts
node_student_home -.->|"offers guidance"| node_guidance
node_student_home -.->|"opens profile"| node_profile
node_profile -.->|"uses record"| node_profile_model
node_login -.->|"enters officer view"| node_admin_shell
node_admin_shell -.->|"shows dashboard"| node_admin_home
node_admin_home -.->|"renders heatmap"| node_heatmap
node_admin_shell -.->|"shows history"| node_admin_history
node_admin_shell -.->|"shows profile"| node_admin_profile
node_admin_home -.->|"shows signal details"| node_distress_model
node_sync -.->|"uses service"| node_supabase_service
node_supabase_service -.->|"syncs data"| node_supabase
node_win_entry -->|"creates host"| node_flutter_window
node_flutter_window -->|"inherits window"| node_win_window
node_flutter_window -->|"registers plugins"| node_plugin_reg

click node_app_entry "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/main.dart"
click node_login "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/auth/login_screen.dart"
click node_student_home "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/home/home_screen.dart"
click node_map "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/map/map_screen.dart"
click node_map_data "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/map/campus_map_data.dart"
click node_map_search "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/map/map_search.dart"
click node_sos "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/home/home_screen.dart"
click node_contacts "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/contacts/contacts_screen.dart"
click node_guidance "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/what_to_do/what_to_do_screen.dart"
click node_profile "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/profile/profile_screen.dart"
click node_profile_model "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/models/student_profile.dart"
click node_admin_home "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/admin/admin_home_tab.dart"
click node_heatmap "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/admin/admin_heat_map_painter.dart"
click node_admin_history "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/admin/admin_history_tab.dart"
click node_admin_profile "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/admin/admin_profile_tab.dart"
click node_admin_shell "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/admin/admin_main_screen.dart"
click node_distress_model "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/admin/models/distress_signal.dart"
click node_sync "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/admin/services/distress_sync_service.dart"
click node_supabase_service "https://github.com/vawnz/faster_app/blob/survey-1.0/lib/supabase_service.dart"
click node_win_entry "https://github.com/vawnz/faster_app/blob/survey-1.0/windows/runner/main.cpp"
click node_flutter_window "https://github.com/vawnz/faster_app/blob/survey-1.0/windows/runner/flutter_window.cpp"
click node_win_window "https://github.com/vawnz/faster_app/blob/survey-1.0/windows/runner/win32_window.cpp"
click node_plugin_reg "https://github.com/vawnz/faster_app/blob/survey-1.0/windows/flutter/generated_plugin_registrant.cc"

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_login,node_student_home,node_map,node_map_data,node_map_search,node_sos,node_contacts,node_guidance,node_profile toneBlue
class node_admin_home,node_heatmap,node_admin_history,node_admin_profile,node_admin_shell,node_distress_model,node_sync,node_supabase toneAmber
class node_app_entry,node_profile_model,node_supabase_service toneMint
class node_win_entry,node_flutter_window,node_win_window,node_plugin_reg toneRose
class node_student_actor,node_officer_actor toneIndigo
```

## Components

### Student Experience

- [Login](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/auth/login_screen.dart): `lib/modules/auth/login_screen.dart`
- [Student Home](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/home/home_screen.dart): `lib/modules/home/home_screen.dart`
- [Campus Map](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/map/map_screen.dart): `lib/modules/map/map_screen.dart`
- [Map Layout](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/map/campus_map_data.dart): `lib/modules/map/campus_map_data.dart`
- [Map Search](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/map/map_search.dart): `lib/modules/map/map_search.dart`
- [Distress Signal](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/home/home_screen.dart): `lib/modules/home/home_screen.dart`
- [Emergency Contacts](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/contacts/contacts_screen.dart): `lib/modules/contacts/contacts_screen.dart`
- [First-Aid Guidance](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/what_to_do/what_to_do_screen.dart): `lib/modules/what_to_do/what_to_do_screen.dart`
- [Student Profile](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/profile/profile_screen.dart): `lib/modules/profile/profile_screen.dart`

### Officer Response

- [Officer Dashboard](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/admin/admin_home_tab.dart): `lib/modules/admin/admin_home_tab.dart`
- [Live Heatmap](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/admin/admin_heat_map_painter.dart): `lib/modules/admin/admin_heat_map_painter.dart`
- [Emergency History](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/admin/admin_history_tab.dart): `lib/modules/admin/admin_history_tab.dart`
- [Officer Profile](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/admin/admin_profile_tab.dart): `lib/modules/admin/admin_profile_tab.dart`
- [Officer Portal](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/admin/admin_main_screen.dart): `lib/modules/admin/admin_main_screen.dart`
- [Distress Record](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/admin/models/distress_signal.dart): `lib/modules/admin/models/distress_signal.dart`
- [Distress Sync](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/modules/admin/services/distress_sync_service.dart): `lib/modules/admin/services/distress_sync_service.dart`

### Shared App Services

- [App Entry](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/main.dart): `lib/main.dart`
- [Student Record](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/models/student_profile.dart): `lib/models/student_profile.dart`
- [Supabase Service](https://github.com/vawnz/faster_app/blob/survey-1.0/lib/supabase_service.dart): `lib/supabase_service.dart`

### Platform Runtime

- [Windows Entry](https://github.com/vawnz/faster_app/blob/survey-1.0/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Flutter Window](https://github.com/vawnz/faster_app/blob/survey-1.0/windows/runner/flutter_window.cpp): `windows/runner/flutter_window.cpp`
- [Win32 Window](https://github.com/vawnz/faster_app/blob/survey-1.0/windows/runner/win32_window.cpp): `windows/runner/win32_window.cpp`
- [Plugin Registration](https://github.com/vawnz/faster_app/blob/survey-1.0/windows/flutter/generated_plugin_registrant.cc): `windows/flutter/generated_plugin_registrant.cc`

### Other components

- **Student**
- **FAST Officer**
- **Supabase**

## Connections

- Student → Login: opens portal
- FAST Officer → Login: opens portal
- Login → Student Home: enters student view
- Student → Distress Signal: sends SOS
- Distress Signal → Officer Dashboard: delivers signal
- Student Home → Campus Map: opens map
- Campus Map → Map Layout: uses layout
- Campus Map → Map Search: supports search
- Student Home → Emergency Contacts: offers contacts
- Student Home → First-Aid Guidance: offers guidance
- Student Home → Student Profile: opens profile
- Student Profile → Student Record: uses record
- Login → Officer Portal: enters officer view
- Officer Portal → Officer Dashboard: shows dashboard
- Officer Dashboard → Live Heatmap: renders heatmap
- Officer Portal → Emergency History: shows history
- Officer Portal → Officer Profile: shows profile
- Officer Dashboard → Distress Record: shows signal details
- Distress Sync → Supabase Service: uses service
- Supabase Service → Supabase: syncs data
- Windows Entry → Flutter Window: creates host (evidence: `windows/runner/main.cpp`)
- Flutter Window → Win32 Window: inherits window
- Flutter Window → Plugin Registration: registers plugins (evidence: `windows/runner/flutter_window.cpp`)
