# ledinhthai22/travel-recommendation-and-booking-system architecture

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

- Interactive diagram: https://gitdiagram.com/ledinhthai22/travel-recommendation-and-booking-system
- Repository: https://github.com/ledinhthai22/travel-recommendation-and-booking-system

## Overview

This repository implements a travel-tour discovery, recommendation, booking, payment and refund product, with customer and administrative workflows. The clearest sampled paths cover account access and review submission/moderation; the tree also shows booking, recommendation, notifications and catalog management. Frontend administration pages and backend APIs are represented separately because the excerpts do not show their HTTP wiring. Several domain services are unsampled, so their relationships are omitted rather than inferred; dashed links indicate unverified integration.

Main entry points: [`Backend/travel-recommendation-and-booking-system/Services/ReviewService.cs`](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Services/ReviewService.cs) (Review processing), [`Backend/travel-recommendation-and-booking-system/Controllers/Auth/AuthController.cs`](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Controllers/Auth/AuthController.cs) (Auth endpoints), [`Frontend/src/Pages/admin`](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/tree/master/Frontend/src/Pages/admin) (Admin console), [`Backend/travel-recommendation-and-booking-system/Controllers/Customer/ReviewController.cs`](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Controllers/Customer/ReviewController.cs) (Customer reviews)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_admin_ui["Admin console"]
  node_auth_ui["Auth client<br/>[AuthService.js]"]
  node_review_ui["Review manager<br/>[ReviewManager.jsx]"]
end

subgraph group_api["API workflows"]
  node_auth_api["Auth endpoints<br/>[AuthController.cs]"]
  node_review_submit["Customer reviews"]
  node_review_admin["Review moderation"]
  node_booking_api["Tour booking"]
  node_payment_api["Payment"]
  node_refund_api["Refunds"]
  node_notification_api["Notifications"]
end

subgraph group_domain["Travel domain"]
  node_catalog["Tour catalog<br/>[TourService.cs]"]
  node_recommendations["Tour recommendations"]
  node_booking_service["Booking service"]
  node_review_service["Review processing<br/>[ReviewService.cs]"]
  node_auth_service["Account service<br/>[AuthService.cs]"]
  node_refund_service["Refund policy"]
end

subgraph group_infra["Persistence and integrations"]
  node_data[("Travel data model")]
  node_dbcontext["EF data context<br/>[AppDbContext.cs]"]
  node_vnpay["VNPay gateway"]
  node_gemini["Gemini AI"]
end

node_customer(("Customer"))
node_admin(("Admin or staff"))

node_customer -->|"authenticates"| node_auth_api
node_auth_api -->|"delegates auth"| node_auth_service
node_auth_service -->|"reads and writes"| node_data
node_customer -->|"submits review"| node_review_submit
node_review_submit -->|"adds review"| node_review_service
node_admin -->|"moderates reviews"| node_review_admin
node_review_admin -->|"delegates review actions"| node_review_service
node_review_service -->|"queries and saves"| node_data
node_review_service -.->|"requests AI review"| node_gemini
node_review_service -.->|"broadcasts status"| node_notification_api
node_customer -.->|"books a tour"| node_booking_api
node_booking_api -.->|"delegates booking"| node_booking_service
node_customer -->|"pays booking"| node_payment_api
node_payment_api -.->|"creates payment request"| node_vnpay
node_customer -->|"requests refund"| node_refund_api
node_refund_api -.->|"uses refund policy"| node_refund_service
node_admin -.->|"manages catalog"| node_admin_ui
node_admin_ui -.->|"opens reviews"| node_review_ui
node_auth_ui -.->|"calls auth API"| node_auth_api

