# vaibhavverma9999/hotel-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/vaibhavverma9999/hotel-management-system
- Repository: https://github.com/vaibhavverma9999/hotel-management-system

## Overview

This is a PHP/MySQL hotel booking and administration site. The documented customer journey runs from account creation and login through a booking request, administrator decision, payment, and booking history; customers can also cancel requests and extend confirmed stays. Separate admin capabilities manage room inventory, while the public site presents room imagery and rates. The excerpts show direct form routes and database access in several pages; other workflow links are supported by the README, since many handlers were not excerpted.

Main entry points: [`user_booking_history.php`](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/user_booking_history.php) (Booking history), [`bookroom.php`](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/bookroom.php) (Rates and booking form), [`user_room_status.php`](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/user_room_status.php) (Booking status and cancellation), [`user_payment.php`](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/user_payment.php) (Customer payment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public hotel site"]
  node_landing["Hotel landing<br/>[index.php]"]
  node_gallery["Room gallery<br/>[image_gallery.php]"]
end

subgraph group_customer["Customer booking"]
  node_customer_auth["Customer accounts<br/>[user_signup.php]"]
  node_room_brochure["Rates and booking form<br/>[bookroom.php]"]
  node_booking_request["Booking request handler<br/>[bookroom1.php]"]
  node_customer_status["Booking status and cancellation"]
  node_payment["Customer payment<br/>[user_payment.php]"]
  node_payment_handler["Payment handler<br/>[payment.php]"]
  node_customer_history["Booking history"]
  node_booking_detail["History details"]
end

subgraph group_admin["Administration"]
  node_admin_auth["Admin accounts<br/>[admin_login.php]"]
  node_admin_requests["Review requests"]
  node_confirmation["Confirm or remove booking<br/>[confirm_room.php]"]
  node_confirmed["Confirmed bookings"]
  node_stay_update["Modify stay"]
  node_inventory["Room inventory<br/>[add_room_admin.php]"]
  node_inventory_remove["Remove rooms"]
  node_admin_history["Admin booking history"]
end

subgraph group_storage["Persistence"]
  node_db[("MySQL iwp")]
end

node_visitor(("Visitor"))
node_customer(("Customer"))
node_administrator(("Administrator"))

node_visitor -->|"opens"| node_landing
node_landing -->|"offers gallery"| node_gallery
node_visitor -->|"signs up or in"| node_customer_auth
node_customer -->|"selects room"| node_room_brochure
node_room_brochure -->|"submits request"| node_booking_request
node_booking_request -->|"sends request"| node_admin_requests
node_administrator -->|"signs in"| node_admin_auth
node_admin_requests -->|"chooses outcome"| node_confirmation
node_confirmation -->|"confirms booking"| node_confirmed
node_customer -->|"checks status"| node_customer_status
node_customer_status -->|"may cancel request"| node_confirmation
node_confirmed -->|"offers stay change"| node_stay_update
node_customer -->|"pays confirmed stay"| node_payment
node_payment -->|"submits payment"| node_payment_handler
node_payment_handler -->|"records completed stay"| node_customer_history
node_customer -->|"views history"| node_customer_history
node_customer_history -->|"requests details"| node_booking_detail
node_administrator -->|"adds rooms"| node_inventory
node_administrator -->|"removes rooms"| node_inventory_remove
node_administrator -->|"views history"| node_admin_history
node_room_brochure -->|"reads session"| node_db
node_customer_status -->|"reads booking data"| node_db
node_customer_history -->|"reads past bookings"| node_db
node_payment -->|"reads booking data"| node_db
node_admin_requests -->|"reads requests"| node_db
node_inventory -->|"reads inventory"| node_db
node_inventory_remove -->|"reads inventory"| node_db
node_admin_history -->|"reads history"| node_db

click node_landing "https://github.com/vaibhavverma9999/hotel-management-system/blob/master/index.php"
click node_gallery "https://github.com/vaibhavverma9999/hotel-management-system/blob/master/image_gallery.php"
click node_customer_auth "https://github.com/vaibhavverma9999/hotel-management-system/blob/master/user_signup.php"
click node_room_brochure "https://github.com/vaibhavverma9999/hotel-management-system/blob/master/bookroom.php"
click node_booking_request "https://github.com/vaibhavverma9999/hotel-management-system/blob/master/bookroom1.php"
click node_customer_status "https://github.com/vaibhavverma9999/hotel-management-system/blob/master/user_room_status.php"
click node_payment "https://github.com/vaibhavverma9999/hotel-management-system/blob/master/user_payment.php"
click node_payment_handler "https://github.com/vaibhavverma9999/hotel-management-system/blob/master/payment.php"
click node_customer_history "https://github.com/vaibhavverma9999/hotel-management-system/blob/master/user_booking_history.php"
click node_booking_detail "https://github.com/vaibhavverma9999/hotel-management-system/blob/master/user_room_history.php"
click node_admin_auth "https://github.com/vaibhavverma9999/hotel-management-system/blob/master/admin_login.php"
click node_admin_requests "https://github.com/vaibhavverma9999/hotel-management-system/blob/master/admin_room_status.php"
click node_confirmation "https://github.com/vaibhavverma9999/hotel-management-system/blob/master/confirm_room.php"
click node_confirmed "https://github.com/vaibhavverma9999/hotel-management-system/blob/master/confirmed_bookings.php"
click node_stay_update "https://github.com/vaibhavverma9999/hotel-management-system/blob/master/admin_modify_room.php"
click node_inventory "https://github.com/vaibhavverma9999/hotel-management-system/blob/master/add_room_admin.php"
click node_inventory_remove "https://github.com/vaibhavverma9999/hotel-management-system/blob/master/remove_room_admin.php"
click node_admin_history "https://github.com/vaibhavverma9999/hotel-management-system/blob/master/admin_room_history.php"

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_landing,node_gallery toneBlue
class node_customer_auth,node_room_brochure,node_booking_request,node_customer_status,node_payment,node_payment_handler,node_customer_history,node_booking_detail toneAmber
class node_admin_auth,node_admin_requests,node_confirmation,node_confirmed,node_stay_update,node_inventory,node_inventory_remove,node_admin_history toneMint
class node_db toneRose
class node_visitor,node_customer,node_administrator toneIndigo
```

## Components

### Public hotel site

- [Hotel landing](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/index.php): `index.php`
- [Room gallery](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/image_gallery.php): `image_gallery.php`

### Customer booking

- [Customer accounts](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/user_signup.php): `user_signup.php`
- [Rates and booking form](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/bookroom.php): `bookroom.php`
- [Booking request handler](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/bookroom1.php): `bookroom1.php`
- [Booking status and cancellation](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/user_room_status.php): `user_room_status.php`
- [Customer payment](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/user_payment.php): `user_payment.php`
- [Payment handler](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/payment.php): `payment.php`
- [Booking history](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/user_booking_history.php): `user_booking_history.php`
- [History details](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/user_room_history.php): `user_room_history.php`

### Administration

- [Admin accounts](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/admin_login.php): `admin_login.php`
- [Review requests](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/admin_room_status.php): `admin_room_status.php`
- [Confirm or remove booking](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/confirm_room.php): `confirm_room.php`
- [Confirmed bookings](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/confirmed_bookings.php): `confirmed_bookings.php`
- [Modify stay](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/admin_modify_room.php): `admin_modify_room.php`
- [Room inventory](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/add_room_admin.php): `add_room_admin.php`
- [Remove rooms](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/remove_room_admin.php): `remove_room_admin.php`
- [Admin booking history](https://github.com/vaibhavverma9999/hotel-management-system/blob/master/admin_room_history.php): `admin_room_history.php`

### Persistence

- **MySQL iwp**

### Other components

- **Visitor**
- **Customer**
- **Administrator**

## Connections

- Visitor → Hotel landing: opens (evidence: `index.php`)
- Hotel landing → Room gallery: offers gallery (evidence: `image_gallery.php`)
- Visitor → Customer accounts: signs up or in
- Customer → Rates and booking form: selects room
- Rates and booking form → Booking request handler: submits request (evidence: `bookroom.php`)
- Booking request handler → Review requests: sends request
- Administrator → Admin accounts: signs in
- Review requests → Confirm or remove booking: chooses outcome (evidence: `admin_room_status.php`)
- Confirm or remove booking → Confirmed bookings: confirms booking
- Customer → Booking status and cancellation: checks status
- Booking status and cancellation → Confirm or remove booking: may cancel request
- Confirmed bookings → Modify stay: offers stay change (evidence: `confirmed_bookings.php`)
- Customer → Customer payment: pays confirmed stay
- Customer payment → Payment handler: submits payment (evidence: `user_payment.php`)
- Payment handler → Booking history: records completed stay
- Customer → Booking history: views history (evidence: `user_booking_history.php`)
- Booking history → History details: requests details (evidence: `user_booking_history.php`)
- Administrator → Room inventory: adds rooms
- Administrator → Remove rooms: removes rooms
- Administrator → Admin booking history: views history (evidence: `admin_room_history.php`)
- Rates and booking form → MySQL iwp: reads session (evidence: `bookroom.php`)
- Booking status and cancellation → MySQL iwp: reads booking data (evidence: `user_room_status.php`)
- Booking history → MySQL iwp: reads past bookings (evidence: `user_booking_history.php`)
- Customer payment → MySQL iwp: reads booking data (evidence: `user_payment.php`)
- Review requests → MySQL iwp: reads requests (evidence: `admin_room_status.php`)
- Room inventory → MySQL iwp: reads inventory (evidence: `add_room_admin.php`)
- Remove rooms → MySQL iwp: reads inventory (evidence: `remove_room_admin.php`)
- Admin booking history → MySQL iwp: reads history (evidence: `admin_room_history.php`)
