Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

VEHICLE_RENTAL_SYSTEM

A comprehensive web-based vehicle rental platform built with PHP, MySQL, and Python, supporting multiple vehicle types (cars, bikes, buses, boats, trucks) with advanced features like fraud detection, location-based booking, driver management, and dynamic pricing.

πŸš€ Features

Core Features

  • Multi-Vehicle Support: Rent cars, bikes, buses, boats, and trucks
  • User Management: Customer registration, login, profile management
  • Driver Management: Driver registration, verification, and dashboard
  • Provider System: Vehicle provider accounts with vehicle management
  • Location-Based Booking: Hub-based vehicle availability and location filtering
  • Dynamic Pricing: Real-time pricing based on vehicle availability
  • Receipt Generation: Digital receipts with secure tokens

Advanced Features

  • Fraud Detection: ML-based fraud detection system with Flask backend
  • Payment Processing: Secure payment gateway integration
  • Admin Dashboard: Comprehensive admin controls and management
  • Booking Management: Full booking lifecycle management
  • User Communications: In-app messaging and notifications
  • Demand Forecasting: Data-driven insights for vehicle demand

πŸ“‹ Requirements

System Requirements

  • PHP: 7.4 or higher
  • MySQL: 5.7 or higher
  • Python: 3.8 or higher (for ML services)
  • Web Server: Apache with mod_rewrite enabled
  • OS: Windows, Linux, or macOS

Required PHP Extensions

  • MySQLi (mysqli)
  • PDO
  • Session support
  • JSON support

Python Dependencies

  • Flask 2.3.0+
  • scikit-learn
  • pandas
  • numpy
  • python-dotenv

πŸ”§ Installation

Step 1: Clone the Repository

git clone https://github.com/yourusername/VEHICLE_RENTAL_SYSTEM.git
cd VEHICLE_RENTAL_SYSTEM

Step 2: Configure the Database

  1. Open phpMyAdmin or MySQL client
  2. Create a new database:
CREATE DATABASE vehicle_rental_system;
  1. Import the database schema:
mysql -u root -p vehicle_rental_system < database/database_complete.sql

Step 3: Configure PHP Application

  1. Copy the database configuration:
cp includes/config_example.php includes/config.php
  1. Edit includes/config.php with your database credentials:
$db_host = "localhost";
$db_user = "root";
$db_password = "your_password";
$db_name = "vehicle_rental_system";
  1. Copy settings file (if needed):
cp settings.json.example settings.json

Step 4: Setup Python ML Service (Optional)

  1. Navigate to fraud detection ML directory:
cd fraud_detection_ml
  1. Create Python virtual environment:
python -m venv venv
  1. Activate virtual environment:
# Windows
venv\Scripts\activate

# Linux/Mac
source venv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Configure environment:
cp .env.example .env
# Edit .env with your database credentials
  1. Start the fraud detection service:
python app.py

The service will run on http://localhost:5001

Step 5: Configure Web Server

Apache Configuration (add to your .htaccess or virtual host):

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /VEHICLE_RENTAL_SYSTEM/
    
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /VEHICLE_RENTAL_SYSTEM/index.php [L]
</IfModule>

Step 6: Create Required Directories