click node_admin_ui "https://github.com/ledinhthai22/travel-recommendation-and-booking-system/tree/master/Frontend/src/Pages/admin"
click node_auth_ui "https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Frontend/src/Services/AuthService.js"
click node_review_ui "https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Frontend/src/Pages/admin/ReviewManager/ReviewManager.jsx"
click node_auth_api "https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Controllers/Auth/AuthController.cs"
click node_review_submit "https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Controllers/Customer/ReviewController.cs"
click node_review_admin "https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Controllers/Admin/ReviewController.cs"
click node_booking_api "https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Controllers/Client/TourBookingController.cs"
click node_payment_api "https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Controllers/Payment/PaymentController.cs"
click node_refund_api "https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Controllers/RefundController/RefundController.cs"
click node_notification_api "https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Controllers/Noitification/NotificationController.cs"
click node_catalog "https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Services/TourService.cs"
click node_recommendations "https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Services/RecommendationService.cs"
click node_booking_service "https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Interfaces/ITourBookingService.cs"
click node_review_service "https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Services/ReviewService.cs"
click node_auth_service "https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Services/AuthService.cs"
click node_refund_service "https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Helper/RefundPolicyEngine.cs"
click node_data "https://github.com/ledinhthai22/travel-recommendation-and-booking-system/tree/master/Backend/travel-recommendation-and-booking-system/Models"
click node_dbcontext "https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Data/AppDbContext.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_admin_ui,node_auth_ui,node_review_ui toneBlue
class node_auth_api,node_review_submit,node_review_admin,node_booking_api,node_payment_api,node_refund_api,node_notification_api toneAmber
class node_catalog,node_recommendations,node_booking_service,node_review_service,node_auth_service,node_refund_service toneMint
class node_data,node_dbcontext,node_vnpay,node_gemini toneRose
class node_customer,node_admin toneIndigo
```

## Components

### Web experience

- [Admin console](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/tree/master/Frontend/src/Pages/admin): `Frontend/src/Pages/admin`
- [Auth client](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Frontend/src/Services/AuthService.js): `Frontend/src/Services/AuthService.js`
- [Review manager](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Frontend/src/Pages/admin/ReviewManager/ReviewManager.jsx): `Frontend/src/Pages/admin/ReviewManager/ReviewManager.jsx`

### API workflows

- [Auth endpoints](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Controllers/Auth/AuthController.cs): `Backend/travel-recommendation-and-booking-system/Controllers/Auth/AuthController.cs`
- [Customer reviews](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Controllers/Customer/ReviewController.cs): `Backend/travel-recommendation-and-booking-system/Controllers/Customer/ReviewController.cs`
- [Review moderation](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Controllers/Admin/ReviewController.cs): `Backend/travel-recommendation-and-booking-system/Controllers/Admin/ReviewController.cs`
- [Tour booking](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Controllers/Client/TourBookingController.cs): `Backend/travel-recommendation-and-booking-system/Controllers/Client/TourBookingController.cs`
- [Payment](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Controllers/Payment/PaymentController.cs): `Backend/travel-recommendation-and-booking-system/Controllers/Payment/PaymentController.cs`
- [Refunds](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Controllers/RefundController/RefundController.cs): `Backend/travel-recommendation-and-booking-system/Controllers/RefundController/RefundController.cs`
- [Notifications](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Controllers/Noitification/NotificationController.cs): `Backend/travel-recommendation-and-booking-system/Controllers/Noitification/NotificationController.cs`

### Travel domain

- [Tour catalog](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Services/TourService.cs): `Backend/travel-recommendation-and-booking-system/Services/TourService.cs`
- [Tour recommendations](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Services/RecommendationService.cs): `Backend/travel-recommendation-and-booking-system/Services/RecommendationService.cs`
- [Booking service](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Interfaces/ITourBookingService.cs): `Backend/travel-recommendation-and-booking-system/Interfaces/ITourBookingService.cs`
- [Review processing](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Services/ReviewService.cs): `Backend/travel-recommendation-and-booking-system/Services/ReviewService.cs`
- [Account service](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Services/AuthService.cs): `Backend/travel-recommendation-and-booking-system/Services/AuthService.cs`
- [Refund policy](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Helper/RefundPolicyEngine.cs): `Backend/travel-recommendation-and-booking-system/Helper/RefundPolicyEngine.cs`

### Persistence and integrations

- [Travel data model](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/tree/master/Backend/travel-recommendation-and-booking-system/Models): `Backend/travel-recommendation-and-booking-system/Models`
- [EF data context](https://github.com/ledinhthai22/travel-recommendation-and-booking-system/blob/master/Backend/travel-recommendation-and-booking-system/Data/AppDbContext.cs): `Backend/travel-recommendation-and-booking-system/Data/AppDbContext.cs`
- **VNPay gateway**
- **Gemini AI**

### Other components

- **Customer**
- **Admin or staff**

## Connections

- Customer → Auth endpoints: authenticates (evidence: `Backend/travel-recommendation-and-booking-system/Controllers/Auth/AuthController.cs`)
- Auth endpoints → Account service: delegates auth (evidence: `Backend/travel-recommendation-and-booking-system/Controllers/Auth/AuthController.cs`)
- Account service → Travel data model: reads and writes (evidence: `Backend/travel-recommendation-and-booking-system/Services/AuthService.cs`)
- Customer → Customer reviews: submits review (evidence: `Backend/travel-recommendation-and-booking-system/Controllers/Customer/ReviewController.cs`)
- Customer reviews → Review processing: adds review (evidence: `Backend/travel-recommendation-and-booking-system/Controllers/Customer/ReviewController.cs`)
- Admin or staff → Review moderation: moderates reviews (evidence: `Backend/travel-recommendation-and-booking-system/Controllers/Admin/ReviewController.cs`)
- Review moderation → Review processing: delegates review actions (evidence: `Backend/travel-recommendation-and-booking-system/Controllers/Admin/ReviewController.cs`)
- Review processing → Travel data model: queries and saves (evidence: `Backend/travel-recommendation-and-booking-system/Services/ReviewService.cs`)
- Review processing → Gemini AI: requests AI review
- Review processing → Notifications: broadcasts status
- Customer → Tour booking: books a tour
- Tour booking → Booking service: delegates booking
- Customer → Payment: pays booking (evidence: `Backend/travel-recommendation-and-booking-system/Controllers/Payment/PaymentController.cs`)
- Payment → VNPay gateway: creates payment request
- Customer → Refunds: requests refund (evidence: `Backend/travel-recommendation-and-booking-system/Controllers/RefundController/RefundController.cs`)
- Refunds → Refund policy: uses refund policy
- Admin or staff → Admin console: manages catalog
- Admin console → Review manager: opens reviews (evidence: `Frontend/src/Pages/admin/ReviewManager/ReviewManager.jsx`)
- Auth client → Auth endpoints: calls auth API
