# wafa-amjad/commutas architecture

> Architecture diagram of the GitHub repository wafa-amjad/commutas, 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/wafa-amjad/commutas
- Repository: https://github.com/wafa-amjad/commutas

## Overview

Commutas is an Android-focused Flutter campus transport wallet. The main user journey is student identity verification, wallet-backed fare collection between phones using NFC Host Card Emulation, and trip-session and bus-tracking features. The tree identifies screens and service layers, but their implementation and call relationships were not sampled; the graph therefore uses README-supported capability links and avoids asserting internal calls.

Main entry points: [`lib/screens/verification_screen.dart`](https://github.com/wafa-amjad/commutas/blob/main/lib/screens/verification_screen.dart) (Identity verification), [`lib/main.dart`](https://github.com/wafa-amjad/commutas/blob/main/lib/main.dart) (App entry), [`lib/screens/login_signup_screen.dart`](https://github.com/wafa-amjad/commutas/blob/main/lib/screens/login_signup_screen.dart) (Login and signup), [`lib/screens/wallet_screen.dart`](https://github.com/wafa-amjad/commutas/blob/main/lib/screens/wallet_screen.dart) (Wallet screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity"]
  node_login["Login and signup"]
  node_verification["Identity verification"]
  node_auth_service["Authentication service<br/>[auth_service.dart]"]
  node_reset_password["Password reset"]
end

subgraph group_fare["Fare and wallet"]
  node_wallet_screen["Wallet screen<br/>[wallet_screen.dart]"]
  node_wallet_service["Wallet service"]
  node_nfc_fare["NFC fare collection"]
end

subgraph group_transit["Transit operations"]
  node_vehicle_home["Vehicle home"]
  node_vehicle_session["Trip sessions"]
  node_vehicle_service["Vehicle service"]
  node_bus_map["Active bus map"]
  node_active_buses["Active buses"]
  node_route_service["Route service<br/>[route_service.dart]"]
  node_schedule["Schedule"]
  node_map_screen["Vehicle map"]
end

subgraph group_app["Flutter app"]
  node_app_entry["App entry<br/>[main.dart]"]
end

node_student(("Student"))
node_portal["University portal"]

node_student -->|"uses"| node_app_entry
node_app_entry -.->|"provides access"| node_login
node_student -->|"verifies identity"| node_verification
node_verification -->|"checks identity"| node_portal
node_student -->|"manages wallet"| node_wallet_screen
node_student -->|"presents fare"| node_nfc_fare
node_student -->|"uses trip sessions"| node_vehicle_session
node_student -->|"tracks buses"| node_bus_map
node_student -->|"views buses"| node_active_buses

click node_app_entry "https://github.com/wafa-amjad/commutas/blob/main/lib/main.dart"
click node_login "https://github.com/wafa-amjad/commutas/blob/main/lib/screens/login_signup_screen.dart"
click node_verification "https://github.com/wafa-amjad/commutas/blob/main/lib/screens/verification_screen.dart"
click node_auth_service "https://github.com/wafa-amjad/commutas/blob/main/lib/screens/services/auth_service.dart"
click node_reset_password "https://github.com/wafa-amjad/commutas/blob/main/lib/screens/reset_password_screen.dart"
click node_wallet_screen "https://github.com/wafa-amjad/commutas/blob/main/lib/screens/wallet_screen.dart"
click node_wallet_service "https://github.com/wafa-amjad/commutas/blob/main/lib/screens/services/wallet_service.dart"
click node_nfc_fare "https://github.com/wafa-amjad/commutas/blob/main/lib/screens/nfc_pay_screen.dart"
click node_vehicle_home "https://github.com/wafa-amjad/commutas/blob/main/lib/screens/vehicle/vehicle_home_screen.dart"
click node_vehicle_session "https://github.com/wafa-amjad/commutas/blob/main/lib/screens/vehicle/vehicle_session_screen.dart"
click node_vehicle_service "https://github.com/wafa-amjad/commutas/blob/main/lib/screens/vehicle/vehicle_service.dart"
click node_bus_map "https://github.com/wafa-amjad/commutas/blob/main/lib/screens/active_bus_map_screen.dart"
click node_active_buses "https://github.com/wafa-amjad/commutas/blob/main/lib/screens/active_buses_screen.dart"
click node_route_service "https://github.com/wafa-amjad/commutas/blob/main/lib/screens/services/route_service.dart"
click node_schedule "https://github.com/wafa-amjad/commutas/blob/main/lib/screens/schedule_screen.dart"
click node_map_screen "https://github.com/wafa-amjad/commutas/blob/main/lib/screens/vehicle/vehicle_map_screen.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_login,node_verification,node_auth_service,node_reset_password toneBlue
class node_wallet_screen,node_wallet_service,node_nfc_fare toneAmber
class node_vehicle_home,node_vehicle_session,node_vehicle_service,node_bus_map,node_active_buses,node_route_service,node_schedule,node_map_screen toneMint
class node_app_entry toneRose
class node_student,node_portal toneIndigo
```

## Components

### Identity

- [Login and signup](https://github.com/wafa-amjad/commutas/blob/main/lib/screens/login_signup_screen.dart): `lib/screens/login_signup_screen.dart`
- [Identity verification](https://github.com/wafa-amjad/commutas/blob/main/lib/screens/verification_screen.dart): `lib/screens/verification_screen.dart`
- [Authentication service](https://github.com/wafa-amjad/commutas/blob/main/lib/screens/services/auth_service.dart): `lib/screens/services/auth_service.dart`
- [Password reset](https://github.com/wafa-amjad/commutas/blob/main/lib/screens/reset_password_screen.dart): `lib/screens/reset_password_screen.dart`

### Fare and wallet

- [Wallet screen](https://github.com/wafa-amjad/commutas/blob/main/lib/screens/wallet_screen.dart): `lib/screens/wallet_screen.dart`
- [Wallet service](https://github.com/wafa-amjad/commutas/blob/main/lib/screens/services/wallet_service.dart): `lib/screens/services/wallet_service.dart`
- [NFC fare collection](https://github.com/wafa-amjad/commutas/blob/main/lib/screens/nfc_pay_screen.dart): `lib/screens/nfc_pay_screen.dart`

### Transit operations

- [Vehicle home](https://github.com/wafa-amjad/commutas/blob/main/lib/screens/vehicle/vehicle_home_screen.dart): `lib/screens/vehicle/vehicle_home_screen.dart`
- [Trip sessions](https://github.com/wafa-amjad/commutas/blob/main/lib/screens/vehicle/vehicle_session_screen.dart): `lib/screens/vehicle/vehicle_session_screen.dart`
- [Vehicle service](https://github.com/wafa-amjad/commutas/blob/main/lib/screens/vehicle/vehicle_service.dart): `lib/screens/vehicle/vehicle_service.dart`
- [Active bus map](https://github.com/wafa-amjad/commutas/blob/main/lib/screens/active_bus_map_screen.dart): `lib/screens/active_bus_map_screen.dart`
- [Active buses](https://github.com/wafa-amjad/commutas/blob/main/lib/screens/active_buses_screen.dart): `lib/screens/active_buses_screen.dart`
- [Route service](https://github.com/wafa-amjad/commutas/blob/main/lib/screens/services/route_service.dart): `lib/screens/services/route_service.dart`
- [Schedule](https://github.com/wafa-amjad/commutas/blob/main/lib/screens/schedule_screen.dart): `lib/screens/schedule_screen.dart`
- [Vehicle map](https://github.com/wafa-amjad/commutas/blob/main/lib/screens/vehicle/vehicle_map_screen.dart): `lib/screens/vehicle/vehicle_map_screen.dart`

### Flutter app

- [App entry](https://github.com/wafa-amjad/commutas/blob/main/lib/main.dart): `lib/main.dart`

### Other components

- **Student**
- **University portal**

## Connections

- Student → App entry: uses (evidence: `README.md`)
- App entry → Login and signup: provides access
- Student → Identity verification: verifies identity (evidence: `README.md`)
- Identity verification → University portal: checks identity (evidence: `README.md`)
- Student → Wallet screen: manages wallet (evidence: `README.md`)
- Student → NFC fare collection: presents fare (evidence: `README.md`)
- Student → Trip sessions: uses trip sessions (evidence: `README.md`)
- Student → Active bus map: tracks buses (evidence: `README.md`)
- Student → Active buses: views buses (evidence: `README.md`)
