How prog-amin/hotel-booking-system works
Project Type and Purpose
• This is a monolithic, full-stack web application: a Hotel Booking System written in PHP with a MySQL database and HTML/CSS/JS front end.
• Purpose: allow customers to browse and book rooms, view histories and invoices, and provide staff/admin panels for management, inventory, and reporting.
File Structure
• Frontend Pages (HTML/CSS/JS): hindex.html, about.html, contact.html, INVENTORY.HTML
• Authentication (PHP): login.php, signup.php, staffadmission.php
• Booking System (PHP): room_available.php, booking.php, submit_booking.php, room_pref.php, invoice2.php
• History & Reports (PHP): booking_history.php, personal_history.php, preferences_history.php
• Admin Panel (PHP): Emp_index.php, customer_management.php, staff_overtime.php
• Configuration: Db.php (database connection)
• Assets: images/
README for Insights
• Tech stack: Apache/PHP backend, HTML5/CSS3/JS front end, MySQL database.
• Database schema: users, rooms, bookings, staff, preferences, invoices.
• Features are grouped by user role (Customer vs. Admin/Staff).
Main Components & Their Relationships
a. End-Users (Actors)
• Customer (browser)
• Staff/Admin (browser)
b. Presentation Layer
• Static HTML/CSS/JS pages served by Apache
• Interactive PHP pages handling form inputs
c. Application Layer (PHP Modules)
• Authentication Module
• Booking Module
• History & Reporting Module
• Admin Panel Module
• Configuration Module (Db.php)
d. Data Layer
• MySQL Database (six main tables)
• Assets store (images folder)
e. External Dependencies
• XAMPP/WAMP environment (Apache + MySQL)
Relationship Flow:
Browser → Apache Web Server → PHP Application Modules → MySQL Database
PHP modules read/write to DB and fetch assets from file storage.
Architectural Patterns & Design Principles
• Monolithic, layered architecture:
• Presentation → Application → Data
• Separation of concerns: each PHP directory/module handles a distinct feature set.
• Single point of configuration (Db.php).
• Role-based access: user vs. admin pages.