# hasibcore/train-router architecture

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

- Interactive diagram: https://gitdiagram.com/hasibcore/train-router
- Repository: https://github.com/hasibcore/train-router

## Overview

This is a Flutter application named train_router; the README provides no product-specific behavior beyond identifying it as a starter project. The tree suggests a user-facing flow spanning startup, authentication, train search/details/seats, and profile/navigation, but the Dart implementations were not excerpted, so those connections are shown as unverified. The platform runner files are framework shells; no booking, routing, or train-data service can be confirmed from the available evidence.

Main entry points: [`lib/home_page.dart`](https://github.com/hasibcore/train-router/blob/main/lib/home_page.dart) (Home page), [`lib/auth_service.dart`](https://github.com/hasibcore/train-router/blob/main/lib/auth_service.dart) (Auth service), [`lib/main.dart`](https://github.com/hasibcore/train-router/blob/main/lib/main.dart) (App startup), [`lib/splash_screen.dart`](https://github.com/hasibcore/train-router/blob/main/lib/splash_screen.dart) (Splash screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_startup["App startup<br/>[main.dart]"]
  node_splash["Splash screen<br/>[splash_screen.dart]"]
  node_home["Home page<br/>[home_page.dart]"]
  node_construction["Unavailable page"]
end

subgraph group_account["Account"]
  node_auth["Auth service<br/>[auth_service.dart]"]
  node_login["Login page<br/>[login_page.dart]"]
  node_login_screen["Login screen<br/>[login_screen.dart]"]
  node_signup["Sign up<br/>[sign_up_page.dart]"]
  node_profile["Profile page<br/>[profile_page.dart]"]
end

subgraph group_trains["Train experience"]
  node_search["Train search"]
  node_details["Train details"]
  node_seats["Seat display"]
end

subgraph group_navigation["Shared navigation"]
  node_app_bar["App bar<br/>[app_bar.dart]"]
  node_drawer["App drawer<br/>[app_drawer.dart]"]
  node_bottom_nav["Bottom navigation"]
end

node_user(("App user"))

node_user -.->|"opens app"| node_startup
node_startup -.->|"may show"| node_splash
node_splash -.->|"may enter"| node_home
node_home -.->|"may navigate"| node_login
node_home -.->|"may navigate"| node_search
node_login -.->|"may authenticate"| node_auth
node_login_screen -.->|"may authenticate"| node_auth
node_signup -.->|"may register"| node_auth
node_home -.->|"may navigate"| node_profile
node_search -.->|"may select"| node_details
node_details -.->|"may view"| node_seats
node_home -.->|"may navigate"| node_construction

click node_startup "https://github.com/hasibcore/train-router/blob/main/lib/main.dart"
click node_splash "https://github.com/hasibcore/train-router/blob/main/lib/splash_screen.dart"
click node_home "https://github.com/hasibcore/train-router/blob/main/lib/home_page.dart"
click node_auth "https://github.com/hasibcore/train-router/blob/main/lib/auth_service.dart"
click node_login "https://github.com/hasibcore/train-router/blob/main/lib/login_page.dart"
click node_login_screen "https://github.com/hasibcore/train-router/blob/main/lib/login_screen.dart"
click node_signup "https://github.com/hasibcore/train-router/blob/main/lib/sign_up_page.dart"
click node_profile "https://github.com/hasibcore/train-router/blob/main/lib/profile_page.dart"
click node_search "https://github.com/hasibcore/train-router/blob/main/lib/train_search_page.dart"
click node_details "https://github.com/hasibcore/train-router/blob/main/lib/train_details_page.dart"
click node_seats "https://github.com/hasibcore/train-router/blob/main/lib/seat_show_page.dart"
click node_construction "https://github.com/hasibcore/train-router/blob/main/lib/under_construction_page.dart"
click node_app_bar "https://github.com/hasibcore/train-router/blob/main/lib/custom_widgets/app_bar.dart"
click node_drawer "https://github.com/hasibcore/train-router/blob/main/lib/custom_widgets/app_drawer.dart"
click node_bottom_nav "https://github.com/hasibcore/train-router/blob/main/lib/custom_widgets/bottom_navigation.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_startup,node_splash,node_home,node_construction,node_user toneBlue
class node_auth,node_login,node_login_screen,node_signup,node_profile toneAmber
class node_search,node_details,node_seats toneMint
class node_app_bar,node_drawer,node_bottom_nav toneRose
```

## Components

### App shell

- [App startup](https://github.com/hasibcore/train-router/blob/main/lib/main.dart): `lib/main.dart`
- [Splash screen](https://github.com/hasibcore/train-router/blob/main/lib/splash_screen.dart): `lib/splash_screen.dart`
- [Home page](https://github.com/hasibcore/train-router/blob/main/lib/home_page.dart): `lib/home_page.dart`
- [Unavailable page](https://github.com/hasibcore/train-router/blob/main/lib/under_construction_page.dart): `lib/under_construction_page.dart`

### Account

- [Auth service](https://github.com/hasibcore/train-router/blob/main/lib/auth_service.dart): `lib/auth_service.dart`
- [Login page](https://github.com/hasibcore/train-router/blob/main/lib/login_page.dart): `lib/login_page.dart`
- [Login screen](https://github.com/hasibcore/train-router/blob/main/lib/login_screen.dart): `lib/login_screen.dart`
- [Sign up](https://github.com/hasibcore/train-router/blob/main/lib/sign_up_page.dart): `lib/sign_up_page.dart`
- [Profile page](https://github.com/hasibcore/train-router/blob/main/lib/profile_page.dart): `lib/profile_page.dart`

### Train experience

- [Train search](https://github.com/hasibcore/train-router/blob/main/lib/train_search_page.dart): `lib/train_search_page.dart`
- [Train details](https://github.com/hasibcore/train-router/blob/main/lib/train_details_page.dart): `lib/train_details_page.dart`
- [Seat display](https://github.com/hasibcore/train-router/blob/main/lib/seat_show_page.dart): `lib/seat_show_page.dart`

### Shared navigation

- [App bar](https://github.com/hasibcore/train-router/blob/main/lib/custom_widgets/app_bar.dart): `lib/custom_widgets/app_bar.dart`
- [App drawer](https://github.com/hasibcore/train-router/blob/main/lib/custom_widgets/app_drawer.dart): `lib/custom_widgets/app_drawer.dart`
- [Bottom navigation](https://github.com/hasibcore/train-router/blob/main/lib/custom_widgets/bottom_navigation.dart): `lib/custom_widgets/bottom_navigation.dart`

### Other components

- **App user**

## Connections

- App user → App startup: opens app
- App startup → Splash screen: may show
- Splash screen → Home page: may enter
- Home page → Login page: may navigate
- Home page → Train search: may navigate
- Login page → Auth service: may authenticate
- Login screen → Auth service: may authenticate
- Sign up → Auth service: may register
- Home page → Profile page: may navigate
- Train search → Train details: may select
- Train details → Seat display: may view
- Home page → Unavailable page: may navigate
