# ildrm/aurelia-hospitality-hotel-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/ildrm/aurelia-hospitality-hotel-management-system
- Repository: https://github.com/ildrm/aurelia-hospitality-hotel-management-system

## Overview

Aurelia Hospitality is a hotel operations system. Staff sign in to a role- and property-scoped workspace, use its operational views to submit commands, and receive dashboard or transaction results from a same-process API backed by SQLite. The documented product spans reservations and front desk, room/rate products, ancillary bookings, housekeeping, inventory, accounting, CRM, affiliates, and night audit. The single server file owns many handlers and persistence actions, so several domain nodes share its exact path. Relationship detail is limited to the excerpts and README; undocumented cross-domain links are omitted.

Main entry points: [`server/index.ts`](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts) (HTTP application), [`src/App.tsx`](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/src/App.tsx) (Operations UI), [`src/api.ts`](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/src/api.ts) (API client), [`shared/rules.ts`](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/shared/rules.ts) (Revenue rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Staff workspace"]
  node_ui["Operations UI<br/>[App.tsx]"]
  node_clientapi["API client<br/>[api.ts]"]
  node_server["HTTP application<br/>[index.ts]"]
end

subgraph group_identity["Access control"]
  node_auth["Role permissions<br/>[auth.ts]"]
  node_session["Authentication<br/>[index.ts]"]
end

subgraph group_stay["Stay and revenue"]
  node_reservation["Reservations<br/>[index.ts]"]
  node_catalog["Room and meal products<br/>[index.ts]"]
  node_pricing["Revenue rules<br/>[rules.ts]"]
  node_frontdesk["Front desk and folios<br/>[index.ts]"]
  node_affiliates["Affiliate channels<br/>[index.ts]"]
  node_domain["Domain contracts<br/>[domain.ts]"]
end

subgraph group_operations["Property operations"]
  node_dashboard["Property dashboard<br/>[index.ts]"]
  node_services["Ancillary bookings<br/>[index.ts]"]
  node_housekeeping["Housekeeping<br/>[index.ts]"]
  node_inventory["Perpetual inventory<br/>[index.ts]"]
  node_nightaudit["Night audit<br/>[index.ts]"]
end

subgraph group_records["Guest and finance"]
  node_crm["Guest CRM<br/>[index.ts]"]
  node_accounting["Accounting journals<br/>[index.ts]"]
  node_audit["Audit trail<br/>[index.ts]"]
  node_db[("Property database<br/>[index.ts]")]
end

node_staff(("Hotel staff"))

node_staff -->|"uses"| node_ui
node_ui -->|"requests"| node_clientapi
node_clientapi -->|"sends HTTP"| node_server
node_server -->|"routes auth"| node_session
node_server -->|"serves data"| node_dashboard
node_server -->|"handles commands"| node_reservation
node_server -->|"handles stays"| node_frontdesk
node_server -->|"handles bookings"| node_services
node_server -->|"updates tasks"| node_housekeeping
node_server -->|"moves stock"| node_inventory
node_server -->|"updates channels"| node_affiliates
node_server -->|"updates profiles"| node_crm
node_server -->|"posts journals"| node_accounting
node_server -->|"runs audit"| node_nightaudit
node_server -->|"reads and writes"| node_db
node_dashboard -->|"reads property data"| node_db
node_reservation -->|"checks advance purchase"| node_pricing
node_pricing -->|"uses types"| node_domain
node_ui -->|"checks permissions"| node_auth
node_session -->|"uses roles"| node_auth
node_ui -->|"shows catalog"| node_catalog
node_ui -->|"shows operations"| node_frontdesk
node_ui -->|"books services"| node_services
node_ui -->|"manages tasks"| node_housekeeping
node_ui -->|"manages stock"| node_inventory
node_ui -->|"manages journals"| node_accounting
node_ui -->|"manages guests"| node_crm
node_ui -->|"manages affiliates"| node_affiliates
node_reservation -->|"persists stays"| node_db
node_housekeeping -->|"updates rooms"| node_db

click node_ui "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/src/App.tsx"
click node_clientapi "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/src/api.ts"
click node_server "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts"
click node_auth "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/shared/auth.ts"
click node_session "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts"
click node_dashboard "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts"
click node_reservation "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts"
click node_catalog "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts"
click node_pricing "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/shared/rules.ts"
click node_frontdesk "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts"
click node_affiliates "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts"
click node_services "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts"
click node_housekeeping "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts"
click node_inventory "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts"
click node_nightaudit "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts"
click node_crm "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts"
click node_accounting "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts"
click node_audit "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts"
click node_db "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts"
click node_domain "https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/shared/domain.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_ui,node_clientapi,node_server toneBlue
class node_auth,node_session toneAmber
class node_reservation,node_catalog,node_pricing,node_frontdesk,node_affiliates,node_domain toneMint
class node_dashboard,node_services,node_housekeeping,node_inventory,node_nightaudit toneRose
class node_crm,node_accounting,node_audit,node_db,node_staff toneIndigo
```

## Components

### Staff workspace

- [Operations UI](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/src/App.tsx): `src/App.tsx`
- [API client](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/src/api.ts): `src/api.ts`
- [HTTP application](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts): `server/index.ts`

### Access control

- [Role permissions](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/shared/auth.ts): `shared/auth.ts`
- [Authentication](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts): `server/index.ts`

### Stay and revenue

- [Reservations](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts): `server/index.ts`
- [Room and meal products](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts): `server/index.ts`
- [Revenue rules](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/shared/rules.ts): `shared/rules.ts`
- [Front desk and folios](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts): `server/index.ts`
- [Affiliate channels](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts): `server/index.ts`
- [Domain contracts](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/shared/domain.ts): `shared/domain.ts`

### Property operations

- [Property dashboard](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts): `server/index.ts`
- [Ancillary bookings](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts): `server/index.ts`
- [Housekeeping](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts): `server/index.ts`
- [Perpetual inventory](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts): `server/index.ts`
- [Night audit](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts): `server/index.ts`

### Guest and finance

- [Guest CRM](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts): `server/index.ts`
- [Accounting journals](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts): `server/index.ts`
- [Audit trail](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts): `server/index.ts`
- [Property database](https://github.com/ildrm/aurelia-hospitality-hotel-management-system/blob/main/server/index.ts): `server/index.ts`

### Other components

- **Hotel staff**

## Connections

- Hotel staff → Operations UI: uses (evidence: `README.md`)
- Operations UI → API client: requests (evidence: `src/App.tsx`)
- API client → HTTP application: sends HTTP (evidence: `src/api.ts`)
- HTTP application → Authentication: routes auth (evidence: `README.md`)
- HTTP application → Property dashboard: serves data (evidence: `server/index.ts`)
- HTTP application → Reservations: handles commands (evidence: `server/index.ts`)
- HTTP application → Front desk and folios: handles stays (evidence: `server/index.ts`)
- HTTP application → Ancillary bookings: handles bookings (evidence: `server/index.ts`)
- HTTP application → Housekeeping: updates tasks (evidence: `server/index.ts`)
- HTTP application → Perpetual inventory: moves stock (evidence: `server/index.ts`)
- HTTP application → Affiliate channels: updates channels (evidence: `server/index.ts`)
- HTTP application → Guest CRM: updates profiles (evidence: `server/index.ts`)
- HTTP application → Accounting journals: posts journals (evidence: `server/index.ts`)
- HTTP application → Night audit: runs audit (evidence: `server/index.ts`)
- HTTP application → Property database: reads and writes (evidence: `server/index.ts`)
- Property dashboard → Property database: reads property data (evidence: `server/index.ts`)
- Reservations → Revenue rules: checks advance purchase (evidence: `server/index.ts`)
- Revenue rules → Domain contracts: uses types (evidence: `shared/rules.ts`)
- Operations UI → Role permissions: checks permissions (evidence: `src/App.tsx`)
- Authentication → Role permissions: uses roles (evidence: `server/index.ts`)
- Operations UI → Room and meal products: shows catalog (evidence: `src/App.tsx`)
- Operations UI → Front desk and folios: shows operations (evidence: `src/App.tsx`)
- Operations UI → Ancillary bookings: books services (evidence: `src/App.tsx`)
- Operations UI → Housekeeping: manages tasks (evidence: `src/App.tsx`)
- Operations UI → Perpetual inventory: manages stock (evidence: `src/App.tsx`)
- Operations UI → Accounting journals: manages journals (evidence: `src/App.tsx`)
- Operations UI → Guest CRM: manages guests (evidence: `src/App.tsx`)
- Operations UI → Affiliate channels: manages affiliates (evidence: `src/App.tsx`)
- Reservations → Property database: persists stays (evidence: `server/index.ts`)
- Housekeeping → Property database: updates rooms (evidence: `server/index.ts`)
