# sebharvey/airline-reservation-system architecture

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

- Interactive diagram: https://gitdiagram.com/sebharvey/airline-reservation-system
- Repository: https://github.com/sebharvey/airline-reservation-system

## Overview

Apex Air is a standards-oriented airline retailing system: passengers search flights, select an offer and ancillaries, pay, and manage a resulting order; check-in and loyalty are additional journeys. The Angular web and terminal clients sit in front of retail and operations orchestration and domain microservices. The graph preserves the documented booking, ancillary, payment, order, check-in, and loyalty capabilities. Some links are dashed because their implementation was not sampled; they indicate documented or unverified integration rather than inspected calls.

Main entry points: [`src/Web/src/app/app.routes.ts`](https://github.com/sebharvey/airline-reservation-system/blob/main/src/Web/src/app/app.routes.ts) (Customer website), [`src/Web/src/app/services/booking-state.service.ts`](https://github.com/sebharvey/airline-reservation-system/blob/main/src/Web/src/app/services/booking-state.service.ts) (Booking and basket), [`src/API/Microservices/ReservationSystem.Microservices.Order/Domain/Entities/Order.cs`](https://github.com/sebharvey/airline-reservation-system/blob/main/src/API/Microservices/ReservationSystem.Microservices.Order/Domain/Entities/Order.cs) (Order records), [`src/Terminal/src/app/app.routes.ts`](https://github.com/sebharvey/airline-reservation-system/blob/main/src/Terminal/src/app/app.routes.ts) (Agent terminal)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_channels["User channels"]
  node_web["Customer website<br/>[app.routes.ts]"]
  node_webapi["Retail API client"]
  node_terminal["Agent terminal<br/>[app.routes.ts]"]
  node_terminalauth["Agent authentication<br/>[auth.service.ts]"]
end

subgraph group_journey["Retail journey"]
  node_search["Flight search"]
  node_booking["Booking and basket"]
  node_retrieve["Order retrieval"]
end

subgraph group_domains["Domain services"]
  node_offer["Offer search"]
  node_ancillary["Seats, bags, products"]
  node_payment["Payment authorization"]
  node_order["Order records<br/>[Order.cs]"]
  node_orderstore[("Order repository")]
  node_customer["Customer and loyalty"]
end

subgraph group_operations["Operations and loyalty"]
  node_checkin["Check-in and boarding"]
  node_loyalty["Loyalty orchestration"]
  node_terminalops["Flight operations"]
end

node_passenger(("Passenger"))
node_agent(("Airline agent"))

node_passenger -->|"uses"| node_web
node_web -.->|"requests retail"| node_webapi
node_webapi -.->|"searches flights"| node_search
node_search -->|"searches offers"| node_offer
node_web -.->|"selects itinerary"| node_booking
node_booking -.->|"adds ancillaries"| node_ancillary
node_booking -.->|"authorizes payment"| node_payment
node_booking -.->|"confirms booking"| node_order
node_order -.->|"persists via"| node_orderstore
node_web -.->|"manages booking"| node_retrieve
node_retrieve -.->|"retrieves order"| node_order
node_retrieve -.->|"reads via handler"| node_orderstore
node_passenger -.->|"checks in"| node_checkin
node_agent -->|"uses"| node_terminal
node_terminal -->|"authenticates"| node_terminalauth
node_terminal -.->|"manages flights"| node_terminalops
node_web -.->|"accesses loyalty"| node_loyalty
node_loyalty -.->|"authorizes points"| node_customer
node_customer -.->|"tracks customer orders"| node_order

click node_web "https://github.com/sebharvey/airline-reservation-system/blob/main/src/Web/src/app/app.routes.ts"
click node_webapi "https://github.com/sebharvey/airline-reservation-system/blob/main/src/Web/src/app/services/retail-api.service.ts"
click node_terminal "https://github.com/sebharvey/airline-reservation-system/blob/main/src/Terminal/src/app/app.routes.ts"
click node_terminalauth "https://github.com/sebharvey/airline-reservation-system/blob/main/src/Terminal/src/app/services/auth.service.ts"
click node_search "https://github.com/sebharvey/airline-reservation-system/blob/main/src/API/Orchestration/ReservationSystem.Orchestration.Retail/Application/SearchFlights/SearchFlightsHandler.cs"
click node_offer "https://github.com/sebharvey/airline-reservation-system/blob/main/src/API/Microservices/ReservationSystem.Microservices.Offer/Application/SearchOffers/SearchOffersHandler.cs"
click node_booking "https://github.com/sebharvey/airline-reservation-system/blob/main/src/Web/src/app/services/booking-state.service.ts"
click node_ancillary "https://github.com/sebharvey/airline-reservation-system/tree/main/src/API/Microservices/ReservationSystem.Microservices.Ancillary"
click node_payment "https://github.com/sebharvey/airline-reservation-system/blob/main/src/API/Microservices/ReservationSystem.Microservices.Payment/Application/AuthorisePayment/AuthorisePaymentHandler.cs"
click node_order "https://github.com/sebharvey/airline-reservation-system/blob/main/src/API/Microservices/ReservationSystem.Microservices.Order/Domain/Entities/Order.cs"
click node_orderstore "https://github.com/sebharvey/airline-reservation-system/blob/main/src/API/Microservices/ReservationSystem.Microservices.Order/Domain/Repositories/IOrderRepository.cs"
click node_retrieve "https://github.com/sebharvey/airline-reservation-system/blob/main/src/API/Orchestration/ReservationSystem.Orchestration.Retail/Application/NdcOrderRetrieve/NdcOrderRetrieveHandler.cs"
click node_checkin "https://github.com/sebharvey/airline-reservation-system/tree/main/src/API/Orchestration/ReservationSystem.Orchestration.Operations"
click node_customer "https://github.com/sebharvey/airline-reservation-system/blob/main/src/API/Microservices/ReservationSystem.Microservices.Customer/Application/AuthorisePoints/AuthorisePointsHandler.cs"
click node_loyalty "https://github.com/sebharvey/airline-reservation-system/tree/main/src/API/Orchestration/ReservationSystem.Orchestration.Loyalty"
click node_terminalops "https://github.com/sebharvey/airline-reservation-system/blob/main/src/Terminal/src/app/pages/flight-management/flight-management-detail/flight-management-detail.ts"

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_web,node_webapi,node_terminal,node_terminalauth toneBlue
class node_search,node_booking,node_retrieve toneAmber
class node_offer,node_ancillary,node_payment,node_order,node_orderstore,node_customer toneMint
class node_checkin,node_loyalty,node_terminalops toneRose
class node_passenger,node_agent toneIndigo
```

## Components

### User channels

- [Customer website](https://github.com/sebharvey/airline-reservation-system/blob/main/src/Web/src/app/app.routes.ts): `src/Web/src/app/app.routes.ts`
- [Retail API client](https://github.com/sebharvey/airline-reservation-system/blob/main/src/Web/src/app/services/retail-api.service.ts): `src/Web/src/app/services/retail-api.service.ts`
- [Agent terminal](https://github.com/sebharvey/airline-reservation-system/blob/main/src/Terminal/src/app/app.routes.ts): `src/Terminal/src/app/app.routes.ts`
- [Agent authentication](https://github.com/sebharvey/airline-reservation-system/blob/main/src/Terminal/src/app/services/auth.service.ts): `src/Terminal/src/app/services/auth.service.ts`

### Retail journey

- [Flight search](https://github.com/sebharvey/airline-reservation-system/blob/main/src/API/Orchestration/ReservationSystem.Orchestration.Retail/Application/SearchFlights/SearchFlightsHandler.cs): `src/API/Orchestration/ReservationSystem.Orchestration.Retail/Application/SearchFlights/SearchFlightsHandler.cs`
- [Booking and basket](https://github.com/sebharvey/airline-reservation-system/blob/main/src/Web/src/app/services/booking-state.service.ts): `src/Web/src/app/services/booking-state.service.ts`
- [Order retrieval](https://github.com/sebharvey/airline-reservation-system/blob/main/src/API/Orchestration/ReservationSystem.Orchestration.Retail/Application/NdcOrderRetrieve/NdcOrderRetrieveHandler.cs): `src/API/Orchestration/ReservationSystem.Orchestration.Retail/Application/NdcOrderRetrieve/NdcOrderRetrieveHandler.cs`

### Domain services

- [Offer search](https://github.com/sebharvey/airline-reservation-system/blob/main/src/API/Microservices/ReservationSystem.Microservices.Offer/Application/SearchOffers/SearchOffersHandler.cs): `src/API/Microservices/ReservationSystem.Microservices.Offer/Application/SearchOffers/SearchOffersHandler.cs`
- [Seats, bags, products](https://github.com/sebharvey/airline-reservation-system/tree/main/src/API/Microservices/ReservationSystem.Microservices.Ancillary): `src/API/Microservices/ReservationSystem.Microservices.Ancillary`
- [Payment authorization](https://github.com/sebharvey/airline-reservation-system/blob/main/src/API/Microservices/ReservationSystem.Microservices.Payment/Application/AuthorisePayment/AuthorisePaymentHandler.cs): `src/API/Microservices/ReservationSystem.Microservices.Payment/Application/AuthorisePayment/AuthorisePaymentHandler.cs`
- [Order records](https://github.com/sebharvey/airline-reservation-system/blob/main/src/API/Microservices/ReservationSystem.Microservices.Order/Domain/Entities/Order.cs): `src/API/Microservices/ReservationSystem.Microservices.Order/Domain/Entities/Order.cs`
- [Order repository](https://github.com/sebharvey/airline-reservation-system/blob/main/src/API/Microservices/ReservationSystem.Microservices.Order/Domain/Repositories/IOrderRepository.cs): `src/API/Microservices/ReservationSystem.Microservices.Order/Domain/Repositories/IOrderRepository.cs`
- [Customer and loyalty](https://github.com/sebharvey/airline-reservation-system/blob/main/src/API/Microservices/ReservationSystem.Microservices.Customer/Application/AuthorisePoints/AuthorisePointsHandler.cs): `src/API/Microservices/ReservationSystem.Microservices.Customer/Application/AuthorisePoints/AuthorisePointsHandler.cs`

### Operations and loyalty

- [Check-in and boarding](https://github.com/sebharvey/airline-reservation-system/tree/main/src/API/Orchestration/ReservationSystem.Orchestration.Operations): `src/API/Orchestration/ReservationSystem.Orchestration.Operations`
- [Loyalty orchestration](https://github.com/sebharvey/airline-reservation-system/tree/main/src/API/Orchestration/ReservationSystem.Orchestration.Loyalty): `src/API/Orchestration/ReservationSystem.Orchestration.Loyalty`
- [Flight operations](https://github.com/sebharvey/airline-reservation-system/blob/main/src/Terminal/src/app/pages/flight-management/flight-management-detail/flight-management-detail.ts): `src/Terminal/src/app/pages/flight-management/flight-management-detail/flight-management-detail.ts`

### Other components

- **Passenger**
- **Airline agent**

## Connections

- Passenger → Customer website: uses (evidence: `README.md`)
- Customer website → Retail API client: requests retail (evidence: `src/Web/src/app/services/retail-api.service.ts`)
- Retail API client → Flight search: searches flights
- Flight search → Offer search: searches offers (evidence: `src/API/Orchestration/ReservationSystem.Orchestration.Retail/Application/SearchFlights/SearchFlightsHandler.cs`)
- Customer website → Booking and basket: selects itinerary
- Booking and basket → Seats, bags, products: adds ancillaries (evidence: `README.md`)
- Booking and basket → Payment authorization: authorizes payment (evidence: `README.md`)
- Booking and basket → Order records: confirms booking (evidence: `README.md`)
- Order records → Order repository: persists via (evidence: `src/API/Microservices/ReservationSystem.Microservices.Order/Domain/Repositories/IOrderRepository.cs`)
- Customer website → Order retrieval: manages booking (evidence: `README.md`)
- Order retrieval → Order records: retrieves order (evidence: `src/API/Orchestration/ReservationSystem.Orchestration.Retail/Application/NdcOrderRetrieve/NdcOrderRetrieveHandler.cs`)
- Order retrieval → Order repository: reads via handler
- Passenger → Check-in and boarding: checks in (evidence: `README.md`)
- Airline agent → Agent terminal: uses (evidence: `README.md`)
- Agent terminal → Agent authentication: authenticates (evidence: `src/Terminal/src/app/app.routes.ts`)
- Agent terminal → Flight operations: manages flights (evidence: `src/Terminal/src/app/app.routes.ts`)
- Customer website → Loyalty orchestration: accesses loyalty (evidence: `README.md`)
- Loyalty orchestration → Customer and loyalty: authorizes points
- Customer and loyalty → Order records: tracks customer orders (evidence: `README.md`)
