Public
Remixed
Promise Luxury bus booking platform with full admin panel
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data โ€“ all from the browser, and deployed in milliseconds.

Promise Luxury

Premium bus booking platform for Kenya โ€” landing page, customer panel, full admin panel, M-Pesa & card payments, visual seat selection.

PageURL
Landing Pagehttps://promise_luxury--019f287ed61774169a40abfff66213ec.web.val.run
Customer Login/Registerhttps://promise_luxury--019f287ed61774169a40abfff66213ec.web.val.run/login.html
Customer Dashboard (Book + Pay)https://promise_luxury--019f287ed61774169a40abfff66213ec.web.val.run/dashboard.html
Admin Panelhttps://promise_luxury--019f287ed61774169a40abfff66213ec.web.val.run/admin.html

Demo Admin Credentials

Features

Admin Panel (Full Management)

  • Sidebar layout with Overview, Routes, Bookings, Customers, Settings
  • KPI Dashboard: Total revenue, pending revenue, bookings, customers, paid bookings, active routes, today's bookings
  • Booking Management: Verify payments, cancel bookings, search & filter by status/payment
  • Customer Management: View customers with booking counts, search by name/email/phone, delete customers
  • Route Management: Add, edit (inline), and delete routes with bus type selection
  • Payment Settings: Configure M-Pesa phone/till, bank account details

Customer

  • Register & login
  • 3-step booking: Route & Date โ†’ Visual Seat Selection โ†’ Payment
  • M-Pesa STK Push payment (enter phone, get prompt on your phone)
  • Card/Bank Transfer payment (see admin's bank details)
  • View booking history with payment status

Landing Page

  • Luxury bus photo gallery (branded "Promise Luxury")
  • Popular routes, features, CTA

M-Pesa Production Setup

For real M-Pesa STK push (currently in demo mode), set these env vars:

๐Ÿ‘‰ Add MPESA_CONSUMER_KEY here: https://www.val.town/x/promise_luxury/promise-luxury/environment-variables?key=MPESA_CONSUMER_KEY ๐Ÿ‘‰ Add MPESA_CONSUMER_SECRET here: https://www.val.town/x/promise_luxury/promise-luxury/environment-variables?key=MPESA_CONSUMER_SECRET ๐Ÿ‘‰ Add MPESA_SHORTCODE here: https://www.val.town/x/promise_luxury/promise-luxury/environment-variables?key=MPESA_SHORTCODE ๐Ÿ‘‰ Add MPESA_PASSKEY here: https://www.val.town/x/promise_luxury/promise-luxury/environment-variables?key=MPESA_PASSKEY

Get these from https://developer.safaricom.co.ke (Daraja API portal).

Architecture

  • serve.ts โ€” Hono HTTP handler: API routes + static file serving
  • db.ts โ€” SQLite database (schema, queries, seeding, settings, stats)
  • auth.ts โ€” Session/cookie-based authentication
  • index.html โ€” Landing page with bus gallery
  • login.html โ€” Customer login/register
  • dashboard.html โ€” 3-step booking flow with bus seat map + payment
  • admin.html โ€” Full admin panel with sidebar, KPIs, booking/customer management
  • styles.css โ€” Shared styles + admin layout