# tushar-2223/hotel-management-system architecture

> Architecture diagram of the GitHub repository tushar-2223/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/tushar-2223/hotel-management-system
- Repository: https://github.com/tushar-2223/hotel-management-system

## Overview

BlueBird is a PHP hotel-booking site with a staff-facing management panel. Guests authenticate and submit room/date requests; staff review and confirm bookings, which creates payment records for payment management and invoicing. The panel also covers room and staff administration, exports, and dashboard reporting. The sampled pages show direct MySQL access through a shared connection rather than a separate service layer. Several admin capabilities are documented or present in the tree but not sampled, so their internal data flows are left unasserted.

Main entry points: [`config.php`](https://github.com/tushar-2223/hotel-management-system/blob/main/config.php) (MySQL connection), [`admin/admin.php`](https://github.com/tushar-2223/hotel-management-system/blob/main/admin/admin.php) (Admin panel), [`admin/roombook.php`](https://github.com/tushar-2223/hotel-management-system/blob/main/admin/roombook.php) (Booking review), [`admin/payment.php`](https://github.com/tushar-2223/hotel-management-system/blob/main/admin/payment.php) (Payment records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_guest["Guest experience"]
  node_auth["Login and signup<br/>[index.php]"]
  node_booking["Browse and book<br/>[home.php]"]
end

subgraph group_admin["Staff administration"]
  node_adminpanel["Admin panel<br/>[admin.php]"]
  node_dashboard["Dashboard reports<br/>[dashboard.php]"]
  node_bookingadmin["Booking review<br/>[roombook.php]"]
  node_confirmation["Booking confirmation<br/>[roomconfirm.php]"]
  node_bookingedit["Booking edits<br/>[roombookedit.php]"]
  node_rooms["Room management<br/>[room.php]"]
  node_staffmgmt["Staff management<br/>[staff.php]"]
  node_payments["Payment records<br/>[payment.php]"]
  node_invoice["Invoice printing<br/>[invoiceprint.php]"]
  node_export["Data export<br/>[exportdata.php]"]
end

subgraph group_data["Persistence"]
  node_hoteldb[("Hotel database<br/>[bluebirdhotel.sql]")]
end

subgraph group_shared["Shared services"]
  node_dbconn["MySQL connection<br/>[config.php]"]
end

node_guest(("Guest"))
node_staff(("Hotel staff"))

node_guest -->|"authenticates"| node_auth
node_guest -->|"requests stay"| node_booking
node_auth -->|"queries"| node_dbconn
node_booking -->|"queries and writes"| node_dbconn
node_staff -->|"manages hotel"| node_adminpanel
node_adminpanel -->|"embeds"| node_dashboard
node_adminpanel -->|"embeds"| node_bookingadmin
node_adminpanel -->|"embeds"| node_payments
node_adminpanel -->|"embeds"| node_rooms
node_adminpanel -->|"embeds"| node_staffmgmt
node_dashboard -->|"queries"| node_dbconn
node_bookingadmin -->|"queries and writes"| node_dbconn
node_bookingedit -->|"queries"| node_dbconn
node_confirmation -->|"updates and inserts"| node_dbconn
node_rooms -->|"queries and writes"| node_dbconn
node_staffmgmt -->|"queries and writes"| node_dbconn
node_payments -->|"queries"| node_dbconn
node_export -->|"queries"| node_dbconn
node_dbconn -->|"connects"| node_hoteldb
node_bookingadmin -.->|"links to confirm"| node_confirmation
node_payments -->|"links to print"| node_invoice

click node_auth "https://github.com/tushar-2223/hotel-management-system/blob/main/index.php"
click node_booking "https://github.com/tushar-2223/hotel-management-system/blob/main/home.php"
click node_adminpanel "https://github.com/tushar-2223/hotel-management-system/blob/main/admin/admin.php"
click node_dashboard "https://github.com/tushar-2223/hotel-management-system/blob/main/admin/dashboard.php"
click node_bookingadmin "https://github.com/tushar-2223/hotel-management-system/blob/main/admin/roombook.php"
click node_confirmation "https://github.com/tushar-2223/hotel-management-system/blob/main/admin/roomconfirm.php"
click node_bookingedit "https://github.com/tushar-2223/hotel-management-system/blob/main/admin/roombookedit.php"
click node_rooms "https://github.com/tushar-2223/hotel-management-system/blob/main/admin/room.php"
click node_staffmgmt "https://github.com/tushar-2223/hotel-management-system/blob/main/admin/staff.php"
click node_payments "https://github.com/tushar-2223/hotel-management-system/blob/main/admin/payment.php"
click node_invoice "https://github.com/tushar-2223/hotel-management-system/blob/main/admin/invoiceprint.php"
click node_export "https://github.com/tushar-2223/hotel-management-system/blob/main/admin/exportdata.php"
click node_dbconn "https://github.com/tushar-2223/hotel-management-system/blob/main/config.php"
click node_hoteldb "https://github.com/tushar-2223/hotel-management-system/blob/main/bluebirdhotel.sql"

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_auth,node_booking toneBlue
class node_adminpanel,node_dashboard,node_bookingadmin,node_confirmation,node_bookingedit,node_rooms,node_staffmgmt,node_payments,node_invoice,node_export toneAmber
class node_hoteldb toneMint
class node_dbconn toneRose
class node_guest,node_staff toneIndigo
```

## Components

### Guest experience

- [Login and signup](https://github.com/tushar-2223/hotel-management-system/blob/main/index.php): `index.php`
- [Browse and book](https://github.com/tushar-2223/hotel-management-system/blob/main/home.php): `home.php`

### Staff administration

- [Admin panel](https://github.com/tushar-2223/hotel-management-system/blob/main/admin/admin.php): `admin/admin.php`
- [Dashboard reports](https://github.com/tushar-2223/hotel-management-system/blob/main/admin/dashboard.php): `admin/dashboard.php`
- [Booking review](https://github.com/tushar-2223/hotel-management-system/blob/main/admin/roombook.php): `admin/roombook.php`
- [Booking confirmation](https://github.com/tushar-2223/hotel-management-system/blob/main/admin/roomconfirm.php): `admin/roomconfirm.php`
- [Booking edits](https://github.com/tushar-2223/hotel-management-system/blob/main/admin/roombookedit.php): `admin/roombookedit.php`
- [Room management](https://github.com/tushar-2223/hotel-management-system/blob/main/admin/room.php): `admin/room.php`
- [Staff management](https://github.com/tushar-2223/hotel-management-system/blob/main/admin/staff.php): `admin/staff.php`
- [Payment records](https://github.com/tushar-2223/hotel-management-system/blob/main/admin/payment.php): `admin/payment.php`
- [Invoice printing](https://github.com/tushar-2223/hotel-management-system/blob/main/admin/invoiceprint.php): `admin/invoiceprint.php`
- [Data export](https://github.com/tushar-2223/hotel-management-system/blob/main/admin/exportdata.php): `admin/exportdata.php`

### Persistence

- [Hotel database](https://github.com/tushar-2223/hotel-management-system/blob/main/bluebirdhotel.sql): `bluebirdhotel.sql`

### Shared services

- [MySQL connection](https://github.com/tushar-2223/hotel-management-system/blob/main/config.php): `config.php`

### Other components

- **Guest**
- **Hotel staff**

## Connections

- Guest → Login and signup: authenticates (evidence: `README.md`)
- Guest → Browse and book: requests stay (evidence: `README.md`)
- Login and signup → MySQL connection: queries (evidence: `index.php`)
- Browse and book → MySQL connection: queries and writes (evidence: `home.php`)
- Hotel staff → Admin panel: manages hotel (evidence: `README.md`)
- Admin panel → Dashboard reports: embeds (evidence: `admin/admin.php`)
- Admin panel → Booking review: embeds (evidence: `admin/admin.php`)
- Admin panel → Payment records: embeds (evidence: `admin/admin.php`)
- Admin panel → Room management: embeds (evidence: `admin/admin.php`)
- Admin panel → Staff management: embeds (evidence: `admin/admin.php`)
- Dashboard reports → MySQL connection: queries (evidence: `admin/dashboard.php`)
- Booking review → MySQL connection: queries and writes (evidence: `admin/roombook.php`)
- Booking edits → MySQL connection: queries (evidence: `admin/roombookedit.php`)
- Booking confirmation → MySQL connection: updates and inserts (evidence: `admin/roomconfirm.php`)
- Room management → MySQL connection: queries and writes (evidence: `admin/room.php`)
- Staff management → MySQL connection: queries and writes (evidence: `admin/staff.php`)
- Payment records → MySQL connection: queries (evidence: `admin/payment.php`)
- Data export → MySQL connection: queries (evidence: `admin/exportdata.php`)
- MySQL connection → Hotel database: connects (evidence: `config.php`)
- Booking review → Booking confirmation: links to confirm
- Payment records → Invoice printing: links to print (evidence: `admin/payment.php`)
