Your one-tap solution to find buses in Dhaka
A modern, full-featured bus route finder, fare calculator, and seat reservation platform built for daily commuters in Dhaka city.
OneTap Bus is a simple and reliable bus search and fare information platform designed for daily commuters in Dhaka, Bangladesh. It helps users quickly find available bus routes, bus names, and estimated fares between two locations β without any confusion.
Built with local routes and real commuting needs in mind, OneTap Bus aims to make public transport information easier to access, faster to understand, and practical for everyday travel across Dhaka.
- Search buses by source and destination stops
- Dynamic fare calculation based on distance between stops
- Student fare discount option for eligible passengers
- View the full route with all intermediate stops
- Detailed bus profile pages with image gallery
- Bus type badges (AC / Non-AC)
- Company information and route visualization
- Interactive route map powered by Leaflet.js with OpenStreetMap tiles
- Visual seat layout with real-time availability
- Interactive seat selection (Available β Selected β Booked)
- Date-based booking to prevent double reservations
- Driver seat indicator for realistic bus layout
- Credit/Debit Card payment form
- Mobile Banking support (bKash, Nagad)
- Animated payment processing with loading spinner
- Secure booking confirmation flow
- Digital e-ticket with full journey details
- QR code for ticket verification
- PDF download powered by html2pdf.js
- Passenger name, seat numbers, travel date, and route info
- Star rating system (1β5 stars)
- Written reviews with user attribution
- Average rating display on bus profiles
- Admin moderation (comment visibility toggle & deletion)
- User registration with role-based access (Passenger / Admin)
- Secure admin registration with authentication key
- Session-based login/logout
- Profile management with avatar upload
- Manage buses and routes
- View and moderate user reviews
- Toggle comment visibility
- Delete inappropriate comments
- Full English and বাΰ¦ΰ¦²ΰ¦Ύ (Bengali) language support
- Session-based language switching
- All UI strings internationalized via
lang.php
- Mobile-friendly layout with CSS media queries
- Dark-themed modern UI with glassmorphism effects
- Parallax hero sections with mouse-tracking animations
- Smooth scrolling and micro-interactions
| Layer | Technology |
|---|---|
| Frontend | HTML5, CSS3, Vanilla JavaScript |
| Backend | PHP 8.x |
| Database | MySQL / MariaDB |
| Maps | Leaflet.js + OpenStreetMap |
| PDF Generation | html2pdf.js |
| QR Codes | QR Server API |
| Server | Apache (XAMPP) |
The application uses a relational MySQL database (bus_fare) with the following tables:
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β users β β bus β β bus_company β
ββββββββββββββββ€ ββββββββββββββββ€ ββββββββββββββββ€
β id (PK) β β bus_id (PK) ββββββΆβ company_id β
β name β β name β β name β
β email β β type (ac/..) β ββββββββββββββββ
β password β β company_id β
β role β ββββββββ¬ββββββββ
ββββββββ¬ββββββββ β
β βββββββ΄βββββββββ
β β route β
β ββββββββββββββββ€
β β route_id(PK) β
β β bus_id (FK) β
β ββββββββ¬ββββββββ
β β
β ββββββββ΄ββββββββ ββββββββββββββββ
β β route_stop ββββββΆβ stop β
β ββββββββββββββββ€ ββββββββββββββββ€
β β route_id(FK) β β stop_id (PK) β
β β stop_id (FK) β β stop_name β
β β stop_order β β latitude β
β ββββββββββββββββ β longitude β
β ββββββββββββββββ
β
ββββββ΄ββββββββββ ββββββββββββββββ
β bookings β β bus_rating β
ββββββββββββββββ€ ββββββββββββββββ€
β id (PK) β β id (PK) β
β user_id (FK) β β user_id (FK) β
β bus_id (FK) β β bus_id (FK) β
β seat_number β β rating β
β booking_date β β comment β
β source_id β β created_at β
β dest_id β ββββββββββββββββ
ββββββββββββββββ
ββββββββββββββββ
β fare_policy β
ββββββββββββββββ€
β id (PK) β
β base_fare β
β per_stop β
β student_disc β
ββββββββββββββββ
- XAMPP (Apache + MySQL + PHP)
- PHP 8.0 or higher
- MySQL / MariaDB
- A modern web browser
-
Clone the repository
git clone https://github.com/akiibot/OneTap-Bus.git
-
Move to your web server directory
# Move or clone directly into htdocs mv OneTap-Bus /path/to/xampp/htdocs/OneTap-Bus -
Create the database
CREATE DATABASE bus_fare CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-
Import the schema
mysql -u root -p bus_fare < schema_dump.sql -
Configure database connection
Editdb.phpif your MySQL credentials differ from the defaults:define('DB_HOST', 'localhost'); define('DB_USER', 'root'); define('DB_PASS', ''); define('DB_NAME', 'bus_fare');
-
Start XAMPP (Apache + MySQL)
-
Visit the app
http://localhost/OneTap-Bus/
OneTap-Bus/
βββ admin/ # Admin panel pages
β βββ buses.php # Bus management
β βββ dashboard.php # Admin dashboard
β βββ header.php # Admin header/nav
β βββ routes.php # Route management
βββ assets/
β βββ buses/ # Bus images (per bus ID)
β βββ images/ # Site images (hero, team, icons)
β βββ default-avatar.png # Default user avatar
βββ db.php # Database connection config
βββ lang.php # Bilingual language strings (EN/BN)
βββ header.php # Global header & navigation
βββ footer.php # Global footer
βββ index.php # Homepage (search + bus list)
βββ result.php # Search results page
βββ bus.php # Bus profile (gallery, map, seats, reviews)
βββ payment.php # Payment gateway (card + mobile banking)
βββ book_seat.php # Booking API endpoint
βββ ticket.php # E-ticket display + PDF download
βββ my_bookings.php # User booking history
βββ signin.php # Login page
βββ sign-up.php # Registration page
βββ about.php # About page with team section
βββ rate_bus.php # Review submission handler
βββ fetch_seats.php # Seat availability API
βββ schema_dump.sql # Full database schema
βββ style.css # Main stylesheet
βββ auth.css # Authentication pages styles
βββ parallax.js # Parallax effect script
| Member | Role |
|---|---|
| Yeanul Haque Khan Akib | Developer |
| Sumaiya Islam Aritra | Developer |
| Tahmid Islam | Developer |
This project is open source and available under the MIT License.
Made with β€οΈ for the commuters of Dhaka π§π©