A lightweight PHP & MySQL web app that lets guests reserve tables online while giving staff an easy‑to‑use admin panel for daily operations.
- 🚀 Overview
- ✨ Features
- 🛠️ Tech Stack
- 🏗️ Project Structure
- ⚙️ Installation
- 🔧 Configuration
▶️ Running the App- 📸 Screenshots
- 📄 License
| 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.
- Authentication – registration & login with encrypted passwords (password_hash).
- Reservation Search – date, time & party‑size filter; only free tables returned.
- Reservation CRUD – users can create/cancel; admins can confirm/deny.
- Admin Dashboard – total tables, reservations, status breakdown, upcoming list.
- Table Management – add/edit/delete tables with seats & location.
- Restaurant Menu – static menu page with images & prices.
- Security – CSRF tokens, prepared statements, validation helpers.
| 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) |
/ (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
- PHP ≥ 8.2 with PDO MySQL ext.
- MySQL 8 (or MariaDB 10.6+)
- Apache / Nginx configured with
DocumentRootpointing to repo root.
# 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.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',
],
];- Point your web server to the project root.
- Browse to
http://localhost/index.php→ Register or Login. - Access admin panel at
http://localhost/admin/(requiresrole = 'admin').
Dev server – If you don’t have Apache, run:
php -S localhost:8000and openhttp://localhost:8000.
Wszystkie zrzuty ekranu znajdują się w
assets/screenshots/lub na dołączonych linkach GitHub attachments. Poniżej pełna galeria (26 pozycji) pogrupowana tematycznie.
| # | Screenshot | Description |
|---|---|---|
| 1 | ![]() |
System architecture diagram |
| 2 | ![]() |
Public landing page |
| # | Screenshot | Description |
|---|---|---|
| 3 | ![]() |
Login form |
| 4 | ![]() |
Login error banner |
| 5 | ![]() |
Registration form |
| 6 | ![]() |
Registration validation |
| # | Screenshot | Description |
|---|---|---|
| 7 | ![]() |
User panel overview |
| 8 | ![]() |
Active reservations list |
| 9 | ![]() |
Reservation card details |
| 10 | ![]() |
Cancel reservation confirmation |
| # | Screenshot | Description |
|---|---|---|
| 11 | ![]() |
Search form (date · time · people) |
| 12 | ![]() |
Available tables list |
| # | Screenshot | Description |
|---|---|---|
| 13 | ![]() |
Admin dashboard KPIs |
| 14 | ![]() |
Reservations management |
| 15 | ![]() |
Reservation filters |
| 16 | ![]() |
Update reservation status |
| # | Screenshot | Description |
|---|---|---|
| 17 | ![]() |
Tables list |
| 18 | ![]() |
Edit table dialog |
| 19 | ![]() |
Delete table confirmation |
| # | Screenshot | Description |
|---|---|---|
| 20 | ![]() |
Menu page – section 1 |
| 21 | ![]() |
Menu page – section 2 |
| # | Screenshot | Description |
|---|---|---|
| 22 | ![]() |
Database ERD |
| 23 | ![]() |
Reservation status flowchart |
| 24 | ![]() |
Admin login page |
| 25 | ![]() |
Upcoming reservations widget |
Distributed under the MIT License.
Update DB creds, paths, and screenshots before pushing to production.
























