# tonbunheng/tourism-travel architecture

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

- Interactive diagram: https://gitdiagram.com/tonbunheng/tourism-travel
- Repository: https://github.com/tonbunheng/tourism-travel

## Overview

AngkorVerses is a React tourism platform for public Cambodian travel discovery and authenticated tourist, business-owner, and tour-guide workflows. Visitors explore destinations and other travel content; members can plan trips, save favorites, book, review, and manage profiles, while business owners and guides manage listings, reservations, and contributed content. Routes select the portal and role guards; shared contexts provide session, travel, and alert state, with service modules communicating with the external Laravel API. README capabilities not represented in sampled code are retained at subsystem level; unsampled internals and connections are not inferred.

Main entry points: [`src/routes/AppRoutes.jsx`](https://github.com/tonbunheng/tourism-travel/blob/main/src/routes/AppRoutes.jsx) (Route dispatch), [`src/App.jsx`](https://github.com/tonbunheng/tourism-travel/blob/main/src/App.jsx) (App providers), [`src/pages/travel-user/TravelUserDashboard.jsx`](https://github.com/tonbunheng/tourism-travel/blob/main/src/pages/travel-user/TravelUserDashboard.jsx) (Traveler hub), [`src/services`](https://github.com/tonbunheng/tourism-travel/tree/main/src/services) (Domain services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app_entry["App providers<br/>[App.jsx]"]
  node_routing["Route dispatch<br/>[AppRoutes.jsx]"]
  node_public_layout["Public layout"]
  node_dashboard_layout["Dashboard layout"]
end

subgraph group_discovery["Tourism discovery"]
  node_discovery_pages["Explore destinations"]
  node_business_discovery["Business directory"]
  node_events_gallery["Events &amp; gallery"]
  node_guides_tours["Guides &amp; tours"]
  node_ai_assistant["AI travel assistant<br/>[ChatWidget.jsx]"]
  node_reviews["Reviews<br/>[Reviews.jsx]"]
end

subgraph group_traveler["Traveler services"]
  node_travel_hub["Traveler hub"]
  node_trip_planner["Trips &amp; planner<br/>[Trips.jsx]"]
  node_bookings["Bookings<br/>[MyBookings.jsx]"]
  node_favorites["Favorites &amp; achievements"]
end

subgraph group_portals["Partner portals"]
  node_business_portal["Business management<br/>[BusinessManage.jsx]"]
  node_business_reports["Business reports"]
  node_guide_portal["Guide content portal"]
end

subgraph group_platform["Shared platform"]
  node_auth_context["Session &amp; auth<br/>[AuthContext.jsx]"]
  node_travel_context["Travel state<br/>[TravelContext.jsx]"]
  node_alert_context["Alerts<br/>[AlertContext.jsx]"]
  node_services["Domain services"]
  node_api_client["HTTP API client<br/>[api.js]"]
end

node_traveler_actor(("Traveler / visitor"))
node_owner_actor(("Business owner"))
node_guide_actor(("Tour guide / editor"))
node_backend{{"Laravel backend API"}}

node_traveler_actor -->|"opens routes"| node_routing
node_owner_actor -->|"opens routes"| node_routing
node_guide_actor -->|"opens routes"| node_routing
node_app_entry -->|"renders"| node_routing
node_app_entry -->|"provides session"| node_auth_context
node_app_entry -->|"provides travel state"| node_travel_context
node_app_entry -->|"provides alerts"| node_alert_context
node_routing -->|"routes public"| node_public_layout
node_routing -.->|"routes portals"| node_dashboard_layout
node_routing -->|"dispatches discovery"| node_discovery_pages
node_routing -->|"dispatches listings"| node_business_discovery
node_routing -->|"dispatches content"| node_events_gallery
node_routing -.->|"dispatches hub"| node_travel_hub
node_routing -->|"dispatches business"| node_business_portal
node_routing -->|"dispatches guide"| node_guide_portal
node_public_layout -->|"renders"| node_ai_assistant
node_discovery_pages -.->|"includes"| node_guides_tours
node_discovery_pages -.->|"includes reviews"| node_reviews
node_travel_hub -->|"links trips"| node_trip_planner
node_travel_hub -->|"loads bookings"| node_bookings
node_travel_hub -->|"loads favorites"| node_favorites
node_business_portal -.->|"exports reports"| node_business_reports
node_auth_context -->|"uses auth service"| node_services
node_travel_context -->|"loads travel data"| node_services
node_reviews -->|"uses review service"| node_services
node_services -->|"calls API client"| node_api_client
node_api_client -->|"sends requests"| node_backend
node_reviews -->|"submits review"| node_alert_context

click node_app_entry "https://github.com/tonbunheng/tourism-travel/blob/main/src/App.jsx"
click node_routing "https://github.com/tonbunheng/tourism-travel/blob/main/src/routes/AppRoutes.jsx"
click node_public_layout "https://github.com/tonbunheng/tourism-travel/blob/main/src/layouts/TravelUserLayout/TravelUserLayout.jsx"
click node_dashboard_layout "https://github.com/tonbunheng/tourism-travel/blob/main/src/layouts/DashboardLayout/DashboardLayout.jsx"
click node_discovery_pages "https://github.com/tonbunheng/tourism-travel/tree/main/src/pages"
click node_business_discovery "https://github.com/tonbunheng/tourism-travel/tree/main/src/pages/businesses"
click node_events_gallery "https://github.com/tonbunheng/tourism-travel/tree/main/src/pages/events"
click node_guides_tours "https://github.com/tonbunheng/tourism-travel/tree/main/src/pages/guides"
click node_ai_assistant "https://github.com/tonbunheng/tourism-travel/blob/main/src/components/chat/ChatWidget.jsx"
click node_reviews "https://github.com/tonbunheng/tourism-travel/blob/main/src/pages/reviews/Reviews.jsx"
click node_travel_hub "https://github.com/tonbunheng/tourism-travel/blob/main/src/pages/travel-user/TravelUserDashboard.jsx"
click node_trip_planner "https://github.com/tonbunheng/tourism-travel/blob/main/src/pages/trips/Trips.jsx"
click node_bookings "https://github.com/tonbunheng/tourism-travel/blob/main/src/pages/bookings/MyBookings.jsx"
click node_favorites "https://github.com/tonbunheng/tourism-travel/tree/main/src/pages/favorites"
click node_business_portal "https://github.com/tonbunheng/tourism-travel/blob/main/src/pages/business/BusinessManage.jsx"
click node_business_reports "https://github.com/tonbunheng/tourism-travel/blob/main/src/pages/business/BusinessReports.jsx"
click node_guide_portal "https://github.com/tonbunheng/tourism-travel/tree/main/src/pages/guide"
click node_auth_context "https://github.com/tonbunheng/tourism-travel/blob/main/src/context/AuthContext.jsx"
click node_travel_context "https://github.com/tonbunheng/tourism-travel/blob/main/src/context/TravelContext.jsx"
click node_alert_context "https://github.com/tonbunheng/tourism-travel/blob/main/src/context/AlertContext.jsx"
click node_services "https://github.com/tonbunheng/tourism-travel/tree/main/src/services"
click node_api_client "https://github.com/tonbunheng/tourism-travel/blob/main/src/services/api.js"

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_routing,node_public_layout,node_dashboard_layout toneBlue
class node_discovery_pages,node_business_discovery,node_events_gallery,node_guides_tours,node_ai_assistant,node_reviews toneAmber
class node_travel_hub,node_trip_planner,node_bookings,node_favorites,node_backend toneMint
class node_business_portal,node_business_reports,node_guide_portal toneRose
class node_auth_context,node_travel_context,node_alert_context,node_services,node_api_client,node_traveler_actor,node_owner_actor,node_guide_actor toneIndigo
```

## Components

### Application shell

- [App providers](https://github.com/tonbunheng/tourism-travel/blob/main/src/App.jsx): `src/App.jsx`
- [Route dispatch](https://github.com/tonbunheng/tourism-travel/blob/main/src/routes/AppRoutes.jsx): `src/routes/AppRoutes.jsx`
- [Public layout](https://github.com/tonbunheng/tourism-travel/blob/main/src/layouts/TravelUserLayout/TravelUserLayout.jsx): `src/layouts/TravelUserLayout/TravelUserLayout.jsx`
- [Dashboard layout](https://github.com/tonbunheng/tourism-travel/blob/main/src/layouts/DashboardLayout/DashboardLayout.jsx): `src/layouts/DashboardLayout/DashboardLayout.jsx`

### Tourism discovery

- [Explore destinations](https://github.com/tonbunheng/tourism-travel/tree/main/src/pages): `src/pages`
- [Business directory](https://github.com/tonbunheng/tourism-travel/tree/main/src/pages/businesses): `src/pages/businesses`
- [Events & gallery](https://github.com/tonbunheng/tourism-travel/tree/main/src/pages/events): `src/pages/events`
- [Guides & tours](https://github.com/tonbunheng/tourism-travel/tree/main/src/pages/guides): `src/pages/guides`
- [AI travel assistant](https://github.com/tonbunheng/tourism-travel/blob/main/src/components/chat/ChatWidget.jsx): `src/components/chat/ChatWidget.jsx`
- [Reviews](https://github.com/tonbunheng/tourism-travel/blob/main/src/pages/reviews/Reviews.jsx): `src/pages/reviews/Reviews.jsx`

### Traveler services

- [Traveler hub](https://github.com/tonbunheng/tourism-travel/blob/main/src/pages/travel-user/TravelUserDashboard.jsx): `src/pages/travel-user/TravelUserDashboard.jsx`
- [Trips & planner](https://github.com/tonbunheng/tourism-travel/blob/main/src/pages/trips/Trips.jsx): `src/pages/trips/Trips.jsx`
- [Bookings](https://github.com/tonbunheng/tourism-travel/blob/main/src/pages/bookings/MyBookings.jsx): `src/pages/bookings/MyBookings.jsx`
- [Favorites & achievements](https://github.com/tonbunheng/tourism-travel/tree/main/src/pages/favorites): `src/pages/favorites`

### Partner portals

- [Business management](https://github.com/tonbunheng/tourism-travel/blob/main/src/pages/business/BusinessManage.jsx): `src/pages/business/BusinessManage.jsx`
- [Business reports](https://github.com/tonbunheng/tourism-travel/blob/main/src/pages/business/BusinessReports.jsx): `src/pages/business/BusinessReports.jsx`
- [Guide content portal](https://github.com/tonbunheng/tourism-travel/tree/main/src/pages/guide): `src/pages/guide`

### Shared platform

- [Session & auth](https://github.com/tonbunheng/tourism-travel/blob/main/src/context/AuthContext.jsx): `src/context/AuthContext.jsx`
- [Travel state](https://github.com/tonbunheng/tourism-travel/blob/main/src/context/TravelContext.jsx): `src/context/TravelContext.jsx`
- [Alerts](https://github.com/tonbunheng/tourism-travel/blob/main/src/context/AlertContext.jsx): `src/context/AlertContext.jsx`
- [Domain services](https://github.com/tonbunheng/tourism-travel/tree/main/src/services): `src/services`
- [HTTP API client](https://github.com/tonbunheng/tourism-travel/blob/main/src/services/api.js): `src/services/api.js`

### Other components

- **Traveler / visitor**
- **Business owner**
- **Tour guide / editor**
- **Laravel backend API**

## Connections

- Traveler / visitor → Route dispatch: opens routes (evidence: `src/routes/AppRoutes.jsx`)
- Business owner → Route dispatch: opens routes (evidence: `src/routes/AppRoutes.jsx`)
- Tour guide / editor → Route dispatch: opens routes (evidence: `src/routes/AppRoutes.jsx`)
- App providers → Route dispatch: renders (evidence: `src/App.jsx`)
- App providers → Session & auth: provides session (evidence: `src/App.jsx`)
- App providers → Travel state: provides travel state (evidence: `src/App.jsx`)
- App providers → Alerts: provides alerts (evidence: `src/App.jsx`)
- Route dispatch → Public layout: routes public (evidence: `src/routes/AppRoutes.jsx`)
- Route dispatch → Dashboard layout: routes portals (evidence: `src/routes/AppRoutes.jsx`)
- Route dispatch → Explore destinations: dispatches discovery (evidence: `src/routes/AppRoutes.jsx`)
- Route dispatch → Business directory: dispatches listings (evidence: `src/routes/AppRoutes.jsx`)
- Route dispatch → Events & gallery: dispatches content (evidence: `src/routes/AppRoutes.jsx`)
- Route dispatch → Traveler hub: dispatches hub (evidence: `src/routes/AppRoutes.jsx`)
- Route dispatch → Business management: dispatches business (evidence: `src/routes/AppRoutes.jsx`)
- Route dispatch → Guide content portal: dispatches guide (evidence: `src/routes/AppRoutes.jsx`)
- Public layout → AI travel assistant: renders (evidence: `src/layouts/TravelUserLayout/TravelUserLayout.jsx`)
- Explore destinations → Guides & tours: includes
- Explore destinations → Reviews: includes reviews
- Traveler hub → Trips & planner: links trips (evidence: `src/pages/travel-user/TravelUserDashboard.jsx`)
- Traveler hub → Bookings: loads bookings (evidence: `src/pages/travel-user/TravelUserDashboard.jsx`)
- Traveler hub → Favorites & achievements: loads favorites (evidence: `src/pages/travel-user/TravelUserDashboard.jsx`)
- Business management → Business reports: exports reports
- Session & auth → Domain services: uses auth service (evidence: `src/context/AuthContext.jsx`)
- Travel state → Domain services: loads travel data (evidence: `src/context/TravelContext.jsx`)
- Reviews → Domain services: uses review service (evidence: `src/pages/reviews/Reviews.jsx`)
- Domain services → HTTP API client: calls API client (evidence: `src/services/reviewService.js`)
- HTTP API client → Laravel backend API: sends requests (evidence: `src/services/api.js`)
- Reviews → Alerts: submits review
