Real-Time Sydney Transit Planner & Telemetry Dashboard 🌐 Live Demo: https://hubhop.vercel.app
HubHop is a high-performance, real-time transit routing application built for the Transport for NSW (TfNSW) network. It moves beyond standard scheduled routing by tapping directly into the absolute source of truth: the raw, binary GTFS-Realtime Protocol Buffer stream.
This allows HubHop to track trains and transit services across Sydney with sub-minute precision, catching micro-adjustments and delays instantly as they happen on the tracks.
- True Real-Time Telemetry: Bypasses heavily cached JSON wrappers to decode the live TfNSW GTFS-Realtime binary stream directly on the edge.
- Adaptive String Calibration: Uses a custom prefix/suffix wildcard matching net to flawlessly link static Trip Planner API scheduled paths to their actively tracking sensor nodes, eliminating data drift.
- Resilient Fallback Architecture: Network timeouts from the TfNSW gateway are gracefully caught to prevent UI flashing. If the API key is missing or invalid, the app autonomously drops into a safe, localized Demo Mode.
- Modern UI/UX: Built with React & Tailwind CSS for a sleek, responsive, and dark-mode-first aesthetic.
- Framework: Next.js 15+ (App Router, React Server Components)
- Language: TypeScript
- Styling: Tailwind CSS (with Lucide React icons)
- Data Decoding:
gtfs-realtime-bindings(for parsing binary Protocol Buffers) - Data Source: TfNSW Open Data Hub
- Trip Planner API (
/v1/tp/trip) - GTFS-Realtime API (
/v2/gtfs/realtime/sydneytrains)
- Trip Planner API (
HubHop operates on a Hybrid Orchestration Pipeline:
- The Pathfinder: The frontend pings the backend with an origin and destination. The backend queries the TfNSW Trip Planner API to calculate the absolute optimal scheduled route.
- The Telemetry Stream: Simultaneously, the backend downloads the live binary GTFS-Realtime array from the Sydney Trains network.
- The Fusion: The app decodes the binary array and dynamically cross-references platform IDs and immutable tracking strings to fuse the real-time delay integers directly into the scheduled Pathfinder UI before sending it back to the client.
Follow these instructions to run HubHop on your local machine.
- Node.js 18.x or later
- npm or yarn
- A free API key from the TfNSW Open Data Hub
git clone https://github.com/vishalvermauts/HubHop.git
cd HubHopnpm installCreate a .env.local file in the root of the project and add your TfNSW API Key:
# .env.local
TFNSW_API_KEY=your_actual_tfnsw_open_data_token_here(If you leave this out or use a placeholder, the app will automatically run in Demo Mode).
npm run devOpen http://localhost:3000 with your browser to see the result. The page auto-updates as you edit the files.
The easiest way to deploy HubHop is using the Vercel Platform.
- Push your code to GitHub.
- Import the project into Vercel.
- Add your
TFNSW_API_KEYto the Vercel Environment Variables. - Hit Deploy!
(Because HubHop uses Next.js force-dynamic API routes, your telemetry wrapper will run seamlessly on Vercel's Edge/Serverless functions).
Built with precision for the Sydney transit network.