mkdir -p uploads/user_photos
mkdir -p uploads/user_documents
mkdir -p uploads/provider_documents
mkdir -p uploads/driver_documents
chmod 755 uploads/*

Step 7: Start the Application

  1. Start Apache and MySQL services
  2. Navigate to: http://localhost/VEHICLE_RENTAL_SYSTEM/

πŸ“ Project Structure

VEHICLE_RENTAL_SYSTEM/
β”œβ”€β”€ admin/                          # Admin panel and management
β”‚   β”œβ”€β”€ index.php                  # Admin dashboard
β”‚   β”œβ”€β”€ driver_management.php      # Driver management
β”‚   β”œβ”€β”€ fraud_detection.php        # Fraud detection panel
β”‚   β”œβ”€β”€ bookings.php               # Booking management
β”‚   β”œβ”€β”€ messages.php               # Message management
β”‚   └── ...
β”‚
β”œβ”€β”€ fraud_detection_ml/            # Python ML Service
β”‚   β”œβ”€β”€ app.py                     # Flask API server
β”‚   β”œβ”€β”€ train_model.py             # Model training script
β”‚   β”œβ”€β”€ requirements.txt           # Python dependencies
β”‚   β”œβ”€β”€ .env.example               # Environment template
β”‚   └── ...
β”‚
β”œβ”€β”€ includes/                      # PHP includes & utilities
β”‚   β”œβ”€β”€ config.php                 # Database configuration
β”‚   β”œβ”€β”€ session_helper.php         # Session management
β”‚   β”œβ”€β”€ fraud_detection_service.php # Fraud detection interface
β”‚   β”œβ”€β”€ location_helper.php        # Location & hub utilities
β”‚   └── ...
β”‚
β”œβ”€β”€ database/                      # Database migration files
β”‚   β”œβ”€β”€ database_complete.sql      # Main database schema
β”‚   β”œβ”€β”€ add_driver_system.sql      # Driver system schema
β”‚   β”œβ”€β”€ add_receipt_system.sql     # Receipt system schema
β”‚   └── ...
β”‚
β”œβ”€β”€ uploads/                       # User uploaded files
β”‚   β”œβ”€β”€ user_photos/               # User profile photos
β”‚   β”œβ”€β”€ user_documents/            # User KYC documents
β”‚   β”œβ”€β”€ provider_documents/        # Provider documents
β”‚   └── driver_documents/          # Driver documents
β”‚
β”œβ”€β”€ js/                            # JavaScript files
β”‚   β”œβ”€β”€ jquery.js                  # jQuery library
β”‚   └── main.js                    # Main scripts
β”‚
β”œβ”€β”€ img/                           # Images & assets
β”‚   β”œβ”€β”€ logo.png                   # Application logo
β”‚   β”œβ”€β”€ hero.jpg                   # Hero images
β”‚   └── ...
β”‚
β”œβ”€β”€ fonts/                         # Custom fonts
β”œβ”€β”€ cars/                          # Car-specific resources
β”‚
β”œβ”€β”€ User Interfaces/
β”‚   β”œβ”€β”€ index.php                  # Home page
β”‚   β”œβ”€β”€ login.php                  # User login
β”‚   β”œβ”€β”€ signup.php                 # User registration
β”‚   β”œβ”€β”€ dashboard.php              # User dashboard
β”‚   β”œβ”€β”€ cars.php                   # Car listing
β”‚   β”œβ”€β”€ bikes.php                  # Bike listing
β”‚   β”œβ”€β”€ buses.php                  # Bus listing
β”‚   β”œβ”€β”€ boats.php                  # Boat listing
β”‚   β”œβ”€β”€ trucks.php                 # Truck listing
β”‚   β”œβ”€β”€ book_car.php               # Car booking
β”‚   β”œβ”€β”€ book_bike.php              # Bike booking
β”‚   β”œβ”€β”€ receipt.php                # Receipt display
β”‚   └── ...
β”‚
β”œβ”€β”€ Provider Interfaces/
β”‚   β”œβ”€β”€ provider_login.php         # Provider login
β”‚   β”œβ”€β”€ provider_signup.php        # Provider registration
β”‚   β”œβ”€β”€ provider_dashboard.php     # Provider dashboard
β”‚   β”œβ”€β”€ provider_request_vehicle.php # Vehicle requests
β”‚   └── ...
β”‚
β”œβ”€β”€ Driver Interfaces/
β”‚   β”œβ”€β”€ driver_login.php           # Driver login
β”‚   β”œβ”€β”€ driver_signup.php          # Driver registration
β”‚   β”œβ”€β”€ driver_dashboard.php       # Driver dashboard
β”‚   └── ...
β”‚
β”œβ”€β”€ db.php                         # Database connection
β”œβ”€β”€ header.php                     # Header include
β”œβ”€β”€ footer.php                     # Footer include
└── README.md                      # This file

πŸ” Default Credentials

Admin Login

  • URL: http://localhost/VEHICLE_RENTAL_SYSTEM/Adminlogin.php
  • Default Username: admin
  • Default Password: admin123

Note: Change default credentials immediately after setup

πŸ“ Configuration Files

includes/config.php

Database connection configuration:

$db_host = "localhost";      // MySQL host
$db_user = "root";           // MySQL user
$db_password = "";           // MySQL password
$db_name = "vehicle_rental_system"; // Database name

fraud_detection_ml/.env

ML service configuration:

FLASK_ENV=production
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=
DB_NAME=vehicle_rental_system
DB_PORT=3306
LOG_LEVEL=INFO

πŸ—‚οΈ Database Schema

The application uses the following main tables:

  • users - Customer accounts
  • providers - Vehicle provider accounts
  • drivers - Driver accounts
  • cars, bikes, buses, boats, trucks - Vehicle inventory
  • bookings - Booking records
  • payments - Payment transactions
  • admin - Admin accounts
  • hubs - Location hubs for vehicle availability
  • contact_messages - Contact form submissions

See database/ directory for complete schema files.

πŸš— Vehicle Management

Adding Vehicles

  1. Admin Panel β†’ Add Vehicle
  2. Select vehicle type (Car, Bike, Bus, Boat, Truck)
  3. Enter vehicle details, pricing, and hub location
  4. Upload vehicle images
  5. Submit for approval

Vehicle Status

  • Available - Can be booked
  • Assigned - Currently booked
  • Maintenance - Not available
  • Archived - Removed from inventory

πŸ’³ Payment Processing

The system includes payment gateway integration:

  • Credit/Debit card payments
  • Secure payment processing
  • Receipt generation and storage
  • Payment history tracking

πŸ” Admin Features

Dashboard

  • Overview statistics
  • Recent bookings
  • Active users and drivers
  • Revenue analytics

User Management

  • View and manage customer accounts
  • Approve/reject registrations
  • Handle user disputes

Vehicle Management

  • Add/edit/delete vehicles
  • Set pricing and availability
  • Manage vehicle status

Driver Management

  • Approve driver registrations
  • Verify driver documents
  • Assign vehicles to drivers
  • Track driver performance

Fraud Detection

  • Real-time fraud alerts
  • Suspicious transaction flagging
  • Booking pattern analysis
  • ML-based risk scoring

πŸ“Š Fraud Detection System

Features

  • Real-time transaction analysis
  • Machine learning-based risk assessment
  • Pattern recognition for suspicious bookings
  • Automated alerts and reporting

Running ML Service

cd fraud_detection_ml
python app.py

Service endpoints:

  • POST /api/analyze - Analyze booking for fraud
  • GET /api/health - Service health check

🌐 API Endpoints

Booking API

  • POST /confirm_booking.php - Create new booking
  • GET /receipt.php - Get booking receipt
  • POST /process_payment.php - Process payment

Driver API

  • POST /driver_signup.php - Driver registration
  • POST /driver_login.php - Driver authentication
  • GET /driver_dashboard.php - Driver info

Provider API

  • POST /provider_signup.php - Provider registration
  • GET /provider_dashboard.php - Provider info
  • POST /provider_request_vehicle.php - Request vehicle

πŸ§ͺ Testing

Test Payment

Visit: http://localhost/VEHICLE_RENTAL_SYSTEM/test_payment.php

This page allows testing the payment system without making real transactions.

πŸ› Troubleshooting

Database Connection Error

  • Verify MySQL is running
  • Check credentials in includes/config.php
  • Ensure database exists

Payment Processing Issues

  • Check payment gateway configuration
  • Verify HTTPS is enabled
  • Check firewall rules

ML Service Not Responding

  • Verify Python installation
  • Check if service is running on port 5001
  • Review error logs in fraud_detection_ml/logs/

File Upload Issues

  • Verify uploads/ directory permissions (755)
  • Check PHP upload size limits in php.ini
  • Ensure directories are writable

πŸ“§ Contact & Support

πŸ“„ License

This project is licensed under the MIT License - see LICENSE file for details.

πŸ‘₯ Contributors

  • Lead Developer: Sanket Kanase
  • Contributors: Tejaswini Mule Vaishnavi Mali Pradnya Nikam

πŸ”„ Version History

v1.0.0 (Current)

  • βœ… Core rental system
  • βœ… Multi-vehicle support
  • βœ… Driver management
  • βœ… Provider system
  • βœ… Fraud detection ML
  • βœ… Admin dashboard
  • βœ… Location-based booking

Planned Features

  • Mobile app (iOS/Android)
  • Advanced analytics
  • Vehicle tracking (GPS)
  • Subscription plans
  • Insurance integration
  • Multi-language support

πŸ” Security Notes

⚠️ Important Security Considerations:

  1. Change Default Credentials: Update admin/user default passwords immediately
  2. Enable HTTPS: Use SSL/TLS certificates in production
  3. Input Validation: All user inputs are validated on both client and server
  4. SQL Injection Prevention: Using prepared statements throughout
  5. Session Security: Implement secure session handling
  6. File Uploads: Restricted file types and secure storage
  7. API Security: Implement rate limiting and API authentication
  8. Environment Variables: Never commit .env files with real credentials

Secrets and Environment Variables

  • Do not commit API keys or secrets. Store secrets in environment variables or a secure secrets manager.
  • Example: set HF_API_KEY for the chatbot service and never hard-code it in chatbot.php.
  • Use the provided .env.example as a template and add a .env file locally. .env is excluded by .gitignore.
  • If a secret is accidentally committed, rotate it immediately and remove it from history (we can help with that).

πŸ“š Documentation

For detailed documentation:

  • Admin Guide: See Guids/ directory
  • Driver System: Guids/DRIVER_SYSTEM_QUICK_START.md
  • Receipt System: Guids/RECEIPT_SYSTEM_COMPLETE.md
  • Location-Based Booking: Guids/LOCATION_BASED_BOOKING_GUIDE.md

🎯 Getting Started Checklist

  • Clone repository
  • Setup MySQL database
  • Configure database credentials
  • Create upload directories
  • Configure web server
  • Test home page access
  • Create test admin account
  • Test user registration
  • Test vehicle booking
  • Setup and test ML service
  • Review security settings
  • Deploy to production

Made with ❀️ by ZHOOMiGO

Last Updated: May 2026

About

AI-powered Vehicle Rental System with smart recommendations, dynamic pricing, fraud detection, booking management, and modern web interface using PHP, MySQL, Python, and Machine Learning.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages