Libreng Sakay
Libreng Sakay is a real-time public transit tracking and ridership platform for the free bus service of Bataan Province, Philippines. Built with Laravel, Inertia, Vue 3, and Laravel Reverb, it serves passengers, drivers, scanner operators, inspectors, dispatchers, and administrators with live bus positions, tap-to-board passenger counting, dispatch messaging, and ridership reporting, all over WebSockets. The platform is completed by two native Android apps written in Kotlin, the Libreng Sakay Driver app for running trips from the road and the Libreng Sakay Kiosk that counts riders as they tap their Bataeño Pass at the bus door.

Libreng Sakay is my first project as a programmer for the Provincial Government of Bataan. It is built on the Bataeño Pass, the province's digital identification system, which passengers use to board and track their trips, drivers use to sign in, and kiosks read at the bus door.
The admin dashboard is built around a live map of every active trip, with bus, corridor, and incident overlays. From there, staff manage buses, drivers, routes, stops, municipal shuttles, and kiosk devices, build recurring schedules on a schedule board with bulk assignment generation and a publish, pause, and archive lifecycle, and respond to driver SOS alerts and incidents through real-time messaging. It also handles bilingual announcements with scheduling and expiry, ridership reports by route, sector, and day exported to PDF and Excel, staff accounts with multiple roles, two-factor authentication, passkeys, and an audit log, and a bus simulation command center for demos and load testing.
Passengers get a bus tracker on MapLibre and OpenStreetMap with color-coded buses and capacity rings, a route directory for corridor lines and point-to-point shuttles, "near me" stop suggestions, live ETAs and occupancy, and "Leave Now" guidance. They can plan journeys, check timetables for the next departure, get arrival alerts through web push notifications, and review the trip history tied to their Bataeño Pass card. The tracker is bilingual and installs as a PWA with an offline shell.
The Libreng Sakay Driver app is a native Android app for running a shift from the road. Drivers sign in with their Bataeño Pass through OAuth2 with PKCE, then work from a cockpit that shows the active trip, the current and next stop, and the next assignment. They start trips, record arrivals and departures, end the trip and the day's shift, message dispatch, follow the route on a map, and send SOS or issue reports with their location. A foreground service streams live GPS while a trip runs, and GPS fixes, stop events, and messages are queued in SQLite and replayed when the connection returns. It is built with Kotlin, Jetpack Compose with Material 3, Retrofit, OkHttp, AppAuth, MapLibre, and Kotlin Coroutines, and tested with JUnit, Robolectric, and MockWebServer.
The Libreng Sakay Kiosk runs at the bus door in a locked-down, full-screen mode and counts riders as they tap their Bataeño Pass. A first tap boards the rider and a later tap alights them, with an instant "Welcome aboard" or "Ride denied" response. Eligibility checks and taps keep working offline and replay in order on reconnect, the on-board set survives reboots and power cuts, and a live counter with capacity status syncs across devices on the same trip over WebSockets. Kiosks are enrolled to a bus with a pairing code, send heartbeats to the admin side, and read cards through the phone's NFC adapter or a Decard F10-X1 bus validator. It is built with Kotlin, Jetpack Compose, SQLite, Retrofit, OkHttp, and EncryptedSharedPreferences.
The web platform runs on PHP 8.3 and Laravel 13 with Reverb, Sanctum, and Fortify, with a Vue 3, Inertia.js, TypeScript, Tailwind CSS v4, and Reka UI frontend. Maps use MapLibre GL JS with OpenFreeMap and CARTO tiles, OSRM, and Nominatim, the mobile apps talk to a versioned /api/v1 API, reports are generated with DomPDF and PhpSpreadsheet, and the platform is tested with Pest, Vitest, and Playwright.




































