# itsvantruongg/tramkien architecture

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

- Interactive diagram: https://gitdiagram.com/itsvantruongg/tramkien
- Repository: https://github.com/itsvantruongg/tramkien

## Overview

Trạm Kiến is a Flutter student-information app for HAU. Students sign in, then use its dashboard and academic screens to view schedules, grades, finance, and profile information; the app caches data for offline access and can send study-related notifications. The graph preserves the README’s major capabilities and the documented cache/API flow. Dart implementation files were not excerpted, so detailed call ownership and several subsystem links are not asserted.

Main entry points: [`lib/main.dart`](https://github.com/itsvantruongg/tramkien/blob/main/lib/main.dart) (App entry and routing), [`lib/providers`](https://github.com/itsvantruongg/tramkien/tree/main/lib/providers) (Domain providers), [`lib/services/database_service.dart`](https://github.com/itsvantruongg/tramkien/blob/main/lib/services/database_service.dart) (SQLite cache), [`lib/screens/schedule_screen.dart`](https://github.com/itsvantruongg/tramkien/blob/main/lib/screens/schedule_screen.dart) (Schedule views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Student experience"]
  node_app["App entry and routing<br/>[main.dart]"]
  node_login["Sign-in<br/>[login_screen.dart]"]
  node_dashboard["Dashboard"]
  node_schedule_ui["Schedule views"]
  node_curriculum["Curriculum"]
  node_grades_ui["Grades<br/>[grades_screen.dart]"]
  node_finance_ui["Finance"]
  node_profile["Student profile"]
  node_notifications_ui["Notification center"]
end

subgraph group_state["App state"]
  node_providers["Domain providers"]
  node_schedule_provider["Schedule state"]
  node_grade_provider["Grade state"]
  node_finance_provider["Finance state"]
end

subgraph group_services["Data and services"]
  node_hau_api["HAU data service"]
  node_background_sync["Background sync"]
  node_notification_service["Notification logic"]
  node_local_notifications["Local notification delivery"]
end

subgraph group_persistence["Local persistence"]
  node_sqlite[("SQLite cache")]
end

node_student(("Student"))
node_hau_portal["HAU student portal"]

node_student -->|"opens"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_dashboard
node_student -->|"views schedule"| node_schedule_ui
node_student -->|"views courses"| node_curriculum
node_student -->|"views grades"| node_grades_ui
node_student -->|"views fees"| node_finance_ui
node_student -->|"views profile"| node_profile
node_student -->|"opens"| node_notifications_ui
node_schedule_ui -->|"uses state"| node_schedule_provider
node_grades_ui -->|"uses state"| node_grade_provider
node_finance_ui -->|"uses state"| node_finance_provider
node_providers -.->|"fetches portal data"| node_hau_api
node_hau_api -->|"scrapes data"| node_hau_portal
node_providers -->|"caches data"| node_sqlite
node_sqlite -->|"serves offline data"| node_providers
node_background_sync -.->|"updates cache"| node_sqlite
node_notification_service -.->|"schedules alerts"| node_local_notifications
node_student -->|"triggers refresh"| node_background_sync

click node_app "https://github.com/itsvantruongg/tramkien/blob/main/lib/main.dart"
click node_login "https://github.com/itsvantruongg/tramkien/blob/main/lib/screens/login_screen.dart"
click node_dashboard "https://github.com/itsvantruongg/tramkien/blob/main/lib/screens/dashboard_screen.dart"
click node_schedule_ui "https://github.com/itsvantruongg/tramkien/blob/main/lib/screens/schedule_screen.dart"
click node_curriculum "https://github.com/itsvantruongg/tramkien/blob/main/lib/screens/curriculum_screen.dart"
click node_grades_ui "https://github.com/itsvantruongg/tramkien/blob/main/lib/screens/grades_screen.dart"
click node_finance_ui "https://github.com/itsvantruongg/tramkien/blob/main/lib/screens/finance_screen.dart"
click node_profile "https://github.com/itsvantruongg/tramkien/blob/main/lib/screens/profile_screen.dart"
click node_notifications_ui "https://github.com/itsvantruongg/tramkien/blob/main/lib/screens/notifications_screen.dart"
click node_providers "https://github.com/itsvantruongg/tramkien/tree/main/lib/providers"
click node_schedule_provider "https://github.com/itsvantruongg/tramkien/blob/main/lib/providers/schedule_provider.dart"
click node_grade_provider "https://github.com/itsvantruongg/tramkien/blob/main/lib/providers/grade_provider.dart"
click node_finance_provider "https://github.com/itsvantruongg/tramkien/blob/main/lib/providers/finance_provider.dart"
click node_hau_api "https://github.com/itsvantruongg/tramkien/blob/main/lib/services/hau_api_service.dart"
click node_background_sync "https://github.com/itsvantruongg/tramkien/blob/main/lib/services/background_sync_service.dart"
click node_notification_service "https://github.com/itsvantruongg/tramkien/blob/main/lib/services/notification_service.dart"
click node_local_notifications "https://github.com/itsvantruongg/tramkien/blob/main/lib/services/local_notification_service.dart"
click node_sqlite "https://github.com/itsvantruongg/tramkien/blob/main/lib/services/database_service.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_login,node_dashboard,node_schedule_ui,node_curriculum,node_grades_ui,node_finance_ui,node_profile,node_notifications_ui toneBlue
class node_providers,node_schedule_provider,node_grade_provider,node_finance_provider toneAmber
class node_hau_api,node_background_sync,node_notification_service,node_local_notifications toneMint
class node_sqlite toneRose
class node_student,node_hau_portal toneIndigo
```

## Components

### Student experience

- [App entry and routing](https://github.com/itsvantruongg/tramkien/blob/main/lib/main.dart): `lib/main.dart`
- [Sign-in](https://github.com/itsvantruongg/tramkien/blob/main/lib/screens/login_screen.dart): `lib/screens/login_screen.dart`
- [Dashboard](https://github.com/itsvantruongg/tramkien/blob/main/lib/screens/dashboard_screen.dart): `lib/screens/dashboard_screen.dart`
- [Schedule views](https://github.com/itsvantruongg/tramkien/blob/main/lib/screens/schedule_screen.dart): `lib/screens/schedule_screen.dart`
- [Curriculum](https://github.com/itsvantruongg/tramkien/blob/main/lib/screens/curriculum_screen.dart): `lib/screens/curriculum_screen.dart`
- [Grades](https://github.com/itsvantruongg/tramkien/blob/main/lib/screens/grades_screen.dart): `lib/screens/grades_screen.dart`
- [Finance](https://github.com/itsvantruongg/tramkien/blob/main/lib/screens/finance_screen.dart): `lib/screens/finance_screen.dart`
- [Student profile](https://github.com/itsvantruongg/tramkien/blob/main/lib/screens/profile_screen.dart): `lib/screens/profile_screen.dart`
- [Notification center](https://github.com/itsvantruongg/tramkien/blob/main/lib/screens/notifications_screen.dart): `lib/screens/notifications_screen.dart`

### App state

- [Domain providers](https://github.com/itsvantruongg/tramkien/tree/main/lib/providers): `lib/providers`
- [Schedule state](https://github.com/itsvantruongg/tramkien/blob/main/lib/providers/schedule_provider.dart): `lib/providers/schedule_provider.dart`
- [Grade state](https://github.com/itsvantruongg/tramkien/blob/main/lib/providers/grade_provider.dart): `lib/providers/grade_provider.dart`
- [Finance state](https://github.com/itsvantruongg/tramkien/blob/main/lib/providers/finance_provider.dart): `lib/providers/finance_provider.dart`

### Data and services

- [HAU data service](https://github.com/itsvantruongg/tramkien/blob/main/lib/services/hau_api_service.dart): `lib/services/hau_api_service.dart`
- [Background sync](https://github.com/itsvantruongg/tramkien/blob/main/lib/services/background_sync_service.dart): `lib/services/background_sync_service.dart`
- [Notification logic](https://github.com/itsvantruongg/tramkien/blob/main/lib/services/notification_service.dart): `lib/services/notification_service.dart`
- [Local notification delivery](https://github.com/itsvantruongg/tramkien/blob/main/lib/services/local_notification_service.dart): `lib/services/local_notification_service.dart`

### Local persistence

- [SQLite cache](https://github.com/itsvantruongg/tramkien/blob/main/lib/services/database_service.dart): `lib/services/database_service.dart`

### Other components

- **Student**
- **HAU student portal**

## Connections

- Student → App entry and routing: opens (evidence: `README.md`)
- App entry and routing → Sign-in: routes to (evidence: `README.md`)
- App entry and routing → Dashboard: routes to (evidence: `README.md`)
- Student → Schedule views: views schedule (evidence: `README.md`)
- Student → Curriculum: views courses (evidence: `README.md`)
- Student → Grades: views grades (evidence: `README.md`)
- Student → Finance: views fees (evidence: `README.md`)
- Student → Student profile: views profile (evidence: `README.md`)
- Student → Notification center: opens (evidence: `README.md`)
- Schedule views → Schedule state: uses state (evidence: `README.md`)
- Grades → Grade state: uses state (evidence: `README.md`)
- Finance → Finance state: uses state (evidence: `README.md`)
- Domain providers → HAU data service: fetches portal data
- HAU data service → HAU student portal: scrapes data (evidence: `README.md`)
- Domain providers → SQLite cache: caches data (evidence: `README.md`)
- SQLite cache → Domain providers: serves offline data (evidence: `README.md`)
- Background sync → SQLite cache: updates cache
- Notification logic → Local notification delivery: schedules alerts
- Student → Background sync: triggers refresh (evidence: `README.md`)
