# nanayawpcee/momo_trotro architecture

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

- Interactive diagram: https://gitdiagram.com/nanayawpcee/momo_trotro
- Repository: https://github.com/nanayawpcee/momo_trotro

## Overview

MTN Super App is a Flutter mobile application whose documented core is Trotro Smart Pay: passengers scan at boarding and alighting, GPS distance determines a regulated fare, and MTN MoMo completes payment. The tree also exposes broader app areas such as profiles, notifications, messaging, transfers, and recommendations. These paths identify likely implementation components, but their source was not sampled; documented workflow edges therefore cite the README, and no additional call relationships are inferred.

Main entry points: [`lib/screens/scanner_screen.dart`](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/scanner_screen.dart) (Boarding Scan), [`lib/services/location_service.dart`](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/services/location_service.dart) (GPS Location), [`lib/screens/alighting_screen.dart`](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/alighting_screen.dart) (Alighting Scan), [`lib/services/trip_provider.dart`](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/services/trip_provider.dart) (Trip Provider)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Shell"]
  node_app_entry["App Entry<br/>[main.dart]"]
  node_home["Home<br/>[home_screen.dart]"]
end

subgraph group_trotro["Trotro Payments"]
  node_boarding["Boarding Scan"]
  node_boarding_confirm["Boarding Confirm"]
  node_alighting["Alighting Scan"]
  node_trip_detail["Trip Details"]
end

subgraph group_services["App Services"]
  node_trip_provider["Trip Provider<br/>[trip_provider.dart]"]
  node_trip_models["Trip Models<br/>[trotro_models.dart]"]
  node_location["GPS Location"]
  node_momo["MoMo Payment<br/>[momo_service.dart]"]
end

subgraph group_other["Super App Features"]
  node_profile["Profile"]
  node_notifications["Notifications"]
  node_messages["Message Center"]
  node_transfers["Transfers"]
  node_recommend["Recommendations"]
  node_networks["Other Networks"]
end

node_passenger(("Passenger"))
node_vehicle_qr["Vehicle QR"]

node_passenger -->|"scans on boarding"| node_boarding
node_vehicle_qr -->|"provides QR"| node_boarding
node_passenger -->|"scans on alighting"| node_alighting
node_boarding -->|"uses GPS distance"| node_location
node_alighting -->|"uses GPS distance"| node_location
node_location -->|"determines fare"| node_trip_provider
node_trip_provider -->|"fare paid via"| node_momo

click node_app_entry "https://github.com/nanayawpcee/momo_trotro/blob/main/lib/main.dart"
click node_home "https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/home_screen.dart"
click node_trip_provider "https://github.com/nanayawpcee/momo_trotro/blob/main/lib/services/trip_provider.dart"
click node_trip_models "https://github.com/nanayawpcee/momo_trotro/blob/main/lib/models/trotro_models.dart"
click node_boarding "https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/scanner_screen.dart"
click node_boarding_confirm "https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/boarding_confirm_screen.dart"
click node_alighting "https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/alighting_screen.dart"
click node_location "https://github.com/nanayawpcee/momo_trotro/blob/main/lib/services/location_service.dart"
click node_momo "https://github.com/nanayawpcee/momo_trotro/blob/main/lib/services/momo_service.dart"
click node_trip_detail "https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/trip_detail_screen.dart"
click node_profile "https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/profile_screen.dart"
click node_notifications "https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/notifications_screen.dart"
click node_messages "https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/message_center_screen.dart"
click node_transfers "https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/transfer_screen.dart"
click node_recommend "https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/recommend_screen.dart"
click node_networks "https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/other_networks_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_app_entry,node_home toneBlue
class node_boarding,node_boarding_confirm,node_alighting,node_trip_detail toneAmber
class node_trip_provider,node_trip_models,node_location,node_momo toneMint
class node_profile,node_notifications,node_messages,node_transfers,node_recommend,node_networks toneRose
class node_passenger,node_vehicle_qr toneIndigo
```

## Components

### App Shell

- [App Entry](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/main.dart): `lib/main.dart`
- [Home](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/home_screen.dart): `lib/screens/home_screen.dart`

### Trotro Payments

- [Boarding Scan](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/scanner_screen.dart): `lib/screens/scanner_screen.dart`
- [Boarding Confirm](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/boarding_confirm_screen.dart): `lib/screens/boarding_confirm_screen.dart`
- [Alighting Scan](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/alighting_screen.dart): `lib/screens/alighting_screen.dart`
- [Trip Details](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/trip_detail_screen.dart): `lib/screens/trip_detail_screen.dart`

### App Services

- [Trip Provider](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/services/trip_provider.dart): `lib/services/trip_provider.dart`
- [Trip Models](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/models/trotro_models.dart): `lib/models/trotro_models.dart`
- [GPS Location](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/services/location_service.dart): `lib/services/location_service.dart`
- [MoMo Payment](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/services/momo_service.dart): `lib/services/momo_service.dart`

### Super App Features

- [Profile](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/profile_screen.dart): `lib/screens/profile_screen.dart`
- [Notifications](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/notifications_screen.dart): `lib/screens/notifications_screen.dart`
- [Message Center](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/message_center_screen.dart): `lib/screens/message_center_screen.dart`
- [Transfers](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/transfer_screen.dart): `lib/screens/transfer_screen.dart`
- [Recommendations](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/recommend_screen.dart): `lib/screens/recommend_screen.dart`
- [Other Networks](https://github.com/nanayawpcee/momo_trotro/blob/main/lib/screens/other_networks_screen.dart): `lib/screens/other_networks_screen.dart`

### Other components

- **Passenger**
- **Vehicle QR**

## Connections

- Passenger → Boarding Scan: scans on boarding (evidence: `README.md`)
- Vehicle QR → Boarding Scan: provides QR (evidence: `README.md`)
- Passenger → Alighting Scan: scans on alighting (evidence: `README.md`)
- Boarding Scan → GPS Location: uses GPS distance (evidence: `README.md`)
- Alighting Scan → GPS Location: uses GPS distance (evidence: `README.md`)
- GPS Location → Trip Provider: determines fare (evidence: `README.md`)
- Trip Provider → MoMo Payment: fare paid via (evidence: `README.md`)
