Waypoint
A multi-route bus ticket booking platform, search a route and date, pick a seat, check out, and manage bookings from an account.
Waypoint is a booking flow for a multi-route bus network, search a route and date, browse trips from several operators, pick a seat off a real seat map, check out, and get an e-ticket. Bookings live under an account, so a rider can come back later to view or cancel a ticket.
What it does
Search returns trips for a given route and date, each with an operator, departure time, and price. Picking a trip opens its seat map, taken seats are locked out, and the one you choose is held through checkout. Checkout is a full card-shaped form with real formatting and expiry validation. Confirm, and the booking becomes an e-ticket you can pull up any time from “My Tickets,” including cancelling it and freeing the seat back up.
How it’s built, and how it connects to the backend
The public site and the admin dashboard at waypoint.ebenezerafonja.com/admin are two views over the same Cloudflare D1 database. There’s no export step, no sync job, no polling, a booking made on the public site is a row written straight into the same tables the admin dashboard reads from, so it shows up there immediately. The admin view exists to look at the system as a whole: every route, every trip, every seat map, and every booking across the network, from the other side of the counter.
Seat availability is enforced by a unique index in the database itself, not by application logic, so two people can’t end up holding the same seat no matter how the requests land. Passwords are hashed with PBKDF2-HMAC-SHA256 and a per-user random salt via the Web Crypto API, and sessions are opaque tokens, only their hash is ever stored server-side.
Technology Stack
- Hosting: Cloudflare Pages
- Backend: Cloudflare Pages Functions
- Database: Cloudflare D1
- Frontend: Vanilla JavaScript (native ES modules), hand-written CSS, no framework, no build step
Repository: github.com/47QVA/waypoint