Fleet Management is a web application (bus-booking system) to enable users to search through trips and book seats, This project provides some features such as:
- API Endpoints for users to book and search for available seats.
- Docker containerized app that runs per one command.
- Powerful authentication system using JWT Auth and cache storage.
- Robust front-end UI/UX using AlpineJS.
- MySQL Relational Database
Fleet Management provides registration form for users to create their accounts and track their bookings.
- Admin Account:
admin@gmail.com
& Password:Nady_1234
- Normal Account:
normal@gmail.com
& Password:password
- Laravel 8
- AlpineJs
- Boostrap 4
- Yajra Laravel DataTables
- Select2 Live Search
- JWT Auth
I uses this pseudo-code to filter through the stops that passenger will pass through his trip.
$ride = ['start' => 2, 'end' => 4];
$trips_i_will_see = [];
$trips_i_wont_see = [];
$stations = [1, 2, 3, 4];
$stations_count = count($stations);
for ($i = 0; $i < $stations_count; $i++) {
for ($x = $i; $x < $stations_count; $x++) {
if ($i == $x) {
continue;
}
if (
($stations[$i] <= $ride['start'] && $stations[$x] <= $ride['start']) ||
($stations[$i] >= $ride['end'] && $stations[$x] >= $ride['end'])
) {
$trips_i_wont_see[] = ['start' => $stations[$i], 'end' => $stations[$x]];
continue;
}
$trips_i_will_see[] = ['start' => $stations[$i], 'end' => $stations[$x]];
}
}
dd($trips_i_will_see, $trips_i_wont_see);
- Clone this project
git clone corecave/fleet fleet
- Build App:
sudo docker-compose up -d
- Go to: http://127.0.0.1:8000
- Login using test accounts listed above.
The Fleet Management is open-sourced software licensed under the MIT license.