# 7788551/travelagency architecture

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

- Interactive diagram: https://gitdiagram.com/7788551/travelagency
- Repository: https://github.com/7788551/travelagency

## Overview

TravelAgency is an ASP.NET travel-agency application for accounts and staff administration, destination and package management, and customer enquiries. The domain workflow links destinations to packages, then allows customers to enquire about packages and staff to manage enquiry status. API controllers, application services, repositories, and SQL-backed persistence form the clearest internal layers. The source index and excerpts support the service/repository interactions; several controller implementations and the README are unavailable, so their downstream links are omitted where unverified.

Main entry points: [`TravelAgency/Services/PackageService.cs`](https://github.com/7788551/travelagency/blob/master/TravelAgency/Services/PackageService.cs) (Package Service), [`TravelAgency/Services/AccountService.cs`](https://github.com/7788551/travelagency/blob/master/TravelAgency/Services/AccountService.cs) (Account Service), [`TravelAgency/Repositories/PackageRepository.cs`](https://github.com/7788551/travelagency/blob/master/TravelAgency/Repositories/PackageRepository.cs) (Package Repository), [`TravelAgency/Services/CustomerService.cs`](https://github.com/7788551/travelagency/blob/master/TravelAgency/Services/CustomerService.cs) (Enquiry Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["Web Interfaces"]
  node_account_api["Account API"]
  node_destination_api["Destination API"]
  node_package_api["Package API"]
  node_staff_api["Staff API"]
  node_customer_api["Customer API"]
  node_mvc_pages["MVC Pages<br/>[HomeController.cs]"]
end

subgraph group_domain["Travel Operations"]
  node_destination_service["Destination Service"]
  node_package_service["Package Service<br/>[PackageService.cs]"]
  node_customer_service["Enquiry Service<br/>[CustomerService.cs]"]
end

subgraph group_accounts["Accounts and Staff"]
  node_account_service["Account Service<br/>[AccountService.cs]"]
  node_staff_pages["Staff Pages<br/>[StaffController.cs]"]
  node_account_repo["User Repository<br/>[UserRepository.cs]"]
end

subgraph group_data["Persistence"]
  node_destination_repo["Destination Repository"]
  node_package_repo["Package Repository"]
  node_customer_repo["Enquiry Repository"]
end

node_visitor(("Visitor"))
node_customer(("Customer"))
node_staff(("Staff"))
node_sql[("SQL Server")]

node_visitor -->|"register or login"| node_account_api
node_customer -.->|"submit enquiry"| node_customer_api
node_staff -->|"manage staff"| node_staff_api
node_staff -->|"manage destinations"| node_destination_api
node_staff -->|"manage packages"| node_package_api
node_visitor -.->|"browse pages"| node_mvc_pages
node_destination_api -->|"uses service"| node_destination_service
node_package_api -->|"uses service"| node_package_service
node_staff_api -->|"uses service"| node_account_service
node_account_api -->|"uses service"| node_account_service
node_package_service -->|"checks destination"| node_destination_repo
node_package_service -->|"reads and writes"| node_package_repo
node_customer_service -->|"checks package"| node_package_repo
node_customer_service -->|"stores enquiries"| node_customer_repo
node_destination_service -->|"delegates storage"| node_destination_repo
node_account_service -->|"delegates accounts"| node_account_repo
node_package_repo -->|"queries packages"| node_sql

click node_account_api "https://github.com/7788551/travelagency/blob/master/TravelAgency/ApiController/AccountApiController.cs"
click node_destination_api "https://github.com/7788551/travelagency/blob/master/TravelAgency/ApiController/DestinationApiController.cs"
click node_package_api "https://github.com/7788551/travelagency/blob/master/TravelAgency/ApiController/PackageApiController.cs"
click node_staff_api "https://github.com/7788551/travelagency/blob/master/TravelAgency/ApiController/StaffApiController.cs"
click node_customer_api "https://github.com/7788551/travelagency/blob/master/TravelAgency/ApiController/CustomerApiController.cs"
click node_mvc_pages "https://github.com/7788551/travelagency/blob/master/TravelAgency/Controllers/HomeController.cs"
click node_destination_service "https://github.com/7788551/travelagency/blob/master/TravelAgency/Services/DestinationService.cs"
click node_package_service "https://github.com/7788551/travelagency/blob/master/TravelAgency/Services/PackageService.cs"
click node_customer_service "https://github.com/7788551/travelagency/blob/master/TravelAgency/Services/CustomerService.cs"
click node_destination_repo "https://github.com/7788551/travelagency/blob/master/TravelAgency/Repositories/DestinationRepository.cs"
click node_package_repo "https://github.com/7788551/travelagency/blob/master/TravelAgency/Repositories/PackageRepository.cs"
click node_customer_repo "https://github.com/7788551/travelagency/blob/master/TravelAgency/Repositories/CustomerRepository.cs"
click node_account_service "https://github.com/7788551/travelagency/blob/master/TravelAgency/Services/AccountService.cs"
click node_staff_pages "https://github.com/7788551/travelagency/blob/master/TravelAgency/Controllers/StaffController.cs"
click node_account_repo "https://github.com/7788551/travelagency/blob/master/TravelAgency/Repositories/UserRepository.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_account_api,node_destination_api,node_package_api,node_staff_api,node_customer_api,node_mvc_pages toneBlue
class node_destination_service,node_package_service,node_customer_service,node_sql toneAmber
class node_account_service,node_staff_pages,node_account_repo toneMint
class node_destination_repo,node_package_repo,node_customer_repo toneRose
class node_visitor,node_customer,node_staff toneIndigo
```

## Components

### Web Interfaces

- [Account API](https://github.com/7788551/travelagency/blob/master/TravelAgency/ApiController/AccountApiController.cs): `TravelAgency/ApiController/AccountApiController.cs`
- [Destination API](https://github.com/7788551/travelagency/blob/master/TravelAgency/ApiController/DestinationApiController.cs): `TravelAgency/ApiController/DestinationApiController.cs`
- [Package API](https://github.com/7788551/travelagency/blob/master/TravelAgency/ApiController/PackageApiController.cs): `TravelAgency/ApiController/PackageApiController.cs`
- [Staff API](https://github.com/7788551/travelagency/blob/master/TravelAgency/ApiController/StaffApiController.cs): `TravelAgency/ApiController/StaffApiController.cs`
- [Customer API](https://github.com/7788551/travelagency/blob/master/TravelAgency/ApiController/CustomerApiController.cs): `TravelAgency/ApiController/CustomerApiController.cs`
- [MVC Pages](https://github.com/7788551/travelagency/blob/master/TravelAgency/Controllers/HomeController.cs): `TravelAgency/Controllers/HomeController.cs`

### Travel Operations

- [Destination Service](https://github.com/7788551/travelagency/blob/master/TravelAgency/Services/DestinationService.cs): `TravelAgency/Services/DestinationService.cs`
- [Package Service](https://github.com/7788551/travelagency/blob/master/TravelAgency/Services/PackageService.cs): `TravelAgency/Services/PackageService.cs`
- [Enquiry Service](https://github.com/7788551/travelagency/blob/master/TravelAgency/Services/CustomerService.cs): `TravelAgency/Services/CustomerService.cs`

### Accounts and Staff

- [Account Service](https://github.com/7788551/travelagency/blob/master/TravelAgency/Services/AccountService.cs): `TravelAgency/Services/AccountService.cs`
- [Staff Pages](https://github.com/7788551/travelagency/blob/master/TravelAgency/Controllers/StaffController.cs): `TravelAgency/Controllers/StaffController.cs`
- [User Repository](https://github.com/7788551/travelagency/blob/master/TravelAgency/Repositories/UserRepository.cs): `TravelAgency/Repositories/UserRepository.cs`

### Persistence

- [Destination Repository](https://github.com/7788551/travelagency/blob/master/TravelAgency/Repositories/DestinationRepository.cs): `TravelAgency/Repositories/DestinationRepository.cs`
- [Package Repository](https://github.com/7788551/travelagency/blob/master/TravelAgency/Repositories/PackageRepository.cs): `TravelAgency/Repositories/PackageRepository.cs`
- [Enquiry Repository](https://github.com/7788551/travelagency/blob/master/TravelAgency/Repositories/CustomerRepository.cs): `TravelAgency/Repositories/CustomerRepository.cs`

### Other components

- **Visitor**
- **Customer**
- **Staff**
- **SQL Server**

## Connections

- Visitor → Account API: register or login (evidence: `TravelAgency/ApiController/AccountApiController.cs`)
- Customer → Customer API: submit enquiry
- Staff → Staff API: manage staff (evidence: `TravelAgency/ApiController/StaffApiController.cs`)
- Staff → Destination API: manage destinations (evidence: `TravelAgency/ApiController/DestinationApiController.cs`)
- Staff → Package API: manage packages (evidence: `TravelAgency/ApiController/PackageApiController.cs`)
- Visitor → MVC Pages: browse pages
- Destination API → Destination Service: uses service (evidence: `TravelAgency/ApiController/DestinationApiController.cs`)
- Package API → Package Service: uses service (evidence: `TravelAgency/ApiController/PackageApiController.cs`)
- Staff API → Account Service: uses service (evidence: `TravelAgency/ApiController/StaffApiController.cs`)
- Account API → Account Service: uses service (evidence: `TravelAgency/ApiController/AccountApiController.cs`)
- Package Service → Destination Repository: checks destination (evidence: `TravelAgency/Services/PackageService.cs`)
- Package Service → Package Repository: reads and writes (evidence: `TravelAgency/Services/PackageService.cs`)
- Enquiry Service → Package Repository: checks package (evidence: `TravelAgency/Services/CustomerService.cs`)
- Enquiry Service → Enquiry Repository: stores enquiries (evidence: `TravelAgency/Services/CustomerService.cs`)
- Destination Service → Destination Repository: delegates storage (evidence: `TravelAgency/Services/DestinationService.cs`)
- Account Service → User Repository: delegates accounts (evidence: `TravelAgency/Services/AccountService.cs`)
- Package Repository → SQL Server: queries packages (evidence: `TravelAgency/Repositories/PackageRepository.cs`)
