# nddkhoa/vn-go-travel architecture

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

- Interactive diagram: https://gitdiagram.com/nddkhoa/vn-go-travel
- Repository: https://github.com/nddkhoa/vn-go-travel

## Overview

VN GO Travel is a travel-POI product spanning a MAUI mobile app, an Express/MongoDB backend, and an admin dashboard. The primary traveler flow is map browsing or QR/deep-link entry, followed by POI detail and narration; location geofencing can trigger short audio automatically. Mobile POI data is local-first for offline use, with optional API synchronization. The backend also supports authentication, access and moderation workflows, while the dashboard exposes administration and analytics. The README documents these capabilities; sampled source confirms selected bootstrap, download, admin-user, and event-ingestion behavior, not every connection.

Main entry points: [`ViewModels/MapViewModel.cs`](https://github.com/nddkhoa/vn-go-travel/blob/master/ViewModels/MapViewModel.cs) (Map workflow), [`backend/src/app.js`](https://github.com/nddkhoa/vn-go-travel/blob/master/backend/src/app.js) (Express API), [`backend/src/config/db.js`](https://github.com/nddkhoa/vn-go-travel/blob/master/backend/src/config/db.js) (MongoDB), [`Views/MapPage.xaml.cs`](https://github.com/nddkhoa/vn-go-travel/blob/master/Views/MapPage.xaml.cs) (Mobile screens)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Traveler app"]
  node_mobile_ui["Mobile screens<br/>[MapPage.xaml.cs]"]
  node_map_vm["Map workflow<br/>[MapViewModel.cs]"]
  node_qr_vm["QR entry"]
end

subgraph group_poi["POI experience"]
  node_entry["Entry coordinator"]
  node_qr_resolver["QR resolver<br/>[QrResolver.cs]"]
  node_poi_detail["POI detail"]
  node_poi_local[("Local POI store<br/>[PoiDatabase.cs]")]
  node_localization["Localization"]
  node_location["GPS location<br/>[LocationService.cs]"]
  node_geofence["Geofence<br/>[GeofenceService.cs]"]
  node_audio["Audio playback"]
  node_translation["POI translation"]
  node_download["Zone audio download"]
end

subgraph group_backend["Backend services"]
  node_api_client["API client<br/>[ApiClient.cs]"]
  node_backend_api["Express API<br/>[app.js]"]
  node_auth["Authentication<br/>[auth.controller.js]"]
  node_poi_service["POI services<br/>[poi.service.js]"]
  node_moderation["POI moderation"]
  node_mongo[("MongoDB<br/>[db.js]")]
end

subgraph group_admin["Administration"]
  node_admin_user["User administration"]
  node_admin_web["Admin dashboard<br/>[App.jsx]"]
  node_admin_pages["Admin workflows"]
end

subgraph group_events["Event telemetry"]
  node_event_api["Event ingestion API"]
  node_event_validation["Event validation"]
  node_telemetry["Contract telemetry"]
end

node_traveler(("Traveler"))

node_traveler -->|"uses"| node_mobile_ui
node_mobile_ui -->|"presents"| node_map_vm
node_mobile_ui -->|"opens scanner"| node_qr_vm
node_map_vm -->|"reads POIs"| node_poi_local
node_map_vm -->|"localizes text"| node_localization
node_map_vm -->|"requests position"| node_location
node_map_vm -->|"evaluates regions"| node_geofence
node_geofence -->|"triggers narration"| node_audio
node_qr_vm -->|"parses QR"| node_qr_resolver
node_qr_resolver -->|"resolves entry"| node_entry
node_entry -->|"navigates to"| node_poi_detail
node_entry -->|"navigates to"| node_map_vm
node_poi_detail -->|"plays narration"| node_audio
node_poi_detail -->|"requests translation"| node_translation
node_download -->|"fetches audio data"| node_api_client
node_api_client -->|"calls API"| node_backend_api
node_admin_web -->|"presents workflows"| node_admin_pages
node_admin_pages -->|"calls API"| node_backend_api
node_backend_api -->|"dispatches auth"| node_auth
node_backend_api -->|"dispatches POI requests"| node_poi_service
node_backend_api -->|"dispatches moderation"| node_moderation
node_backend_api -->|"dispatches user admin"| node_admin_user
node_auth -->|"reads and writes"| node_mongo
node_poi_service -->|"reads and writes"| node_mongo
node_moderation -->|"reads and writes"| node_mongo
node_admin_user -->|"reads and writes"| node_mongo
node_event_api -->|"partitions events"| node_event_validation
node_event_api -->|"records samples"| node_telemetry

click node_mobile_ui "https://github.com/nddkhoa/vn-go-travel/blob/master/Views/MapPage.xaml.cs"
click node_map_vm "https://github.com/nddkhoa/vn-go-travel/blob/master/ViewModels/MapViewModel.cs"
click node_qr_vm "https://github.com/nddkhoa/vn-go-travel/blob/master/ViewModels/QrScannerViewModel.cs"
click node_entry "https://github.com/nddkhoa/vn-go-travel/blob/master/Services/PoiEntryCoordinator.cs"
click node_qr_resolver "https://github.com/nddkhoa/vn-go-travel/blob/master/Services/QrResolver.cs"
click node_poi_detail "https://github.com/nddkhoa/vn-go-travel/blob/master/ViewModels/PoiDetailViewModel.cs"
click node_poi_local "https://github.com/nddkhoa/vn-go-travel/blob/master/Services/PoiDatabase.cs"
click node_localization "https://github.com/nddkhoa/vn-go-travel/blob/master/Services/LocalizationService.cs"
click node_location "https://github.com/nddkhoa/vn-go-travel/blob/master/Services/LocationService.cs"
click node_geofence "https://github.com/nddkhoa/vn-go-travel/blob/master/Services/GeofenceService.cs"
click node_audio "https://github.com/nddkhoa/vn-go-travel/blob/master/Services/AudioPlayerService.cs"
click node_translation "https://github.com/nddkhoa/vn-go-travel/blob/master/Services/PoiTranslationService.cs"
click node_download "https://github.com/nddkhoa/vn-go-travel/blob/master/Services/ZoneDownloadService.cs"
click node_api_client "https://github.com/nddkhoa/vn-go-travel/blob/master/Infrastructure/Remote/ApiClient.cs"
click node_backend_api "https://github.com/nddkhoa/vn-go-travel/blob/master/backend/src/app.js"
click node_auth "https://github.com/nddkhoa/vn-go-travel/blob/master/backend/src/controllers/auth.controller.js"
click node_poi_service "https://github.com/nddkhoa/vn-go-travel/blob/master/backend/src/services/poi.service.js"
click node_moderation "https://github.com/nddkhoa/vn-go-travel/blob/master/backend/src/controllers/admin-poi.controller.js"
click node_mongo "https://github.com/nddkhoa/vn-go-travel/blob/master/backend/src/config/db.js"
click node_admin_user "https://github.com/nddkhoa/vn-go-travel/blob/master/backend/src/controllers/admin-user.controller.js"
click node_admin_web "https://github.com/nddkhoa/vn-go-travel/blob/master/admin-web/src/App.jsx"
click node_admin_pages "https://github.com/nddkhoa/vn-go-travel/tree/master/admin-web/src/pages"
click node_event_api "https://github.com/nddkhoa/vn-go-travel/blob/master/TranslationEvents.Api/Controllers/EventsController.cs"
click node_event_validation "https://github.com/nddkhoa/vn-go-travel/blob/master/TranslationEvents.Api/Services/EventValidationService.cs"
click node_telemetry "https://github.com/nddkhoa/vn-go-travel/blob/master/ContractObservability/ContractTelemetryTracker.cs"

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_mobile_ui,node_map_vm,node_qr_vm toneBlue
class node_entry,node_qr_resolver,node_poi_detail,node_poi_local,node_localization,node_location,node_geofence,node_audio,node_translation,node_download toneAmber
class node_api_client,node_backend_api,node_auth,node_poi_service,node_moderation,node_mongo toneMint
class node_admin_user,node_admin_web,node_admin_pages toneRose
class node_event_api,node_event_validation,node_telemetry,node_traveler toneIndigo
```

## Components

### Traveler app

- [Mobile screens](https://github.com/nddkhoa/vn-go-travel/blob/master/Views/MapPage.xaml.cs): `Views/MapPage.xaml.cs`
- [Map workflow](https://github.com/nddkhoa/vn-go-travel/blob/master/ViewModels/MapViewModel.cs): `ViewModels/MapViewModel.cs`
- [QR entry](https://github.com/nddkhoa/vn-go-travel/blob/master/ViewModels/QrScannerViewModel.cs): `ViewModels/QrScannerViewModel.cs`

### POI experience

- [Entry coordinator](https://github.com/nddkhoa/vn-go-travel/blob/master/Services/PoiEntryCoordinator.cs): `Services/PoiEntryCoordinator.cs`
- [QR resolver](https://github.com/nddkhoa/vn-go-travel/blob/master/Services/QrResolver.cs): `Services/QrResolver.cs`
- [POI detail](https://github.com/nddkhoa/vn-go-travel/blob/master/ViewModels/PoiDetailViewModel.cs): `ViewModels/PoiDetailViewModel.cs`
- [Local POI store](https://github.com/nddkhoa/vn-go-travel/blob/master/Services/PoiDatabase.cs): `Services/PoiDatabase.cs`
- [Localization](https://github.com/nddkhoa/vn-go-travel/blob/master/Services/LocalizationService.cs): `Services/LocalizationService.cs`
- [GPS location](https://github.com/nddkhoa/vn-go-travel/blob/master/Services/LocationService.cs): `Services/LocationService.cs`
- [Geofence](https://github.com/nddkhoa/vn-go-travel/blob/master/Services/GeofenceService.cs): `Services/GeofenceService.cs`
- [Audio playback](https://github.com/nddkhoa/vn-go-travel/blob/master/Services/AudioPlayerService.cs): `Services/AudioPlayerService.cs`
- [POI translation](https://github.com/nddkhoa/vn-go-travel/blob/master/Services/PoiTranslationService.cs): `Services/PoiTranslationService.cs`
- [Zone audio download](https://github.com/nddkhoa/vn-go-travel/blob/master/Services/ZoneDownloadService.cs): `Services/ZoneDownloadService.cs`

### Backend services

- [API client](https://github.com/nddkhoa/vn-go-travel/blob/master/Infrastructure/Remote/ApiClient.cs): `Infrastructure/Remote/ApiClient.cs`
- [Express API](https://github.com/nddkhoa/vn-go-travel/blob/master/backend/src/app.js): `backend/src/app.js`
- [Authentication](https://github.com/nddkhoa/vn-go-travel/blob/master/backend/src/controllers/auth.controller.js): `backend/src/controllers/auth.controller.js`
- [POI services](https://github.com/nddkhoa/vn-go-travel/blob/master/backend/src/services/poi.service.js): `backend/src/services/poi.service.js`
- [POI moderation](https://github.com/nddkhoa/vn-go-travel/blob/master/backend/src/controllers/admin-poi.controller.js): `backend/src/controllers/admin-poi.controller.js`
- [MongoDB](https://github.com/nddkhoa/vn-go-travel/blob/master/backend/src/config/db.js): `backend/src/config/db.js`

### Administration

- [User administration](https://github.com/nddkhoa/vn-go-travel/blob/master/backend/src/controllers/admin-user.controller.js): `backend/src/controllers/admin-user.controller.js`
- [Admin dashboard](https://github.com/nddkhoa/vn-go-travel/blob/master/admin-web/src/App.jsx): `admin-web/src/App.jsx`
- [Admin workflows](https://github.com/nddkhoa/vn-go-travel/tree/master/admin-web/src/pages): `admin-web/src/pages`

### Event telemetry

- [Event ingestion API](https://github.com/nddkhoa/vn-go-travel/blob/master/TranslationEvents.Api/Controllers/EventsController.cs): `TranslationEvents.Api/Controllers/EventsController.cs`
- [Event validation](https://github.com/nddkhoa/vn-go-travel/blob/master/TranslationEvents.Api/Services/EventValidationService.cs): `TranslationEvents.Api/Services/EventValidationService.cs`
- [Contract telemetry](https://github.com/nddkhoa/vn-go-travel/blob/master/ContractObservability/ContractTelemetryTracker.cs): `ContractObservability/ContractTelemetryTracker.cs`

### Other components

- **Traveler**

## Connections

- Traveler → Mobile screens: uses
- Mobile screens → Map workflow: presents
- Mobile screens → QR entry: opens scanner
- Map workflow → Local POI store: reads POIs
- Map workflow → Localization: localizes text
- Map workflow → GPS location: requests position
- Map workflow → Geofence: evaluates regions
- Geofence → Audio playback: triggers narration
- QR entry → QR resolver: parses QR
- QR resolver → Entry coordinator: resolves entry
- Entry coordinator → POI detail: navigates to
- Entry coordinator → Map workflow: navigates to
- POI detail → Audio playback: plays narration
- POI detail → POI translation: requests translation
- Zone audio download → API client: fetches audio data
- API client → Express API: calls API
- Admin dashboard → Admin workflows: presents workflows
- Admin workflows → Express API: calls API
- Express API → Authentication: dispatches auth
- Express API → POI services: dispatches POI requests
- Express API → POI moderation: dispatches moderation
- Express API → User administration: dispatches user admin
- Authentication → MongoDB: reads and writes
- POI services → MongoDB: reads and writes
- POI moderation → MongoDB: reads and writes
- User administration → MongoDB: reads and writes
- Event ingestion API → Event validation: partitions events
- Event ingestion API → Contract telemetry: records samples
