A full-featured web-based vehicle parking management and slot reservation portal built with PHP Native, MySQL, and Chart.js. The platform provides role-based access control, an interactive graphical parking layout (denah), audit logging, and analytical visualization of parking spot occupancy.
flowchart TD
User["Vehicle Owner / User"] -->|Register / Login| Auth["Authentication System (config.php)"]
Admin["System Administrator"] -->|Admin Credentials| Auth
Auth -->|Role: User| UserDashboard["User Dashboard (user_page.php)"]
Auth -->|Role: Admin| AdminDashboard["Admin Dashboard (admin_page.php)"]
UserDashboard --> Denah["Interactive Slot Selector (denah.php)"]
Denah -->|Assign Slot & Log Plate| DB[("MySQL Database (user_db)")]
AdminDashboard --> Analytics["Occupancy Analytics (graphic.php via Chart.js)"]
AdminDashboard --> History["Vehicle Parking Logs (history.php)"]
AdminDashboard --> CRUD["User & Slot Management (modul/edit.php, delete.php)"]
Analytics --> DB
History --> DB
CRUD --> DB
- Role-Based Access Control (RBAC):
- Admin Portal: High-level administrative control, vehicle registration logs, slot release, and real-time analytical charts.
- User Portal: Personalized dashboard displaying vehicle plate number, active parking slot reservation, and check-in/check-out actions.
- Interactive Visual Denah:
- Interactive seat/slot layout allowing drivers to claim available slots in real time.
- Prevents slot double-booking by locking claimed areas to registered license plates (
plat).
- Occupancy Analytics:
- Integrated Chart.js telemetry illustrating real-time parking density and slot availability.
- Audit Trail & History:
- Historical record of vehicle check-ins with timestamps (
riwayat_parkir).
- Historical record of vehicle check-ins with timestamps (
The system operates on the user_db relational database with two core entities:
user_db
├── user_form # User credentials, license plate (plat), role, and active assigned slot (area)
└── riwayat_parkir # Immutable log of vehicle parking transactions (plat, area, timestamp)
| Table | Column | Type | Description |
|---|---|---|---|
user_form |
id |
INT AUTO_INCREMENT PRIMARY KEY |
Unique account identifier |
user |
VARCHAR(100) |
Username / display name | |
plat |
VARCHAR(20) UNIQUE |
Vehicle license plate number | |
password |
VARCHAR(255) |
Encrypted account password (MD5) | |
user_type |
ENUM('admin', 'user') |
Access control role | |
area |
VARCHAR(50) NULL |
Currently occupied parking slot ID | |
riwayat_parkir |
id |
INT AUTO_INCREMENT PRIMARY KEY |
Audit record identifier |
plat |
VARCHAR(20) |
Parked vehicle license plate | |
area |
VARCHAR(50) |
Occupied parking slot code | |
waktu |
TIMESTAMP |
Check-in timestamp |
smart-parking-reservation-system/
├── admin_page.php # Admin control center and navigation hub
├── user_page.php # Vehicle owner reservation interface
├── login_form.php # Authentication login endpoint
├── register_form.php # Account registration with vehicle plate binding
├── logout_form.php # Session termination
├── config.php # MySQL database connection configuration
├── script.js # Frontend client interactivity
├── css/ # Custom stylesheets (style.css, style1.css, style2.css)
├── images/ # Graphical assets and layout graphics
├── database/
│ └── schema.sql # DDL and sample seed records
├── konten/
│ ├── denah.php # Interactive parking slot layout & assignment logic
│ ├── graphic.php # Chart.js visualization of parking occupancy
│ └── history.php # Historical parking log table
└── modul/
├── edit.php # Record modification endpoint
├── delete.php # User / slot release deletion endpoint
└── exit.php # Session destroy helper
- Web Server: Apache (via XAMPP, Laragon, WampServer, or native Apache2)
- PHP: 7.4+ or 8.x
- Database: MySQL 5.7+ or MariaDB
- Open phpMyAdmin or MySQL CLI.
- Import the schema file located at
database/schema.sql:(This creates themysql -u root -p < database/schema.sql
user_dbdatabase, required tables, and default seed accounts).
Edit config.php to match your local database credentials if needed:
<?php
$conn = mysqli_connect('localhost', 'root', '', 'user_db');
?>-
Using XAMPP / Laragon: Place this repository inside
htdocs/smart-parking-reservation-system(orwww/), then visit:http://localhost/smart-parking-reservation-system/login_form.php -
Using PHP Built-in Server:
cd smart-parking-reservation-system php -S localhost:8000Then open
http://localhost:8000/login_form.phpin your browser.
- Admin: Username:
Admin| Plate:B1234ADM| Password:admin123 - User: Username:
Demo User| Plate:B5678XYZ| Password:admin123
Zeiniah (@zeyniaa)
AI & Backend Engineer