Roadside Hero is a comprehensive emergency roadside assistance application that connects users with nearby service providers for towing, flat tire repair, battery jump start, fuel delivery, and lockout services.
- ๐ User Authentication (Login/Register)
- ๐ Live Location Tracking
- ๐ Service Request Forms
- Towing (10-15 mins)
- Flat Tire Repair (8 mins)
- Battery Jump Start (5-10 mins)
- Fuel Delivery (10-20 mins)
- Lockout Service (15-20 mins)
- ๐ Real-time Request Tracking
- ๐จโ๐ผ Nearby Providers Discovery
- โญ Provider Ratings & Reviews
- ๐ Request History
- ๐ค User Profile Management
- Provider Dashboard
- Status Management
- Request Acceptance System
- Real-time Tracking Updates
- Backend: PHP 7.4+
- Database: MySQL
- Frontend: HTML5, CSS3, Bootstrap 5.3
- Icons: Bootstrap Icons
- Server: XAMPP (Apache + MySQL)
- XAMPP installed and running
- MySQL running on localhost
- PHP 7.4 or higher
-
Extract the project to XAMPP
C:\xampp\htdocs\roadside_hero\ -
Create the Database
- Open phpMyAdmin:
http://localhost/phpmyadmin - Import
setup.sqlfile:- Create a new database named
roadside_hero - Go to Import tab
- Select
setup.sqland click Import
- Create a new database named
OR run via MySQL command line:
mysql -u root -p < setup.sql - Open phpMyAdmin:
-
Access the Application
- Open browser and go to:
http://localhost/roadside_hero - You'll be redirected to login page
- Click "Sign Up" to create an account
- Open browser and go to:
Sample User: (Create your own via signup)
- Email:
user@demo.com - Password:
password123
Sample Providers (in database):
- Joe's Auto Repair
- Rapid Towing Co.
- Quick Fix Services
roadside_hero/
โโโ index.php # Redirect to login/dashboard
โโโ login.php # User login page
โโโ register.php # User registration
โโโ config.php # Database config & session management
โโโ dashboard.php # Main dashboard (after login)
โโโ request_service.php # Service request form
โโโ tracking_request.php # Real-time request tracking
โโโ my_requests.php # User request history
โโโ profile.php # User profile & settings
โโโ providers.php # Browse nearby providers
โโโ logout.php # Logout & session destroy
โโโ db_connect.php # Deprecated (use config.php)
โโโ setup.sql # Database schema & sample data
โโโ README.md # This file
- id, fullname, email, password_hash, phone, latitude, longitude, location_name, created_at
- id, user_id, service_id, provider_id, vehicle_type, problem_description, photo_url, current_latitude, current_longitude, location_address, status, estimated_arrival, created_at, updated_at
- id, business_name, service_type, email, password_hash, phone, latitude, longitude, rating, reviews, status, created_at
- id, service_name, service_icon, estimated_time
- id, request_id, provider_latitude, provider_longitude, status_message, created_at
-
Register/Login
- Create account with email and password
- Login to access dashboard
-
Request Service
- Click service button on dashboard (Towing, Flat Tire, etc.)
- Fill in vehicle problem description
- Select vehicle type (Sedan, SUV, Motorcycle)
- Optionally upload issue photo
- Submit request
-
Track Request
- View real-time location of provider
- See ETA and distance
- Call provider directly
- View request details
-
View History
- Click "My Requests" to see all past requests
- View request status and details
- Click to track completed requests
-
Browse Providers
- Click "See All" on dashboard or go to providers page
- View provider ratings and reviews
- Filter by service type
- Call or book directly
Edit setup.sql to add more services:
INSERT INTO services (service_name, service_icon, estimated_time) VALUES
('Your Service', 'icon-name', 'X-Y MIN');INSERT INTO providers (business_name, service_type, email, password_hash, phone, latitude, longitude, rating, reviews, status) VALUES
('Provider Name', 'Service Type', 'email@provider.com', '$2y$10$hash', 'phone', lat, long, rating, reviews, 'available');All protected pages use requireLogin() function:
<?php
include 'config.php';
requireLogin(); // Redirects to login if not logged in
$user = getCurrentUser($conn);
?>โ Password Hashing (PASSWORD_DEFAULT) โ Prepared Statements (SQL Injection Prevention) โ Session Management โ Input Validation โ CORS-ready headers
- ๐บ๏ธ Real Google Maps Integration
- ๐ณ Payment Gateway Integration
- ๐ฑ Mobile App Version
- ๐ฎ Provider Authentication System
- โญ Review/Rating System
- ๐ Push Notifications
- ๐ฌ In-app Chat
- ๐ Analytics Dashboard
- ๐ค AI-based Provider Matching
- ๐ธ Photo Upload to Cloud Storage
- Ensure MySQL is running
- Check database credentials in
config.php - Verify database
roadside_heroexists
- Clear browser cookies
- Check email and password
- Ensure user was registered successfully
- Run
setup.sqlto populate sample data - Check services table in database
- Placeholder maps are used for demo
- Will need Google Maps API key for production
POST /api/register- User registrationPOST /api/login- User loginPOST /api/request-service- Submit service requestGET /api/tracking/{id}- Get request tracking dataGET /api/providers- Get nearby providers
- Database indexes on frequently queried fields
- Session-based caching for user data
- Prepared statements for query efficiency
- Auto-refresh on tracking page (5 seconds)
For issues or questions, please contact:
- Email: support@roadsidehero.com
- Help Page: Built-in help section in profile
Copyright ยฉ 2026 Roadside Hero. All rights reserved.
Developed with โค๏ธ for safe and efficient emergency roadside assistance
๐ Emergency Roadside Assistance - Available 24/7