# obada-yahya/travel-and-accommodation-booking-platform architecture

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

- Interactive diagram: https://gitdiagram.com/obada-yahya/travel-and-accommodation-booking-platform
- Repository: https://github.com/obada-yahya/travel-and-accommodation-booking-platform
- Video tour (about a minute): https://gitdiagram.com/obada-yahya/travel-and-accommodation-booking-platform/video

## Overview

TAABP is a hotel and accommodation booking API. Guests browse destinations and hotels, search availability, reserve rooms, manage bookings, and request invoices; authenticated guests can also review stays and see recently visited hotels. Administrative endpoints manage hotels, rooms, cities, amenities, and discounts. The architecture separates HTTP controllers, MediatR application handlers, domain repository contracts, and infrastructure persistence and integrations. The README documents image management and email notifications, though their complete request paths are not visible in the sampled source.

Main entry points: [`TAABP.API/Controllers`](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/TAABP.API/Controllers) (HTTP controllers), [`Domain/Common/Interfaces`](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Domain/Common/Interfaces) (Repository contracts), [`Application/Handlers/BookingHandlers`](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers/BookingHandlers) (Booking workflows), [`Application/Handlers/HotelHandlers`](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers/HotelHandlers) (Hotel discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_http["API surface"]
  node_controllers["HTTP controllers<br/>[Controllers]"]
  node_auth["Authentication"]
end

subgraph group_app["Application workflows"]
  node_booking["Booking workflows"]
  node_hotel["Hotel discovery"]
  node_city["City discovery"]
  node_guestservices["Guest services"]
  node_reviews["Review workflows"]
  node_admin["Administration"]
  node_discounts["Discount workflows"]
  node_amenities["Amenity workflows"]
  node_roomtypes["Room categories"]
  node_appservices["Application services"]
end

subgraph group_domain["Domain contracts"]
  node_repocontracts["Repository contracts"]
  node_entities["Booking domain"]
end

subgraph group_infra["Infrastructure"]
  node_dbcontext[("Application database")]
  node_repositories["Repository implementations"]
  node_image["Image storage"]
  node_email["Email service"]
  node_pdf["Invoice PDF"]
end

node_guest(("Guest or admin"))
node_firebase(("Firebase storage"))
node_emailprovider(("Email provider"))

node_guest -->|"uses endpoints"| node_controllers
node_controllers -->|"authenticates"| node_auth
node_controllers -->|"dispatches requests"| node_booking
node_controllers -->|"dispatches requests"| node_hotel
node_controllers -->|"dispatches requests"| node_city
node_controllers -->|"dispatches requests"| node_guestservices
node_controllers -->|"dispatches requests"| node_reviews
node_controllers -->|"dispatches requests"| node_admin
node_controllers -->|"dispatches requests"| node_discounts
node_controllers -->|"dispatches requests"| node_amenities
node_controllers -->|"dispatches requests"| node_roomtypes
node_booking -->|"calls"| node_repocontracts
node_hotel -->|"calls"| node_repocontracts
node_city -->|"calls"| node_repocontracts
node_guestservices -->|"calls"| node_repocontracts
node_reviews -->|"calls"| node_repocontracts
node_discounts -->|"calls"| node_repocontracts
node_amenities -->|"calls"| node_repocontracts
node_roomtypes -->|"calls"| node_repocontracts
node_repocontracts -->|"implemented by"| node_repositories
node_repositories -->|"persists data"| node_dbcontext
node_booking -.->|"generates invoices"| node_pdf
node_image -.->|"stores images"| node_firebase
node_email -.->|"sends messages"| node_emailprovider

click node_controllers "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/TAABP.API/Controllers"
click node_auth "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/blob/main/TAABP.API/Controllers/AuthenticationController.cs"
click node_booking "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers/BookingHandlers"
click node_hotel "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers/HotelHandlers"
click node_city "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers/CityHandlers"
click node_guestservices "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers/UserHandlers"
click node_reviews "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers/ReviewHandlers"
click node_admin "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers"
click node_discounts "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers/DiscountHandlers"
click node_amenities "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers/RoomAmenityHandlers"
click node_roomtypes "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers/RoomCategoryHandlers"
click node_appservices "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/blob/main/Application/ServiceCollectionExtensions.cs"
click node_repocontracts "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Domain/Common/Interfaces"
click node_entities "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Domain/Entities"
click node_dbcontext "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/blob/main/Infrastructure/Common/Persistence/ApplicationDbContext.cs"
click node_repositories "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Infrastructure/Common/Persistence/Repositories"
click node_image "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Infrastructure/ImageStorage"
click node_email "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Infrastructure/Email"
click node_pdf "https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Infrastructure/Pdf"

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_controllers,node_auth toneBlue
class node_booking,node_hotel,node_city,node_guestservices,node_reviews,node_admin,node_discounts,node_amenities,node_roomtypes,node_appservices,node_firebase toneAmber
class node_repocontracts,node_entities toneMint
class node_dbcontext,node_repositories,node_image,node_email,node_pdf toneRose
class node_guest,node_emailprovider toneIndigo
```

## Components

### API surface

- [HTTP controllers](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/TAABP.API/Controllers): `TAABP.API/Controllers`
- [Authentication](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/blob/main/TAABP.API/Controllers/AuthenticationController.cs): `TAABP.API/Controllers/AuthenticationController.cs`

### Application workflows

- [Booking workflows](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers/BookingHandlers): `Application/Handlers/BookingHandlers`
- [Hotel discovery](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers/HotelHandlers): `Application/Handlers/HotelHandlers`
- [City discovery](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers/CityHandlers): `Application/Handlers/CityHandlers`
- [Guest services](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers/UserHandlers): `Application/Handlers/UserHandlers`
- [Review workflows](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers/ReviewHandlers): `Application/Handlers/ReviewHandlers`
- [Administration](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers): `Application/Handlers`
- [Discount workflows](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers/DiscountHandlers): `Application/Handlers/DiscountHandlers`
- [Amenity workflows](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers/RoomAmenityHandlers): `Application/Handlers/RoomAmenityHandlers`
- [Room categories](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Application/Handlers/RoomCategoryHandlers): `Application/Handlers/RoomCategoryHandlers`
- [Application services](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/blob/main/Application/ServiceCollectionExtensions.cs): `Application/ServiceCollectionExtensions.cs`

### Domain contracts

- [Repository contracts](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Domain/Common/Interfaces): `Domain/Common/Interfaces`
- [Booking domain](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Domain/Entities): `Domain/Entities`

### Infrastructure

- [Application database](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/blob/main/Infrastructure/Common/Persistence/ApplicationDbContext.cs): `Infrastructure/Common/Persistence/ApplicationDbContext.cs`
- [Repository implementations](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Infrastructure/Common/Persistence/Repositories): `Infrastructure/Common/Persistence/Repositories`
- [Image storage](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Infrastructure/ImageStorage): `Infrastructure/ImageStorage`
- [Email service](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Infrastructure/Email): `Infrastructure/Email`
- [Invoice PDF](https://github.com/obada-yahya/travel-and-accommodation-booking-platform/tree/main/Infrastructure/Pdf): `Infrastructure/Pdf`

### Other components

- **Guest or admin**
- **Firebase storage**
- **Email provider**

## Connections

- Guest or admin → HTTP controllers: uses endpoints
- HTTP controllers → Authentication: authenticates
- HTTP controllers → Booking workflows: dispatches requests
- HTTP controllers → Hotel discovery: dispatches requests
- HTTP controllers → City discovery: dispatches requests
- HTTP controllers → Guest services: dispatches requests
- HTTP controllers → Review workflows: dispatches requests
- HTTP controllers → Administration: dispatches requests
- HTTP controllers → Discount workflows: dispatches requests
- HTTP controllers → Amenity workflows: dispatches requests
- HTTP controllers → Room categories: dispatches requests
- Booking workflows → Repository contracts: calls
- Hotel discovery → Repository contracts: calls
- City discovery → Repository contracts: calls
- Guest services → Repository contracts: calls
- Review workflows → Repository contracts: calls
- Discount workflows → Repository contracts: calls
- Amenity workflows → Repository contracts: calls
- Room categories → Repository contracts: calls
- Repository contracts → Repository implementations: implemented by
- Repository implementations → Application database: persists data
- Booking workflows → Invoice PDF: generates invoices
- Image storage → Firebase storage: stores images
- Email service → Email provider: sends messages
