# amoiz13/agile-travelers architecture

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

- Interactive diagram: https://gitdiagram.com/amoiz13/agile-travelers
- Repository: https://github.com/amoiz13/agile-travelers

## Overview

Agile Travellers is a Flutter prototype for finding Swedish public-transport journeys through Trafiklab ResRobot. The principal workflow is station autocomplete, journey search, sortable results, and leg-level details, with CO2 estimates shown per leg and journey. The graph includes the documented capabilities and the apparent service/model/calculator layers from the file tree; Dart implementation excerpts were not provided, so some internal wiring is based on module roles rather than inspected calls.

Main entry points: [`lib/screens/results_screen.dart`](https://github.com/amoiz13/agile-travelers/blob/main/lib/screens/results_screen.dart) (Search and results), [`lib/services/resrobot_service.dart`](https://github.com/amoiz13/agile-travelers/blob/main/lib/services/resrobot_service.dart) (ResRobot service), [`lib/main.dart`](https://github.com/amoiz13/agile-travelers/blob/main/lib/main.dart) (Flutter entry), [`lib/screens/trip_details_screen.dart`](https://github.com/amoiz13/agile-travelers/blob/main/lib/screens/trip_details_screen.dart) (Trip details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Journey interface"]
  node_app["Flutter entry<br/>[main.dart]"]
  node_results["Search and results"]
  node_details["Trip details"]
end

subgraph group_transit["Transit data"]
  node_service["ResRobot service"]
  node_models["Journey models"]
end

subgraph group_emissions["Emissions"]
  node_calculator["CO2 calculator"]
end

node_traveller(("Traveller"))
node_resrobot{{"ResRobot API"}}

node_traveller -->|"opens"| node_app
node_app -->|"shows"| node_results
node_results -->|"requests stations and journeys"| node_service
node_service -->|"queries"| node_resrobot
node_service -->|"parses responses"| node_models
node_service -->|"returns journeys"| node_results
node_results -->|"estimates emissions"| node_calculator
node_results -->|"opens selected trip"| node_details
node_details -->|"estimates leg emissions"| node_calculator

click node_app "https://github.com/amoiz13/agile-travelers/blob/main/lib/main.dart"
click node_results "https://github.com/amoiz13/agile-travelers/blob/main/lib/screens/results_screen.dart"
click node_details "https://github.com/amoiz13/agile-travelers/blob/main/lib/screens/trip_details_screen.dart"
click node_service "https://github.com/amoiz13/agile-travelers/blob/main/lib/services/resrobot_service.dart"
click node_models "https://github.com/amoiz13/agile-travelers/blob/main/lib/models/resrobot_models.dart"
click node_calculator "https://github.com/amoiz13/agile-travelers/blob/main/lib/utils/co2_calculator.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,node_results,node_details toneBlue
class node_service,node_models toneAmber
class node_calculator,node_resrobot toneMint
class node_traveller toneIndigo
```

## Components

### Journey interface

- [Flutter entry](https://github.com/amoiz13/agile-travelers/blob/main/lib/main.dart): `lib/main.dart`
- [Search and results](https://github.com/amoiz13/agile-travelers/blob/main/lib/screens/results_screen.dart): `lib/screens/results_screen.dart`
- [Trip details](https://github.com/amoiz13/agile-travelers/blob/main/lib/screens/trip_details_screen.dart): `lib/screens/trip_details_screen.dart`

### Transit data

- [ResRobot service](https://github.com/amoiz13/agile-travelers/blob/main/lib/services/resrobot_service.dart): `lib/services/resrobot_service.dart`
- [Journey models](https://github.com/amoiz13/agile-travelers/blob/main/lib/models/resrobot_models.dart): `lib/models/resrobot_models.dart`

### Emissions

- [CO2 calculator](https://github.com/amoiz13/agile-travelers/blob/main/lib/utils/co2_calculator.dart): `lib/utils/co2_calculator.dart`

### Other components

- **Traveller**
- **ResRobot API**

## Connections

- Traveller → Flutter entry: opens
- Flutter entry → Search and results: shows
- Search and results → ResRobot service: requests stations and journeys
- ResRobot service → ResRobot API: queries
- ResRobot service → Journey models: parses responses
- ResRobot service → Search and results: returns journeys
- Search and results → CO2 calculator: estimates emissions
- Search and results → Trip details: opens selected trip
- Trip details → CO2 calculator: estimates leg emissions
