# jennettej/reservations architecture

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

- Interactive diagram: https://gitdiagram.com/jennettej/reservations
- Repository: https://github.com/jennettej/reservations

## Overview

This is a command-line hotel reservation system for clerk, management, and housekeeping workflows. Users can book, list, search, edit, and close reservations; management also has history and reporting features, while housekeeping views occupancy and updates room cleanliness. Reservation records and archived history are stored as JSON, with room status in a text file. The excerpts show the main dispatch and several service calls; some menu routes and storage references are known only from the source index, so uncertain links are omitted.

Main entry points: [`main.py`](https://github.com/jennettej/reservations/blob/main/main.py) (Role menus), [`edit.py`](https://github.com/jennettej/reservations/blob/main/edit.py) (Booking and editing), [`data.py`](https://github.com/jennettej/reservations/blob/main/data.py) (Current reservations), [`miller.py`](https://github.com/jennettej/reservations/blob/main/miller.py) (Reservation closing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_menus["User workflows"]
  node_cli["Role menus<br/>[main.py]"]
end

subgraph group_reservations["Reservation services"]
  node_booking["Booking and editing<br/>[edit.py]"]
  node_search["Reservation search"]
  node_closing["Reservation closing<br/>[miller.py]"]
  node_availability["Date availability<br/>[garris.py]"]
  node_dateutils["Date conversion<br/>[miller.py]"]
  node_reports["Reservation reports<br/>[perf_report.py]"]
end

subgraph group_records["Persistence"]
  node_history["History service"]
  node_currentdata["Current reservations<br/>[data.py]"]
  node_reservationfile[("Reservation records<br/>[reservations.json]")]
  node_historyfile[("Archived records")]
end

subgraph group_operations["Hotel operations"]
  node_housekeeping["Room status and occupancy<br/>[main.py]"]
  node_roomfile[("Room status file<br/>[room_status.txt]")]
  node_standalone["Alternate booking flow<br/>[availability.py]"]
end

node_staff(("Hotel staff"))

node_staff -->|"uses"| node_cli
node_cli -->|"dispatches booking"| node_booking
node_cli -->|"dispatches search"| node_search
node_cli -->|"dispatches closing"| node_closing
node_cli -->|"dispatches reports"| node_reports
node_cli -->|"offers housekeeping"| node_housekeeping
node_cli -->|"views history"| node_history
node_booking -->|"loads and saves"| node_currentdata
node_booking -->|"validates dates"| node_availability
node_booking -->|"formats dates"| node_dateutils
node_search -->|"loads records"| node_currentdata
node_search -->|"displays results"| node_booking
node_closing -->|"archives reservation"| node_history
node_closing -->|"loads and saves"| node_currentdata
node_closing -->|"displays records"| node_booking
node_availability -->|"parses dates"| node_dateutils
node_reports -->|"loads records"| node_currentdata
node_reports -->|"parses dates"| node_dateutils
node_reports -->|"displays entries"| node_booking
node_currentdata -->|"reads and writes"| node_reservationfile
node_history -->|"reads and writes"| node_historyfile
node_housekeeping -->|"checks occupancy"| node_availability
node_housekeeping -->|"reads and updates"| node_roomfile
node_standalone -->|"converts dates"| node_dateutils

click node_cli "https://github.com/jennettej/reservations/blob/main/main.py"
click node_booking "https://github.com/jennettej/reservations/blob/main/edit.py"
click node_search "https://github.com/jennettej/reservations/blob/main/ReservationSearch.py"
click node_closing "https://github.com/jennettej/reservations/blob/main/miller.py"
click node_availability "https://github.com/jennettej/reservations/blob/main/garris.py"
click node_dateutils "https://github.com/jennettej/reservations/blob/main/miller.py"
click node_reports "https://github.com/jennettej/reservations/blob/main/perf_report.py"
click node_history "https://github.com/jennettej/reservations/blob/main/reservation_history.py"
click node_currentdata "https://github.com/jennettej/reservations/blob/main/data.py"
click node_reservationfile "https://github.com/jennettej/reservations/blob/main/reservations.json"
click node_historyfile "https://github.com/jennettej/reservations/blob/main/reservation_history.json"
click node_housekeeping "https://github.com/jennettej/reservations/blob/main/main.py"
click node_roomfile "https://github.com/jennettej/reservations/blob/main/room_status.txt"
click node_standalone "https://github.com/jennettej/reservations/blob/main/availability.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_cli toneBlue
class node_booking,node_search,node_closing,node_availability,node_dateutils,node_reports toneAmber
class node_history,node_currentdata,node_reservationfile,node_historyfile toneMint
class node_housekeeping,node_roomfile,node_standalone toneRose
class node_staff toneIndigo
```

## Components

### User workflows

- [Role menus](https://github.com/jennettej/reservations/blob/main/main.py): `main.py`

### Reservation services

- [Booking and editing](https://github.com/jennettej/reservations/blob/main/edit.py): `edit.py`
- [Reservation search](https://github.com/jennettej/reservations/blob/main/ReservationSearch.py): `ReservationSearch.py`
- [Reservation closing](https://github.com/jennettej/reservations/blob/main/miller.py): `miller.py`
- [Date availability](https://github.com/jennettej/reservations/blob/main/garris.py): `garris.py`
- [Date conversion](https://github.com/jennettej/reservations/blob/main/miller.py): `miller.py`
- [Reservation reports](https://github.com/jennettej/reservations/blob/main/perf_report.py): `perf_report.py`

### Persistence

- [History service](https://github.com/jennettej/reservations/blob/main/reservation_history.py): `reservation_history.py`
- [Current reservations](https://github.com/jennettej/reservations/blob/main/data.py): `data.py`
- [Reservation records](https://github.com/jennettej/reservations/blob/main/reservations.json): `reservations.json`
- [Archived records](https://github.com/jennettej/reservations/blob/main/reservation_history.json): `reservation_history.json`

### Hotel operations

- [Room status and occupancy](https://github.com/jennettej/reservations/blob/main/main.py): `main.py`
- [Room status file](https://github.com/jennettej/reservations/blob/main/room_status.txt): `room_status.txt`
- [Alternate booking flow](https://github.com/jennettej/reservations/blob/main/availability.py): `availability.py`

### Other components

- **Hotel staff**

## Connections

- Hotel staff → Role menus: uses (evidence: `main.py`)
- Role menus → Booking and editing: dispatches booking (evidence: `main.py`)
- Role menus → Reservation search: dispatches search (evidence: `main.py`)
- Role menus → Reservation closing: dispatches closing (evidence: `main.py`)
- Role menus → Reservation reports: dispatches reports (evidence: `main.py`)
- Role menus → Room status and occupancy: offers housekeeping (evidence: `main.py`)
- Role menus → History service: views history (evidence: `main.py`)
- Booking and editing → Current reservations: loads and saves (evidence: `edit.py`)
- Booking and editing → Date availability: validates dates (evidence: `edit.py`)
- Booking and editing → Date conversion: formats dates (evidence: `edit.py`)
- Reservation search → Current reservations: loads records (evidence: `ReservationSearch.py`)
- Reservation search → Booking and editing: displays results (evidence: `ReservationSearch.py`)
- Reservation closing → History service: archives reservation (evidence: `miller.py`)
- Reservation closing → Current reservations: loads and saves (evidence: `miller.py`)
- Reservation closing → Booking and editing: displays records (evidence: `miller.py`)
- Date availability → Date conversion: parses dates (evidence: `garris.py`)
- Reservation reports → Current reservations: loads records (evidence: `perf_report.py`)
- Reservation reports → Date conversion: parses dates (evidence: `perf_report.py`)
- Reservation reports → Booking and editing: displays entries (evidence: `perf_report.py`)
- Current reservations → Reservation records: reads and writes (evidence: `data.py`)
- History service → Archived records: reads and writes (evidence: `reservation_history.py`)
- Room status and occupancy → Date availability: checks occupancy (evidence: `main.py`)
- Room status and occupancy → Room status file: reads and updates (evidence: `main.py`)
- Alternate booking flow → Date conversion: converts dates (evidence: `availability.py`)
