Skip to content

Adrianowsski/TableReservationSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

PHP MySQL Bootstrap License: MIT

🍽️ Table Reservation System – Restaurant

A lightweight PHP & MySQL web app that lets guests reserve tables online while giving staff an easy‑to‑use admin panel for daily operations.


📌 Table of Contents


🚀 Overview

Role Capabilities
Guest - Search for available tables
- Book & cancel reservations
- View personal bookings & profile
Admin - Approve / cancel reservations
- CRUD of tables
- Dashboard KPIs & statistics

The app follows a modular MVC‑lite structure (no framework), secured with sessions, CSRF tokens & password hashing.


✨ Features

  1. Authentication – registration & login with encrypted passwords (password_hash).
  2. Reservation Search – date, time & party‑size filter; only free tables returned.
  3. Reservation CRUD – users can create/cancel; admins can confirm/deny.
  4. Admin Dashboard – total tables, reservations, status breakdown, upcoming list.
  5. Table Management – add/edit/delete tables with seats & location.
  6. Restaurant Menu – static menu page with images & prices.
  7. Security – CSRF tokens, prepared statements, validation helpers.

🛠️ Tech Stack

Layer Technology
Backend PHP 8.2 (PDO)
Database MySQL 8 (InnoDB)
Frontend HTML 5, Bootstrap 5, JS
Security PHP Sessions, CSRF, bcrypt
Charts Chart.js (dashboard stats)

🏗️ Project Structure

/ (docroot)
├─ admin/
│  ├─ index.php          # dashboard
│  ├─ reservations.php   # manage bookings
│  ├─ tables.php         # tables list
│  ├─ edit_table.php
│  └─ delete_table.php
├─ user/
│  ├─ index.php          # user panel
│  └─ cancel.php         # cancel booking
├─ includes/
│  ├─ config.php         # DB creds & constants
│  ├─ functions.php      # helper utilities
│  ├─ validation.php     # input validation
│  ├─ messages.php       # flash messages
│  └─ time_options.php   # 15‑min slot generator
├─ reservations.php      # search & book page
├─ menu.php              # restaurant menu
├─ login.php
├─ register.php
└─ assets/               # CSS, JS, images

⚙️ Installation

🔑 Prerequisites

  • PHP ≥ 8.2 with PDO MySQL ext.
  • MySQL 8 (or MariaDB 10.6+)
  • Apache / Nginx configured with DocumentRoot pointing to repo root.

🏃‍♂️ Quick Start

# 1  Clone repository
 git clone https://github.com/YourUsername/TableReservationSystem.git
 cd TableReservationSystem

# 2  Import database
 mysql -u root -p < database/schema.sql

# 3  Configure creds
 cp includes/config.sample.php includes/config.php
 nano includes/config.php   # DB_USER, DB_PASS, OPENING_HOURS, etc.

🔧 Configuration

includes/config.php example:

return [
  'db' => [
    'host' => '127.0.0.1',
    'name' => 'restaurant',
    'user' => 'root',
    'pass' => 'secret',
    'charset' => 'utf8mb4',
  ],
  'opening_hours' => [
    'start' => '13:00',
    'end'   => '22:00',
  ],
];

▶️ Running the App

  1. Point your web server to the project root.
  2. Browse to http://localhost/index.php → Register or Login.
  3. Access admin panel at http://localhost/admin/ (requires role = 'admin').

Dev server – If you don’t have Apache, run: php -S localhost:8000 and open http://localhost:8000.


📸 Screenshots

Wszystkie zrzuty ekranu znajdują się w assets/screenshots/ lub na dołączonych linkach GitHub attachments. Poniżej pełna galeria (26 pozycji) pogrupowana tematycznie.

1 · Architecture & Landing

# Screenshot Description
1 System architecture diagram
2 Public landing page

2 · Authentication

# Screenshot Description
3 Login form
4 Login error banner
5 Registration form
6 Registration validation

3 · User Dashboard

# Screenshot Description
7 User panel overview
8 Active reservations list
9 Reservation card details
10 Cancel reservation confirmation

4 · Reservation Flow

# Screenshot Description
11 Search form (date · time · people)
12 Available tables list

5 · Admin – Dashboard & Reservations

# Screenshot Description
13 Admin dashboard KPIs
14 Reservations management
15 Reservation filters
16 Update reservation status

6 · Admin – Tables

# Screenshot Description
17 Tables list
18 Edit table dialog
19 Delete table confirmation

7 · Menu Pages

# Screenshot Description
20 Menu page – section 1
21 Menu page – section 2

8 · Database & Misc

# Screenshot Description
22 Database ERD
23 Reservation status flowchart
24 Admin login page
25 Upcoming reservations widget

📄 License

Distributed under the MIT License.


Update DB creds, paths, and screenshots before pushing to production.

About

The application allows users to make table reservations at a restaurant through a web browser. The system supports login, registration, reservation management (CRUD operations), and features a dedicated admin panel for managing reservations and tables.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors