# masriel/hoteldiploma architecture

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

- Interactive diagram: https://gitdiagram.com/masriel/hoteldiploma
- Repository: https://github.com/masriel/hoteldiploma

## Overview

Hotel is a WPF desktop application for hotel operations: users configure a MySQL connection, sign in, manage clients and reservations, and administrators manage records and database backups. The graph separates booking and room workflows, client operations, administration, and shared infrastructure. Most relationships are supported by the SOURCE INDEX or shown excerpts; unsampled workflows are not expanded beyond those references.

Main entry points: [`Hotel/Classes/ConnectionInfo.cs`](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/ConnectionInfo.cs) (MySQL access), [`Hotel/Pages/MainView.xaml.cs`](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Pages/MainView.xaml.cs) (Hotel overview), [`Hotel/Pages/MakeReservation.xaml.cs`](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Pages/MakeReservation.xaml.cs) (Make reservation), [`Hotel/Classes/ReadConfigFile.cs`](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/ReadConfigFile.cs) (DB configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_booking["Reservations and rooms"]
  node_reservation["Make reservation"]
  node_mainview["Hotel overview<br/>[MainView.xaml.cs]"]
  node_bookingview["Booking records"]
  node_bookingedit["Edit booking"]
  node_roomview["Rooms and services"]
  node_roomedit["Edit room<br/>[RoomEdit.xaml.cs]"]
  node_roomstatus["Room availability"]
  node_roommodel["Room data<br/>[Rooms.cs]"]
  node_mealmodel["Meal data<br/>[Meals.cs]"]
  node_bookingmodel["Booking data"]
  node_mealpicker["Select meals<br/>[SelectMeal.xaml.cs]"]
  node_docmanager["Word documents"]
end

subgraph group_clients["Client records"]
  node_clientsview["Client records"]
  node_clientedit["Edit client<br/>[ClientEdit.xaml.cs]"]
  node_addclient["Add client<br/>[AddClient.xaml.cs]"]
  node_clientmodel["Client data<br/>[Clients.cs]"]
end

subgraph group_admin["Administration"]
  node_adminview["Admin dashboard"]
  node_databaseadmin["Database administration"]
  node_userview["User management<br/>[UsersView.xaml.cs]"]
  node_registration["User registration"]
  node_backup["Backup and restore<br/>[BackupDatabase.cs]"]
end

subgraph group_foundation["Shared infrastructure"]
  node_app["Application startup<br/>[App.xaml.cs]"]
  node_login["Sign in<br/>[Login.xaml.cs]"]
  node_dbsetup["Connection setup"]
  node_config["DB configuration<br/>[ReadConfigFile.cs]"]
  node_dbaccess["MySQL access<br/>[ConnectionInfo.cs]"]
  node_navigation["Window navigation<br/>[Navigation.cs]"]
end

node_operator(("Hotel staff"))
node_database[("Hotel database")]

node_operator -->|"starts"| node_app
node_app -->|"loads config"| node_config
node_app -->|"opens if unconfigured"| node_dbsetup
node_app -->|"opens if configured"| node_login
node_dbsetup -->|"saves settings"| node_config
node_login -->|"uses navigation"| node_navigation
node_login -.->|"continues to"| node_mainview
node_reservation -->|"uses room data"| node_roommodel
node_reservation -->|"uses meal data"| node_mealmodel
node_reservation -->|"uses client data"| node_clientmodel
node_reservation -->|"queries database"| node_dbaccess
node_reservation -->|"gets connection"| node_config
node_reservation -->|"creates documents"| node_docmanager
node_mainview -->|"updates availability"| node_roomstatus
node_mainview -->|"uses backup"| node_backup
node_mainview -->|"uses documents"| node_docmanager
node_mainview -->|"queries database"| node_dbaccess
node_mainview -->|"gets connection"| node_config
node_mainview -->|"uses booking data"| node_bookingmodel
node_bookingview -->|"queries database"| node_dbaccess
node_bookingview -.->|"opens editor"| node_bookingedit
node_bookingview -->|"uses room data"| node_roommodel
node_bookingview -->|"uses meal data"| node_mealmodel
node_bookingedit -->|"queries database"| node_dbaccess
node_bookingedit -->|"uses room data"| node_roommodel
node_bookingedit -->|"uses meal data"| node_mealmodel
node_roomview -->|"queries database"| node_dbaccess
node_roomview -->|"uses room data"| node_roommodel
node_roomedit -->|"queries database"| node_dbaccess
node_roomstatus -->|"checks database"| node_dbaccess
node_roomstatus -->|"uses room data"| node_roommodel
node_mealpicker -->|"uses meal data"| node_mealmodel
node_clientsview -->|"queries database"| node_dbaccess
node_clientsview -->|"uses client data"| node_clientmodel
node_clientsview -.->|"opens editor"| node_clientedit
node_clientedit -->|"queries database"| node_dbaccess
node_addclient -->|"inserts client"| node_dbaccess
node_addclient -->|"gets connection"| node_config
node_addclient -->|"creates client data"| node_clientmodel
node_adminview -->|"opens database tools"| node_databaseadmin
node_adminview -->|"uses backup"| node_backup
node_databaseadmin -->|"runs backup tasks"| node_backup
node_databaseadmin -->|"changes windows"| node_navigation
node_userview -->|"queries database"| node_dbaccess
node_registration -->|"uses navigation"| node_navigation
node_backup -->|"reads settings"| node_config
node_backup -->|"exports or imports"| node_database
node_dbaccess -->|"reads and writes"| node_database

click node_app "https://github.com/masriel/hoteldiploma/blob/master/Hotel/App.xaml.cs"
click node_login "https://github.com/masriel/hoteldiploma/blob/master/Hotel/Pages/Login.xaml.cs"
click node_dbsetup "https://github.com/masriel/hoteldiploma/blob/master/Hotel/DatabaseConnectionSetup.xaml.cs"
click node_config "https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/ReadConfigFile.cs"
click node_dbaccess "https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/ConnectionInfo.cs"
click node_navigation "https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/Navigation.cs"
click node_reservation "https://github.com/masriel/hoteldiploma/blob/master/Hotel/Pages/MakeReservation.xaml.cs"
click node_mainview "https://github.com/masriel/hoteldiploma/blob/master/Hotel/Pages/MainView.xaml.cs"
click node_bookingview "https://github.com/masriel/hoteldiploma/blob/master/Hotel/DatabaseControl/TabControl/BookingsView.xaml.cs"
click node_bookingedit "https://github.com/masriel/hoteldiploma/blob/master/Hotel/DatabaseControl/BookingEdit.xaml.cs"
click node_roomview "https://github.com/masriel/hoteldiploma/blob/master/Hotel/DatabaseControl/TabControl/RoomsAndServicesView.xaml.cs"
click node_roomedit "https://github.com/masriel/hoteldiploma/blob/master/Hotel/DatabaseControl/RoomEdit.xaml.cs"
click node_roomstatus "https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/RoomStatusUpdater.cs"
click node_roommodel "https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/Rooms.cs"
click node_mealmodel "https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/Meals.cs"
click node_bookingmodel "https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/BookingInfomation.cs"
click node_mealpicker "https://github.com/masriel/hoteldiploma/blob/master/Hotel/ItemControl/SelectMeal.xaml.cs"
click node_clientsview "https://github.com/masriel/hoteldiploma/blob/master/Hotel/DatabaseControl/TabControl/ClientsView.xaml.cs"
click node_clientedit "https://github.com/masriel/hoteldiploma/blob/master/Hotel/DatabaseControl/ClientEdit.xaml.cs"
click node_addclient "https://github.com/masriel/hoteldiploma/blob/master/Hotel/Pages/AddClient.xaml.cs"
click node_clientmodel "https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/Clients.cs"
click node_adminview "https://github.com/masriel/hoteldiploma/blob/master/Hotel/Pages/AdminPanelView.xaml.cs"
click node_databaseadmin "https://github.com/masriel/hoteldiploma/blob/master/Hotel/AdminPanel/ControlDatabaseView.xaml.cs"
click node_userview "https://github.com/masriel/hoteldiploma/blob/master/Hotel/DatabaseControl/UsersView.xaml.cs"
click node_registration "https://github.com/masriel/hoteldiploma/blob/master/Hotel/DatabaseControl/UserRegistration.xaml.cs"
click node_backup "https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/BackupDatabase.cs"
click node_docmanager "https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/Word/WordDocumentManager.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_reservation,node_mainview,node_bookingview,node_bookingedit,node_roomview,node_roomedit,node_roomstatus,node_roommodel,node_mealmodel,node_bookingmodel,node_mealpicker,node_docmanager toneBlue
class node_clientsview,node_clientedit,node_addclient,node_clientmodel,node_database toneAmber
class node_adminview,node_databaseadmin,node_userview,node_registration,node_backup toneMint
class node_app,node_login,node_dbsetup,node_config,node_dbaccess,node_navigation toneRose
class node_operator toneIndigo
```

## Components

### Reservations and rooms

- [Make reservation](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Pages/MakeReservation.xaml.cs): `Hotel/Pages/MakeReservation.xaml.cs`
- [Hotel overview](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Pages/MainView.xaml.cs): `Hotel/Pages/MainView.xaml.cs`
- [Booking records](https://github.com/masriel/hoteldiploma/blob/master/Hotel/DatabaseControl/TabControl/BookingsView.xaml.cs): `Hotel/DatabaseControl/TabControl/BookingsView.xaml.cs`
- [Edit booking](https://github.com/masriel/hoteldiploma/blob/master/Hotel/DatabaseControl/BookingEdit.xaml.cs): `Hotel/DatabaseControl/BookingEdit.xaml.cs`
- [Rooms and services](https://github.com/masriel/hoteldiploma/blob/master/Hotel/DatabaseControl/TabControl/RoomsAndServicesView.xaml.cs): `Hotel/DatabaseControl/TabControl/RoomsAndServicesView.xaml.cs`
- [Edit room](https://github.com/masriel/hoteldiploma/blob/master/Hotel/DatabaseControl/RoomEdit.xaml.cs): `Hotel/DatabaseControl/RoomEdit.xaml.cs`
- [Room availability](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/RoomStatusUpdater.cs): `Hotel/Classes/RoomStatusUpdater.cs`
- [Room data](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/Rooms.cs): `Hotel/Classes/Rooms.cs`
- [Meal data](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/Meals.cs): `Hotel/Classes/Meals.cs`
- [Booking data](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/BookingInfomation.cs): `Hotel/Classes/BookingInfomation.cs`
- [Select meals](https://github.com/masriel/hoteldiploma/blob/master/Hotel/ItemControl/SelectMeal.xaml.cs): `Hotel/ItemControl/SelectMeal.xaml.cs`
- [Word documents](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/Word/WordDocumentManager.cs): `Hotel/Classes/Word/WordDocumentManager.cs`

### Client records

- [Client records](https://github.com/masriel/hoteldiploma/blob/master/Hotel/DatabaseControl/TabControl/ClientsView.xaml.cs): `Hotel/DatabaseControl/TabControl/ClientsView.xaml.cs`
- [Edit client](https://github.com/masriel/hoteldiploma/blob/master/Hotel/DatabaseControl/ClientEdit.xaml.cs): `Hotel/DatabaseControl/ClientEdit.xaml.cs`
- [Add client](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Pages/AddClient.xaml.cs): `Hotel/Pages/AddClient.xaml.cs`
- [Client data](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/Clients.cs): `Hotel/Classes/Clients.cs`

### Administration

- [Admin dashboard](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Pages/AdminPanelView.xaml.cs): `Hotel/Pages/AdminPanelView.xaml.cs`
- [Database administration](https://github.com/masriel/hoteldiploma/blob/master/Hotel/AdminPanel/ControlDatabaseView.xaml.cs): `Hotel/AdminPanel/ControlDatabaseView.xaml.cs`
- [User management](https://github.com/masriel/hoteldiploma/blob/master/Hotel/DatabaseControl/UsersView.xaml.cs): `Hotel/DatabaseControl/UsersView.xaml.cs`
- [User registration](https://github.com/masriel/hoteldiploma/blob/master/Hotel/DatabaseControl/UserRegistration.xaml.cs): `Hotel/DatabaseControl/UserRegistration.xaml.cs`
- [Backup and restore](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/BackupDatabase.cs): `Hotel/Classes/BackupDatabase.cs`

### Shared infrastructure

- [Application startup](https://github.com/masriel/hoteldiploma/blob/master/Hotel/App.xaml.cs): `Hotel/App.xaml.cs`
- [Sign in](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Pages/Login.xaml.cs): `Hotel/Pages/Login.xaml.cs`
- [Connection setup](https://github.com/masriel/hoteldiploma/blob/master/Hotel/DatabaseConnectionSetup.xaml.cs): `Hotel/DatabaseConnectionSetup.xaml.cs`
- [DB configuration](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/ReadConfigFile.cs): `Hotel/Classes/ReadConfigFile.cs`
- [MySQL access](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/ConnectionInfo.cs): `Hotel/Classes/ConnectionInfo.cs`
- [Window navigation](https://github.com/masriel/hoteldiploma/blob/master/Hotel/Classes/Navigation.cs): `Hotel/Classes/Navigation.cs`

### Other components

- **Hotel staff**
- **Hotel database**

## Connections

- Hotel staff → Application startup: starts
- Application startup → DB configuration: loads config (evidence: `Hotel/App.xaml.cs`)
- Application startup → Connection setup: opens if unconfigured (evidence: `Hotel/App.xaml.cs`)
- Application startup → Sign in: opens if configured (evidence: `Hotel/App.xaml.cs`)
- Connection setup → DB configuration: saves settings (evidence: `Hotel/DatabaseConnectionSetup.xaml.cs`)
- Sign in → Window navigation: uses navigation (evidence: `Hotel/Pages/Login.xaml.cs`)
- Sign in → Hotel overview: continues to
- Make reservation → Room data: uses room data (evidence: `Hotel/Pages/MakeReservation.xaml.cs`)
- Make reservation → Meal data: uses meal data (evidence: `Hotel/Pages/MakeReservation.xaml.cs`)
- Make reservation → Client data: uses client data (evidence: `Hotel/Pages/MakeReservation.xaml.cs`)
- Make reservation → MySQL access: queries database (evidence: `Hotel/Pages/MakeReservation.xaml.cs`)
- Make reservation → DB configuration: gets connection (evidence: `Hotel/Pages/MakeReservation.xaml.cs`)
- Make reservation → Word documents: creates documents (evidence: `Hotel/Pages/MakeReservation.xaml.cs`)
- Hotel overview → Room availability: updates availability (evidence: `Hotel/Pages/MainView.xaml.cs`)
- Hotel overview → Backup and restore: uses backup (evidence: `Hotel/Pages/MainView.xaml.cs`)
- Hotel overview → Word documents: uses documents (evidence: `Hotel/Pages/MainView.xaml.cs`)
- Hotel overview → MySQL access: queries database (evidence: `Hotel/Pages/MainView.xaml.cs`)
- Hotel overview → DB configuration: gets connection (evidence: `Hotel/Pages/MainView.xaml.cs`)
- Hotel overview → Booking data: uses booking data (evidence: `Hotel/Pages/MainView.xaml.cs`)
- Booking records → MySQL access: queries database (evidence: `Hotel/DatabaseControl/TabControl/BookingsView.xaml.cs`)
- Booking records → Edit booking: opens editor
- Booking records → Room data: uses room data (evidence: `Hotel/DatabaseControl/TabControl/BookingsView.xaml.cs`)
- Booking records → Meal data: uses meal data (evidence: `Hotel/DatabaseControl/TabControl/BookingsView.xaml.cs`)
- Edit booking → MySQL access: queries database (evidence: `Hotel/DatabaseControl/BookingEdit.xaml.cs`)
- Edit booking → Room data: uses room data (evidence: `Hotel/DatabaseControl/BookingEdit.xaml.cs`)
- Edit booking → Meal data: uses meal data (evidence: `Hotel/DatabaseControl/BookingEdit.xaml.cs`)
- Rooms and services → MySQL access: queries database (evidence: `Hotel/DatabaseControl/TabControl/RoomsAndServicesView.xaml.cs`)
- Rooms and services → Room data: uses room data (evidence: `Hotel/DatabaseControl/TabControl/RoomsAndServicesView.xaml.cs`)
- Edit room → MySQL access: queries database (evidence: `Hotel/DatabaseControl/RoomEdit.xaml.cs`)
- Room availability → MySQL access: checks database (evidence: `Hotel/Classes/RoomStatusUpdater.cs`)
- Room availability → Room data: uses room data (evidence: `Hotel/Classes/RoomStatusUpdater.cs`)
- Select meals → Meal data: uses meal data (evidence: `Hotel/ItemControl/SelectMeal.xaml.cs`)
- Client records → MySQL access: queries database (evidence: `Hotel/DatabaseControl/TabControl/ClientsView.xaml.cs`)
- Client records → Client data: uses client data (evidence: `Hotel/DatabaseControl/TabControl/ClientsView.xaml.cs`)
- Client records → Edit client: opens editor
- Edit client → MySQL access: queries database (evidence: `Hotel/DatabaseControl/ClientEdit.xaml.cs`)
- Add client → MySQL access: inserts client (evidence: `Hotel/Pages/AddClient.xaml.cs`)
- Add client → DB configuration: gets connection (evidence: `Hotel/Pages/AddClient.xaml.cs`)
- Add client → Client data: creates client data (evidence: `Hotel/Pages/AddClient.xaml.cs`)
- Admin dashboard → Database administration: opens database tools (evidence: `Hotel/Pages/AdminPanelView.xaml.cs`)
- Admin dashboard → Backup and restore: uses backup (evidence: `Hotel/Pages/AdminPanelView.xaml.cs`)
- Database administration → Backup and restore: runs backup tasks (evidence: `Hotel/AdminPanel/ControlDatabaseView.xaml.cs`)
- Database administration → Window navigation: changes windows (evidence: `Hotel/AdminPanel/ControlDatabaseView.xaml.cs`)
- User management → MySQL access: queries database (evidence: `Hotel/DatabaseControl/UsersView.xaml.cs`)
- User registration → Window navigation: uses navigation (evidence: `Hotel/DatabaseControl/UserRegistration.xaml.cs`)
- Backup and restore → DB configuration: reads settings (evidence: `Hotel/Classes/BackupDatabase.cs`)
- Backup and restore → Hotel database: exports or imports (evidence: `Hotel/Classes/BackupDatabase.cs`)
- MySQL access → Hotel database: reads and writes (evidence: `Hotel/Classes/ConnectionInfo.cs`)
