Skip to content
All projects
LGU Developer 2026

Ambulance Booking & Tracking

A centralised ambulance dispatch and live-tracking system for the 16 hospitals of a local government unit. Each hospital runs its own fleet; the LGU sees every vehicle across the network on one map.

16

Hospitals on the network

None

Tracker hardware required

Live

Fleet visibility

4

Distinct roles

01 · The problem

What was wrong

Sixteen hospitals each ran their fleet on their own — a whiteboard, a logbook, a phone call to a driver. That is workable inside one hospital and useless across sixteen. Nobody could answer the question that actually matters in an emergency: where is the nearest available ambulance right now, and is anyone already using it?

The LGU had oversight on paper and none in practice. A hospital with no free vehicle had no way to see that the next town over had two idle, so it booked an external ambulance and paid for it.

02 · The approach

What I did

Built as a single system with hospital-level autonomy and LGU-wide visibility, rather than sixteen systems and a reporting spreadsheet.

  • Role-based from the schema up — LGU admin, hospital admin, hospital staff and driver each see a different application, enforced in middleware rather than by hiding buttons.
  • Live GPS over Socket.io, with drivers broadcasting position from the phone already in their pocket and Leaflet/OpenStreetMap rendering the fleet. No proprietary tracker hardware to procure, install or replace.
  • The booking flow models the real one — patient details, multiple attendants, availability checks, and an explicit external-ambulance path for when nothing is free, so that decision is recorded instead of happening off-system.
  • A printable gate pass, because the guard at the barrier needs paper and will not be issued a login.
  • Cross-hospital booking for the LGU, which is what turns sixteen fleets into one.

03 · The outcome

What changed

Running in production across the LGU's hospital network, with live tracking, trip history and utilisation reporting per hospital and LGU-wide.

The reporting matters more than it sounds: utilisation and cross-hospital transfer data is the evidence base for where the next ambulance should actually be assigned.

Highlights

  • Live GPS tracking over Socket.io using the drivers' own phones — no tracker hardware
  • One system spanning 16 hospitals, each autonomous, with LGU-wide oversight
  • Four distinct roles enforced in middleware, not in the UI
  • Utilisation and cross-hospital transfer reporting with CSV export

Built with

  • React 18
  • Vite
  • Node.js
  • Express
  • MySQL
  • Prisma
  • Socket.io
  • Leaflet / OpenStreetMap
  • TanStack Query
  • Zustand
  • Tailwind CSS
  • shadcn/ui
  • Recharts
  • JWT
  • Nginx

Next project

Right to Care Registry

See how it was built