# yuanxiangtong1-commits/hotel-rms-pricing-suggestion architecture

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

- Interactive diagram: https://gitdiagram.com/yuanxiangtong1-commits/hotel-rms-pricing-suggestion
- Repository: https://github.com/yuanxiangtong1-commits/hotel-rms-pricing-suggestion

## Overview

Hotel RMS is a single-property pricing decision-support demo. Its main workflow builds a 90-day rate recommendation from booking pace, occupancy, lead time, competitor benchmarks and staff-maintained event factors, exports two CSV reports, and lets staff review and explain the results in a Tkinter UI. A separate scheduler launches the pricing engine daily. The engine and integrations are concentrated in one script; the graph keeps that implementation together rather than inventing internal module boundaries. Some UI and engine wiring is documented but not shown in the excerpts, so those links cite the README.

Main entry points: [`hotel rms.py`](https://github.com/yuanxiangtong1-commits/hotel-rms-pricing-suggestion/blob/main/hotel%20rms.py) (Pricing engine), [`rms_gui.py`](https://github.com/yuanxiangtong1-commits/hotel-rms-pricing-suggestion/blob/main/rms_gui.py) (Staff pricing UI), [`Public holidays.csv`](https://github.com/yuanxiangtong1-commits/hotel-rms-pricing-suggestion/blob/main/Public%20holidays.csv) (Event calendar CSV), [`timezone_config.py`](https://github.com/yuanxiangtong1-commits/hotel-rms-pricing-suggestion/blob/main/timezone_config.py) (Timezone settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_operations["Staff Operations"]
  node_ui["Staff pricing UI<br/>[rms_gui.py]"]
end

subgraph group_pricing["Pricing"]
  node_engine["Pricing engine<br/>[hotel rms.py]"]
  node_pms{{"PMS API"}}
  node_reports["Pricing reports"]
end

subgraph group_configuration["Calendar &amp; Time"]
  node_calendar_loader["Event calendar loader<br/>[event_calendar.py]"]
  node_calendar["Event calendar CSV"]
  node_timezone["Timezone settings<br/>[timezone_config.py]"]
end

subgraph group_automation["Automation"]
  node_scheduler["Daily scheduler<br/>[scheduler.py]"]
end

node_staff(("Hotel staff"))

node_staff -->|"reviews results"| node_ui
node_staff -->|"maintains events"| node_calendar
node_ui -->|"runs pricing"| node_engine
node_ui -->|"browses reports"| node_reports
node_ui -->|"opens calendar"| node_calendar
node_ui -->|"sets timezone"| node_timezone
node_engine -.->|"fetches reservations"| node_pms
node_engine -->|"loads events"| node_calendar_loader
node_calendar_loader -->|"reads and validates"| node_calendar
node_engine -->|"reads timezone"| node_timezone
node_engine -->|"writes CSV reports"| node_reports
node_scheduler -->|"launches daily"| node_engine
node_scheduler -->|"reads timezone"| node_timezone

click node_engine "https://github.com/yuanxiangtong1-commits/hotel-rms-pricing-suggestion/blob/main/hotel%20rms.py"
click node_calendar_loader "https://github.com/yuanxiangtong1-commits/hotel-rms-pricing-suggestion/blob/main/event_calendar.py"
click node_calendar "https://github.com/yuanxiangtong1-commits/hotel-rms-pricing-suggestion/blob/main/Public%20holidays.csv"
click node_timezone "https://github.com/yuanxiangtong1-commits/hotel-rms-pricing-suggestion/blob/main/timezone_config.py"
click node_ui "https://github.com/yuanxiangtong1-commits/hotel-rms-pricing-suggestion/blob/main/rms_gui.py"
click node_scheduler "https://github.com/yuanxiangtong1-commits/hotel-rms-pricing-suggestion/blob/main/scheduler.py"

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 toneBlue
class node_engine,node_pms,node_reports toneAmber
class node_calendar_loader,node_calendar,node_timezone toneMint
class node_scheduler toneRose
class node_staff toneIndigo
```

## Components

### Staff Operations

- [Staff pricing UI](https://github.com/yuanxiangtong1-commits/hotel-rms-pricing-suggestion/blob/main/rms_gui.py): `rms_gui.py`

### Pricing

- [Pricing engine](https://github.com/yuanxiangtong1-commits/hotel-rms-pricing-suggestion/blob/main/hotel%20rms.py): `hotel rms.py`
- **PMS API**
- **Pricing reports**

### Calendar & Time

- [Event calendar loader](https://github.com/yuanxiangtong1-commits/hotel-rms-pricing-suggestion/blob/main/event_calendar.py): `event_calendar.py`
- [Event calendar CSV](https://github.com/yuanxiangtong1-commits/hotel-rms-pricing-suggestion/blob/main/Public%20holidays.csv): `Public holidays.csv`
- [Timezone settings](https://github.com/yuanxiangtong1-commits/hotel-rms-pricing-suggestion/blob/main/timezone_config.py): `timezone_config.py`

### Automation

- [Daily scheduler](https://github.com/yuanxiangtong1-commits/hotel-rms-pricing-suggestion/blob/main/scheduler.py): `scheduler.py`

### Other components

- **Hotel staff**

## Connections

- Hotel staff → Staff pricing UI: reviews results (evidence: `README.md`)
- Hotel staff → Event calendar CSV: maintains events (evidence: `README.md`)
- Staff pricing UI → Pricing engine: runs pricing (evidence: `README.md`)
- Staff pricing UI → Pricing reports: browses reports (evidence: `README.md`)
- Staff pricing UI → Event calendar CSV: opens calendar (evidence: `rms_gui.py`)
- Staff pricing UI → Timezone settings: sets timezone (evidence: `README.md`)
- Pricing engine → PMS API: fetches reservations (evidence: `hotel rms.py`)
- Pricing engine → Event calendar loader: loads events (evidence: `hotel rms.py`)
- Event calendar loader → Event calendar CSV: reads and validates (evidence: `README.md`)
- Pricing engine → Timezone settings: reads timezone (evidence: `hotel rms.py`)
- Pricing engine → Pricing reports: writes CSV reports (evidence: `README.md`)
- Daily scheduler → Pricing engine: launches daily (evidence: `scheduler.py`)
- Daily scheduler → Timezone settings: reads timezone (evidence: `scheduler.py`)
