PHP · MySQL · Docker — a complete rental platform with customer booking management, administrator controls, vehicle management, and containerized deployment.
- Project Overview
- Features
- User Roles
- Database Design
- Tech Stack
- Local Development
- Folder Structure
- Installation
- Database Setup
- Default Login Credentials
- Screenshots
- Future Improvements
- License
- Author
GreenCrescent Rentals is a web-based car rental management system built to streamline vehicle rental operations through a single, centralized platform.
The system is organized around two core interfaces:
| Interface | Purpose |
|---|---|
| 🧑💼 Customer Portal | Browse available vehicles, create bookings, manage reservations, and track booking status |
| 🛠️ Administrator Dashboard | Manage vehicles, fares, bookings, and overall rental operations |
The project follows a structured backend/frontend separation, integrates with a MySQL database, and supports containerized deployment via Docker.
Originally developed as an academic project, it has since been refined with:
- ✨ Improved UI consistency
- 🗂️ Organized project structure
- 🧭 Clean navigation flow
- 🐳 Docker deployment support
- 📄 Production-oriented documentation
- User registration and authentication
- Personalized customer dashboard
- Browse available vehicles
- View detailed vehicle information
- Submit rental bookings
- View personal booking history
- Cancel bookings
- Track real-time booking status
- Secure admin authentication
- Centralized admin dashboard
- Vehicle management
- Add vehicles
- Edit vehicle information
- Delete vehicles
- View vehicle listings
- Booking management
- View customer bookings
- Update booking status
- Manage rental requests
- Fare management
- Add rental pricing
- Update fare records
- Maintain pricing information
- Role-based access control
- Session-based authentication
- MySQL relational database
- Dynamic booking calculations
- Reusable frontend components
- Responsive interface
- Dockerized application deployment
Register
↓
Login
↓
Browse Vehicles
↓
Create Booking
↓
Track / Manage Reservations
Login
↓
Access Dashboard
↓
Manage Vehicles
↓
Manage Bookings
↓
Manage Rental Fares
The project uses a relational MySQL database containing entities for:
- 👤 Users
- 🚘 Vehicles
- 📖 Bookings
- 💰 Fare Management
Database relationships and structure are documented in the entity-relationship diagram:
| Technology | Purpose |
|---|---|
| 🐘 PHP 8.2 | Server-side application logic |
| 🗃️ MySQL | Database management |
| 🔌 MySQLi | Database communication |
| 🌐 Apache | Web server |
| Technology | Purpose |
|---|---|
| 📄 HTML5 | Page structure |
| 🎨 CSS3 | Styling and layouts |
| ⚡ JavaScript | Client-side interactions |
| Technology | Purpose |
|---|---|
| 🐳 Docker | Application containerization |
| 🧩 Docker Compose | Multi-container orchestration |
| 🌐 Apache PHP Image | Web runtime environment |
| 🗄️ MySQL Docker Image | Database container |
Supported environments:
- 🐳 Docker Compose (recommended)
- 🧡 XAMPP (Apache + MySQL)
Docker deployment allows the project to run without manually installing PHP, Apache, or MySQL on your machine.
The project follows a clear separation between application logic, frontend pages, database scripts, and deployment configuration.
GreenCrescent_Rentals
│
├── backend
│ │
│ ├── auth
│ │ ├── admin_guard.php
│ │ ├── customer_guard.php
│ │ └── session_init.php
│ │
│ ├── db
│ │ └── db_connect.php
│ │
│ └── users
│ ├── login.php
│ ├── logout.php
│ └── register.php
│
├── frontend
│ │
│ ├── admin
│ │ ├── bookings
│ │ │ ├── manage_bookings.php
│ │ │ ├── update_booking.php
│ │ │ └── view_bookings.php
│ │ │
│ │ ├── cars
│ │ │ ├── add_car.php
│ │ │ ├── delete_car.php
│ │ │ ├── edit_car.php
│ │ │ └── list_cars.php
│ │ │
│ │ ├── fares
│ │ │ ├── add_fare.php
│ │ │ └── manage_fares.php
│ │ │
│ │ ├── common
│ │ │ └── navbar.php
│ │ │
│ │ └── dashboard.php
│ │
│ ├── customer
│ │ ├── bookings
│ │ │ ├── book_car.php
│ │ │ ├── book_form.php
│ │ │ ├── cancel_booking.php
│ │ │ └── my_bookings.php
│ │ │
│ │ ├── cars
│ │ │ └── browse_cars.php
│ │ │
│ │ ├── dashboard.php
│ │ └── register.html
│ │
│ ├── common
│ │ ├── header.php
│ │ ├── navbar.php
│ │ └── footer.php
│ │
│ ├── css
│ │ └── style.css
│ │
│ └── images
│
├── sql
│ ├── green_crescent_schema.sql
│ └── sample_data.sql
│
├── docs
│ └── ER_diagram.png
│
├── Dockerfile
├── docker-compose.yml
├── .dockerignore
├── .gitignore
└── index.php
Docker provides a complete, self-contained environment including PHP, Apache, and the MySQL database.
Prerequisites
Install Docker Desktop, then verify:
docker --version
docker compose versionClone the repository
git clone https://github.com/waizlab/GreenCrescent_Rentals.git
cd GreenCrescent_RentalsStart the application
docker compose up --buildThe application will be available at:
| Service | URL |
|---|---|
| 🌐 Frontend | http://localhost:8080 |
| 🗄️ Database | localhost:3307 |
Stop the application
docker compose downReset the database completely
If the database initialization needs to run again:
docker compose down -v
docker compose up --buildThis removes the existing MySQL volume and recreates the database from the SQL scripts.
Requirements
- XAMPP
- PHP 8+
- MySQL
Setup Steps
- Copy the
GreenCrescent_Rentalsproject folder intoxampp/htdocs/ - Start Apache and MySQL from the XAMPP control panel
- Create a database named
GreenCrescent_Rentals - Import the schema:
sql/green_crescent_schema.sql - (Optional) Import sample data:
sql/sample_data.sql - Open the application:
http://localhost/GreenCrescent_Rentals/
The application uses MySQL as its database engine.
- Database name:
GreenCrescent_Rentals
The Docker setup automatically executes sql/green_crescent_schema.sql during first database creation.
Sample records can optionally be loaded using sql/sample_data.sql.
Database connection settings are managed in:
backend/db/db_connect.php
For Docker, connection values are loaded via environment variables:
| Variable | Description |
|---|---|
DB_HOST |
Database host |
DB_USER |
Database username |
DB_PASSWORD |
Database password |
DB_NAME |
Database name |
DB_PORT |
Database port |
For local XAMPP usage, update these connection values according to your own MySQL configuration.
| Field | Value |
|---|---|
admin@greencrescent.com |
|
| Password | admin321 |
Customers can create their own accounts through:
frontend/customer/register.html
or by registering directly through the application interface.
Screenshots demonstrating the application interface are stored in
docs/screenshots/.
docs/
│
├── ER_diagram.png
│
└── screenshots/
├── login.png
├── customer-dashboard.png
├── available_cars.png
├── admin-dashboard.png
├── vehicle-management.png
└── booking-management.png
Planned enhancements for upcoming versions:
- Replace plain-text password storage with hashed passwords using
password_hash()andpassword_verify() - Move sensitive database credentials into environment configuration files
- (Add planned features here)
This project is licensed under the MIT License. See the LICENSE file for details.
Muhammad Waiz Computer Science Undergraduate — Bahria University, Karachi Campus
⭐ If you find this project useful, consider giving it a star on GitHub!





