# kimsalangsang17/group-7-hotel-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/kimsalangsang17/group-7-hotel-management-system
- Repository: https://github.com/kimsalangsang17/group-7-hotel-management-system

## Overview

This is a PHP hotel-management application with customer-facing sign-in and booking pages plus an iframe-based staff admin panel. The visible admin booking workflow records reservations, lets staff confirm them and calculate payment totals, then exposes payment records and printable invoices. Room and staff management, reporting, and data export are additional branches. The README gives no capability overview; some customer booking behavior and unsampled modules are therefore represented conservatively.

Main entry points: [`config.php`](https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/config.php) (Database connection), [`asiatel.sql`](https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/asiatel.sql) (Hotel database), [`admin/admin.php`](https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/admin.php) (Admin panel), [`admin/roombook.php`](https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/roombook.php) (Reservation entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer access"]
  node_login["Sign-in and signup<br/>[index.php]"]
  node_customerhome["Customer home<br/>[home.php]"]
end

subgraph group_operations["Hotel operations"]
  node_admin["Admin panel<br/>[admin.php]"]
  node_booking["Reservation entry<br/>[roombook.php]"]
  node_bookingedit["Reservation editing<br/>[roombookedit.php]"]
  node_confirmation["Reservation confirmation<br/>[roomconfirm.php]"]
  node_rooms["Room management<br/>[room.php]"]
  node_staff["Staff management<br/>[staff.php]"]
end

subgraph group_finance["Billing and reports"]
  node_dashboard["Operations dashboard<br/>[dashboard.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_runtime["Runtime data"]
  node_databaseconfig["Database connection<br/>[config.php]"]
  node_db[("Hotel database<br/>[asiatel.sql]")]
end

node_guest(("Guest"))

node_guest -->|"signs in"| node_login
node_login -->|"redirects to"| node_customerhome
node_guest -.->|"views"| node_customerhome
node_admin -->|"embeds"| node_dashboard
node_admin -->|"embeds"| node_booking
node_admin -->|"embeds"| node_payments
node_admin -->|"embeds"| node_rooms
node_admin -->|"embeds"| node_staff
node_booking -->|"inserts reservations"| node_db
node_booking -->|"reads room and payment rows"| node_db
node_bookingedit -->|"reads reservation"| node_db
node_confirmation -->|"updates reservation; inserts payment"| node_db
node_rooms -->|"manages rooms"| node_db
node_staff -->|"manages staff"| node_db
node_dashboard -->|"reads operational and payment data"| node_db
node_payments -->|"reads payment records"| node_db
node_payments -->|"links to print"| node_invoice
node_export -->|"uses connection"| node_databaseconfig
node_login -->|"uses connection"| node_databaseconfig
node_customerhome -->|"uses connection"| node_databaseconfig
node_booking -->|"uses connection"| node_databaseconfig
node_bookingedit -->|"uses connection"| node_databaseconfig
node_confirmation -->|"uses connection"| node_databaseconfig
node_rooms -->|"uses connection"| node_databaseconfig
node_staff -->|"uses connection"| node_databaseconfig
node_dashboard -->|"uses connection"| node_databaseconfig
node_payments -->|"uses connection"| node_databaseconfig
node_databaseconfig -->|"connects to"| node_db

click node_login "https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/index.php"
click node_customerhome "https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/home.php"
click node_admin "https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/admin.php"
click node_booking "https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/roombook.php"
click node_bookingedit "https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/roombookedit.php"
click node_confirmation "https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/roomconfirm.php"
click node_rooms "https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/room.php"
click node_staff "https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/staff.php"
click node_dashboard "https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/dashboard.php"
click node_payments "https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/payment.php"
click node_invoice "https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/invoiceprint.php"
click node_export "https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/exportdata.php"
click node_databaseconfig "https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/config.php"
click node_db "https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/asiatel.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_login,node_customerhome toneBlue
class node_admin,node_booking,node_bookingedit,node_confirmation,node_rooms,node_staff toneAmber
class node_dashboard,node_payments,node_invoice,node_export toneMint
class node_databaseconfig,node_db toneRose
class node_guest toneIndigo
```

## Components

### Customer access

- [Sign-in and signup](https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/index.php): `index.php`
- [Customer home](https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/home.php): `home.php`

### Hotel operations

- [Admin panel](https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/admin.php): `admin/admin.php`
- [Reservation entry](https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/roombook.php): `admin/roombook.php`
- [Reservation editing](https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/roombookedit.php): `admin/roombookedit.php`
- [Reservation confirmation](https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/roomconfirm.php): `admin/roomconfirm.php`
- [Room management](https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/room.php): `admin/room.php`
- [Staff management](https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/staff.php): `admin/staff.php`

### Billing and reports

- [Operations dashboard](https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/dashboard.php): `admin/dashboard.php`
- [Payment records](https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/payment.php): `admin/payment.php`
- [Invoice printing](https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/invoiceprint.php): `admin/invoiceprint.php`
- [Data export](https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/admin/exportdata.php): `admin/exportdata.php`

### Runtime data

- [Database connection](https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/config.php): `config.php`
- [Hotel database](https://github.com/kimsalangsang17/group-7-hotel-management-system/blob/main/asiatel.sql): `asiatel.sql`

### Other components

- **Guest**

## Connections

- Guest → Sign-in and signup: signs in (evidence: `index.php`)
- Sign-in and signup → Customer home: redirects to (evidence: `index.php`)
- Guest → Customer home: views
- Admin panel → Operations dashboard: embeds (evidence: `admin/admin.php`)
- Admin panel → Reservation entry: 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`)
- Reservation entry → Hotel database: inserts reservations (evidence: `admin/roombook.php`)
- Reservation entry → Hotel database: reads room and payment rows (evidence: `admin/roombook.php`)
- Reservation editing → Hotel database: reads reservation (evidence: `admin/roombookedit.php`)
- Reservation confirmation → Hotel database: updates reservation; inserts payment (evidence: `admin/roomconfirm.php`)
- Room management → Hotel database: manages rooms (evidence: `admin/room.php`)
- Staff management → Hotel database: manages staff (evidence: `admin/staff.php`)
- Operations dashboard → Hotel database: reads operational and payment data (evidence: `admin/dashboard.php`)
- Payment records → Hotel database: reads payment records (evidence: `admin/payment.php`)
- Payment records → Invoice printing: links to print (evidence: `admin/payment.php`)
- Data export → Database connection: uses connection (evidence: `admin/exportdata.php`)
- Sign-in and signup → Database connection: uses connection (evidence: `index.php`)
- Customer home → Database connection: uses connection (evidence: `home.php`)
- Reservation entry → Database connection: uses connection (evidence: `admin/roombook.php`)
- Reservation editing → Database connection: uses connection (evidence: `admin/roombookedit.php`)
- Reservation confirmation → Database connection: uses connection (evidence: `admin/roomconfirm.php`)
- Room management → Database connection: uses connection (evidence: `admin/room.php`)
- Staff management → Database connection: uses connection (evidence: `admin/staff.php`)
- Operations dashboard → Database connection: uses connection (evidence: `admin/dashboard.php`)
- Payment records → Database connection: uses connection (evidence: `admin/payment.php`)
- Database connection → Hotel database: connects to (evidence: `config.php`)
