# hungnq2005/avora architecture

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

- Interactive diagram: https://gitdiagram.com/hungnq2005/avora
- Repository: https://github.com/hungnq2005/avora

## Overview

AVORA is a hotel marketplace and operations platform: travelers discover hotels, book rooms, pay (including group payments), and manage bookings; hotel vendors and administrators manage inventory, finances, policies, and customer operations. The graph shows documented UI routing and sampled service calls. Many feature directories are present in the tree, but their internal wiring was not sampled, so those branches are represented without speculative call chains.

Main entry points: [`avora_project/frontend/src/App.jsx`](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/App.jsx) (Web application), [`avora_project/backend/src/features/review/review.service.js`](https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/features/review/review.service.js) (Review rules), [`avora_project/backend/src/features/bookings/booking.controller.js`](https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/features/bookings/booking.controller.js) (Booking endpoints), [`avora_project/backend/src/features/auth/auth.service.js`](https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/features/auth/auth.service.js) (Authentication service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Traveler experience"]
  node_app["Web application<br/>[App.jsx]"]
  node_home["Home discovery<br/>[HomePage.jsx]"]
  node_hotelsearch["Hotel search"]
  node_hoteldetail["Hotel details"]
  node_account["Account<br/>[MyAccountPage.jsx]"]
  node_favorites["Favorites sync"]
  node_wishlistapi["Wishlist API<br/>[wishlistApi.js]"]
  node_reviews["Review experience<br/>[reviewApi.js]"]
  node_reviewcontroller["Review endpoints"]
  node_reviewservice["Review rules<br/>[review.service.js]"]
  node_reviewapiclient["Review API client<br/>[reviewApi.js]"]
end

subgraph group_booking["Booking and payments"]
  node_bookingui["Booking flow<br/>[BookingPage.jsx]"]
  node_bookingcontroller["Booking endpoints"]
  node_bookingservice["Booking rules<br/>[booking.service.js]"]
  node_paymentui["Payment screens"]
end

subgraph group_operations["Hotel operations"]
  node_hotelmanagement["Hotel management"]
  node_imagepanel["Hotel images"]
  node_hotelservice["Hotel management API"]
  node_vendorbookings["Vendor bookings"]
  node_vendorfinance["Vendor finance"]
end

subgraph group_platform["Identity and platform"]
  node_authcontext["Session context<br/>[AuthContext.jsx]"]
  node_authserviceui["Authentication client<br/>[authService.js]"]
  node_authservice["Authentication service<br/>[auth.service.js]"]
  node_email["Email delivery<br/>[email.service.js]"]
  node_supabase[("Supabase database<br/>[supabaseClient.js]")]
  node_audit["Audit logging<br/>[auditLogger.js]"]
end

node_traveler(("Traveler"))

node_traveler -->|"uses"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_hotelsearch
node_app -->|"routes to"| node_hoteldetail
node_app -->|"routes to"| node_account
node_app -->|"routes to"| node_paymentui
node_app -->|"routes to"| node_reviews
node_favorites -->|"syncs favorites"| node_wishlistapi
node_imagepanel -->|"uploads and edits"| node_hotelservice
node_authcontext -->|"uses"| node_authserviceui
node_bookingcontroller -->|"invokes"| node_bookingservice
node_bookingcontroller -->|"records changes"| node_audit
node_reviewcontroller -->|"invokes"| node_reviewservice
node_reviewservice -->|"reads and writes"| node_supabase
node_reviewservice -->|"sends mail"| node_email
node_authservice -->|"reads and writes"| node_supabase
node_authservice -->|"sends mail"| node_email

click node_app "https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/App.jsx"
click node_home "https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/home/HomePage.jsx"
click node_hotelsearch "https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/hotels/HotelSearchPage.jsx"
click node_hoteldetail "https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/hotels/HotelDetailPage.jsx"
click node_account "https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/account/pages/MyAccountPage.jsx"
click node_favorites "https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/utils/favoritesStorage.js"
click node_wishlistapi "https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/services/wishlistApi.js"
click node_bookingui "https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/bookings/pages/BookingPage.jsx"
click node_bookingcontroller "https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/features/bookings/booking.controller.js"
click node_bookingservice "https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/features/bookings/booking.service.js"
click node_paymentui "https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/payments/pages/PaymentQRScreen.jsx"
click node_reviews "https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/services/reviewApi.js"
click node_reviewcontroller "https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/features/review/review.controller.js"
click node_reviewservice "https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/features/review/review.service.js"
click node_hotelmanagement "https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/hotel_management/pages/hotelDetailPage.jsx"
click node_imagepanel "https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/hotel_management/components/hotelImageManager.jsx"
click node_hotelservice "https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/services/hotelManagementService.js"
click node_vendorbookings "https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/vendor_bookings/pages/VendorBookingPage.jsx"
click node_vendorfinance "https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/venueWallet/pages/VenueWalletPage.jsx"
click node_authcontext "https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/context/AuthContext.jsx"
click node_authserviceui "https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/services/authService.js"
click node_authservice "https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/features/auth/auth.service.js"
click node_email "https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/common/services/email/email.service.js"
click node_supabase "https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/config/supabaseClient.js"
click node_audit "https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/utils/auditLogger.js"
click node_reviewapiclient "https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/services/reviewApi.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,node_home,node_hotelsearch,node_hoteldetail,node_account,node_favorites,node_wishlistapi,node_reviews,node_reviewcontroller,node_reviewservice,node_reviewapiclient toneBlue
class node_bookingui,node_bookingcontroller,node_bookingservice,node_paymentui toneAmber
class node_hotelmanagement,node_imagepanel,node_hotelservice,node_vendorbookings,node_vendorfinance toneMint
class node_authcontext,node_authserviceui,node_authservice,node_email,node_supabase,node_audit toneRose
class node_traveler toneIndigo
```

## Components

### Traveler experience

- [Web application](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/App.jsx): `avora_project/frontend/src/App.jsx`
- [Home discovery](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/home/HomePage.jsx): `avora_project/frontend/src/features/home/HomePage.jsx`
- [Hotel search](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/hotels/HotelSearchPage.jsx): `avora_project/frontend/src/features/hotels/HotelSearchPage.jsx`
- [Hotel details](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/hotels/HotelDetailPage.jsx): `avora_project/frontend/src/features/hotels/HotelDetailPage.jsx`
- [Account](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/account/pages/MyAccountPage.jsx): `avora_project/frontend/src/features/account/pages/MyAccountPage.jsx`
- [Favorites sync](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/utils/favoritesStorage.js): `avora_project/frontend/src/utils/favoritesStorage.js`
- [Wishlist API](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/services/wishlistApi.js): `avora_project/frontend/src/services/wishlistApi.js`
- [Review experience](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/services/reviewApi.js): `avora_project/frontend/src/services/reviewApi.js`
- [Review endpoints](https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/features/review/review.controller.js): `avora_project/backend/src/features/review/review.controller.js`
- [Review rules](https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/features/review/review.service.js): `avora_project/backend/src/features/review/review.service.js`
- [Review API client](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/services/reviewApi.js): `avora_project/frontend/src/services/reviewApi.js`

### Booking and payments

- [Booking flow](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/bookings/pages/BookingPage.jsx): `avora_project/frontend/src/features/bookings/pages/BookingPage.jsx`
- [Booking endpoints](https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/features/bookings/booking.controller.js): `avora_project/backend/src/features/bookings/booking.controller.js`
- [Booking rules](https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/features/bookings/booking.service.js): `avora_project/backend/src/features/bookings/booking.service.js`
- [Payment screens](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/payments/pages/PaymentQRScreen.jsx): `avora_project/frontend/src/features/payments/pages/PaymentQRScreen.jsx`

### Hotel operations

- [Hotel management](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/hotel_management/pages/hotelDetailPage.jsx): `avora_project/frontend/src/features/hotel_management/pages/hotelDetailPage.jsx`
- [Hotel images](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/hotel_management/components/hotelImageManager.jsx): `avora_project/frontend/src/features/hotel_management/components/hotelImageManager.jsx`
- [Hotel management API](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/services/hotelManagementService.js): `avora_project/frontend/src/services/hotelManagementService.js`
- [Vendor bookings](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/vendor_bookings/pages/VendorBookingPage.jsx): `avora_project/frontend/src/features/vendor_bookings/pages/VendorBookingPage.jsx`
- [Vendor finance](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/features/venueWallet/pages/VenueWalletPage.jsx): `avora_project/frontend/src/features/venueWallet/pages/VenueWalletPage.jsx`

### Identity and platform

- [Session context](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/context/AuthContext.jsx): `avora_project/frontend/src/context/AuthContext.jsx`
- [Authentication client](https://github.com/hungnq2005/avora/blob/main/avora_project/frontend/src/services/authService.js): `avora_project/frontend/src/services/authService.js`
- [Authentication service](https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/features/auth/auth.service.js): `avora_project/backend/src/features/auth/auth.service.js`
- [Email delivery](https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/common/services/email/email.service.js): `avora_project/backend/src/common/services/email/email.service.js`
- [Supabase database](https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/config/supabaseClient.js): `avora_project/backend/src/config/supabaseClient.js`
- [Audit logging](https://github.com/hungnq2005/avora/blob/main/avora_project/backend/src/utils/auditLogger.js): `avora_project/backend/src/utils/auditLogger.js`

### Other components

- **Traveler**

## Connections

- Traveler → Web application: uses (evidence: `avora_project/frontend/src/App.jsx`)
- Web application → Home discovery: routes to (evidence: `avora_project/frontend/src/App.jsx`)
- Web application → Hotel search: routes to (evidence: `avora_project/frontend/src/App.jsx`)
- Web application → Hotel details: routes to (evidence: `avora_project/frontend/src/App.jsx`)
- Web application → Account: routes to (evidence: `avora_project/frontend/src/App.jsx`)
- Web application → Payment screens: routes to (evidence: `avora_project/frontend/src/App.jsx`)
- Web application → Review experience: routes to (evidence: `avora_project/frontend/src/App.jsx`)
- Favorites sync → Wishlist API: syncs favorites (evidence: `avora_project/frontend/src/utils/favoritesStorage.js`)
- Hotel images → Hotel management API: uploads and edits (evidence: `avora_project/frontend/src/features/hotel_management/components/hotelImageManager.jsx`)
- Session context → Authentication client: uses (evidence: `avora_project/frontend/src/context/AuthContext.jsx`)
- Booking endpoints → Booking rules: invokes (evidence: `avora_project/backend/src/features/bookings/booking.controller.js`)
- Booking endpoints → Audit logging: records changes (evidence: `avora_project/backend/src/features/bookings/booking.controller.js`)
- Review endpoints → Review rules: invokes (evidence: `avora_project/backend/src/features/review/review.controller.js`)
- Review rules → Supabase database: reads and writes (evidence: `avora_project/backend/src/features/review/review.service.js`)
- Review rules → Email delivery: sends mail (evidence: `avora_project/backend/src/features/review/review.service.js`)
- Authentication service → Supabase database: reads and writes (evidence: `avora_project/backend/src/features/auth/auth.service.js`)
- Authentication service → Email delivery: sends mail (evidence: `avora_project/backend/src/features/auth/auth.service.js`)
