# arsenyop/bookingservice architecture

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

- Interactive diagram: https://gitdiagram.com/arsenyop/bookingservice
- Repository: https://github.com/arsenyop/bookingservice

## Overview

BookingService is a REST API for accommodation listings, rooms, reservations, amenities, and reviews. Users authenticate, discover listings and rooms, check availability, and create or manage bookings; they can also review properties. The API delegates business operations to application use cases, which apply domain rules and use infrastructure persistence and services. Documented extensions include AI-assisted search/chat, weather lookup, email notifications, caching, and reliable outbox delivery. Edges reflect README-described capabilities and the sampled review flow; unsampled subsystem wiring is not asserted.

Main entry points: [`src/BookingService.API/Endpoints`](https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.API/Endpoints) (REST endpoints), [`src/BookingService.Application/UseCases/Reviews`](https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.Application/UseCases/Reviews) (Review operations), [`src/BookingService.Application/UseCases/Bookings`](https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.Application/UseCases/Bookings) (Booking operations), [`src/BookingService.Infrastructure/Services/EmailService.cs`](https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Infrastructure/Services/EmailService.cs) (Email service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API"]
  node_api["REST endpoints<br/>[Endpoints]"]
end

subgraph group_application["Application"]
  node_auth["Authentication<br/>[Users]"]
  node_property["Listings and rooms<br/>[Listing]"]
  node_booking["Booking operations<br/>[Bookings]"]
  node_amenities["Amenities<br/>[Amenities]"]
  node_reviews["Review operations<br/>[Reviews]"]
  node_chat["AI chat search<br/>[Chat]"]
  node_weather["Weather lookup<br/>[OpenWeather]"]
end

subgraph group_domain["Domain"]
  node_review_domain["Review rules<br/>[Review.cs]"]
  node_booking_domain["Booking rules<br/>[Booking.cs]"]
  node_domain_entities["Core entities<br/>[Entities]"]
end

subgraph group_infrastructure["Infrastructure"]
  node_data[("Relational persistence<br/>[AppDbContext.cs]")]
  node_queries["Review queries<br/>[ReviewQueries.cs]"]
  node_cache["Cache service<br/>[CacheService.cs]"]
  node_email["Email service<br/>[EmailService.cs]"]
  node_outbox["Outbox processing"]
  node_vectors["Vector search<br/>[QdrantService.cs]"]
  node_weather_service["Weather provider"]
end

subgraph group_integrations["External services"]
  node_qdrant[("Qdrant")]
  node_smtp["Email provider"]
  node_weather_api["Weather API"]
end

node_guest(("Guest or user"))

node_guest -->|"sends requests"| node_api
node_api -->|"routes auth"| node_auth
node_api -->|"routes property"| node_property
node_api -->|"routes bookings"| node_booking
node_api -->|"routes amenities"| node_amenities
node_api -->|"routes reviews"| node_reviews
node_api -->|"routes chat"| node_chat
node_api -->|"routes weather"| node_weather
node_reviews -->|"creates reviews"| node_review_domain
node_reviews -->|"checks bookings"| node_queries
node_reviews -->|"saves changes"| node_data
node_reviews -->|"invalidates cache"| node_cache
node_booking -.->|"applies rules"| node_booking_domain
node_property -.->|"manages entities"| node_domain_entities
node_queries -->|"queries storage"| node_data
node_chat -.->|"uses semantic search"| node_vectors
node_vectors -.->|"searches vectors"| node_qdrant
node_booking -.->|"sends notifications"| node_email
node_email -.->|"delivers email"| node_smtp
node_outbox -.->|"dispatches messages"| node_email
node_weather -.->|"requests weather"| node_weather_service
node_weather_service -.->|"fetches forecasts"| node_weather_api

click node_api "https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.API/Endpoints"
click node_auth "https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.Application/UseCases/Users"
click node_property "https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.Application/UseCases/Listing"
click node_booking "https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.Application/UseCases/Bookings"
click node_amenities "https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.Application/UseCases/Amenities"
click node_reviews "https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.Application/UseCases/Reviews"
click node_chat "https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.Application/UseCases/Chat"
click node_weather "https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.Application/UseCases/OpenWeather"
click node_review_domain "https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Domain/Entities/Review.cs"
click node_booking_domain "https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Domain/Entities/Booking.cs"
click node_domain_entities "https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.Domain/Entities"
click node_data "https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Infrastructure/Data/AppDbContext.cs"
click node_queries "https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Infrastructure/Queries/ReviewQueries.cs"
click node_cache "https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Infrastructure/Services/CacheService.cs"
click node_email "https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Infrastructure/Services/EmailService.cs"
click node_outbox "https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Infrastructure/BackgroundJobs/ProcessOutboxMessageJob.cs"
click node_vectors "https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Infrastructure/Services/QdrantService.cs"
click node_weather_service "https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Infrastructure/Services/OpenWeatherService.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_api,node_guest toneBlue
class node_auth,node_property,node_booking,node_amenities,node_reviews,node_chat,node_weather toneAmber
class node_review_domain,node_booking_domain,node_domain_entities toneMint
class node_data,node_queries,node_cache,node_email,node_outbox,node_vectors,node_weather_service toneRose
class node_qdrant,node_smtp,node_weather_api toneIndigo
```

## Components

### API

- [REST endpoints](https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.API/Endpoints): `src/BookingService.API/Endpoints`

### Application

- [Authentication](https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.Application/UseCases/Users): `src/BookingService.Application/UseCases/Users`
- [Listings and rooms](https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.Application/UseCases/Listing): `src/BookingService.Application/UseCases/Listing`
- [Booking operations](https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.Application/UseCases/Bookings): `src/BookingService.Application/UseCases/Bookings`
- [Amenities](https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.Application/UseCases/Amenities): `src/BookingService.Application/UseCases/Amenities`
- [Review operations](https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.Application/UseCases/Reviews): `src/BookingService.Application/UseCases/Reviews`
- [AI chat search](https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.Application/UseCases/Chat): `src/BookingService.Application/UseCases/Chat`
- [Weather lookup](https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.Application/UseCases/OpenWeather): `src/BookingService.Application/UseCases/OpenWeather`

### Domain

- [Review rules](https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Domain/Entities/Review.cs): `src/BookingService.Domain/Entities/Review.cs`
- [Booking rules](https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Domain/Entities/Booking.cs): `src/BookingService.Domain/Entities/Booking.cs`
- [Core entities](https://github.com/arsenyop/bookingservice/tree/master/src/BookingService.Domain/Entities): `src/BookingService.Domain/Entities`

### Infrastructure

- [Relational persistence](https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Infrastructure/Data/AppDbContext.cs): `src/BookingService.Infrastructure/Data/AppDbContext.cs`
- [Review queries](https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Infrastructure/Queries/ReviewQueries.cs): `src/BookingService.Infrastructure/Queries/ReviewQueries.cs`
- [Cache service](https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Infrastructure/Services/CacheService.cs): `src/BookingService.Infrastructure/Services/CacheService.cs`
- [Email service](https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Infrastructure/Services/EmailService.cs): `src/BookingService.Infrastructure/Services/EmailService.cs`
- [Outbox processing](https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Infrastructure/BackgroundJobs/ProcessOutboxMessageJob.cs): `src/BookingService.Infrastructure/BackgroundJobs/ProcessOutboxMessageJob.cs`
- [Vector search](https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Infrastructure/Services/QdrantService.cs): `src/BookingService.Infrastructure/Services/QdrantService.cs`
- [Weather provider](https://github.com/arsenyop/bookingservice/blob/master/src/BookingService.Infrastructure/Services/OpenWeatherService.cs): `src/BookingService.Infrastructure/Services/OpenWeatherService.cs`

### External services

- **Qdrant**
- **Email provider**
- **Weather API**

### Other components

- **Guest or user**

## Connections

- Guest or user → REST endpoints: sends requests
- REST endpoints → Authentication: routes auth
- REST endpoints → Listings and rooms: routes property
- REST endpoints → Booking operations: routes bookings
- REST endpoints → Amenities: routes amenities
- REST endpoints → Review operations: routes reviews (evidence: `src/BookingService.API/Endpoints/ReviewEndpoints.cs`)
- REST endpoints → AI chat search: routes chat
- REST endpoints → Weather lookup: routes weather
- Review operations → Review rules: creates reviews (evidence: `src/BookingService.Application/UseCases/Reviews/CreateReview/CreateReviewHandler.cs`)
- Review operations → Review queries: checks bookings (evidence: `src/BookingService.Application/UseCases/Reviews/CreateReview/CreateReviewHandler.cs`)
- Review operations → Relational persistence: saves changes (evidence: `src/BookingService.Application/UseCases/Reviews/CreateReview/CreateReviewHandler.cs`)
- Review operations → Cache service: invalidates cache (evidence: `src/BookingService.Application/UseCases/Reviews/CreateReview/CreateReviewHandler.cs`)
- Booking operations → Booking rules: applies rules
- Listings and rooms → Core entities: manages entities
- Review queries → Relational persistence: queries storage (evidence: `src/BookingService.Infrastructure/Queries/ReviewQueries.cs`)
- AI chat search → Vector search: uses semantic search
- Vector search → Qdrant: searches vectors
- Booking operations → Email service: sends notifications
- Email service → Email provider: delivers email
- Outbox processing → Email service: dispatches messages
- Weather lookup → Weather provider: requests weather
- Weather provider → Weather API: fetches forecasts
