TrainPulse: A Resilient, Secret-Isolated Architecture for Truthful Real-Time Indian Railway Telemetry and Journey Companion Services
Passengers of Indian Railways need accurate trustworthy real-time information about the trains they travel on or wait for: live geographic position, running delay, platform assignment, and coach composition. Existing railway enquiry portals and third-party trackers often fragment this information across separate views, fail to distinguish measured satellite Global Positioning System (GPS) fixes from timetable-interpolated estimates, expose third-party API credentials in client bundles, and fail completely when the upstream provider is rate limited or unavailable. This paper presents TrainPulse, a cross-platform application for Android, iOS, and the web that delivers live Indian Railways tracking and journey support with an emphasis on reliability, security, and honesty of data. The client is written in strict TypeScript using Expo, Expo Router, and React Native Web, utilizing Zustand for state and lifecycle-aware polling alongside a Leaflet and OpenStreetMap route map. It communicates exclusively with a stateless Node.js and Hono backend gateway that isolates upstream credentials on the server, validates requests and responses with Zod schemas, caches canonical Data Transfer Objects (DTOs) in memory for 25 to 45 seconds, merges concurrent identical requests into a single outbound call, and degrades gracefully by serving stale cached data or a built-in offline dataset during upstream failures. A central rule of the system is truthful telemetry: coordinates are never fabricated when upstream GPS is missing, and platform statuses are explicitly labeled Confirmed, Expected, or Unavailable. The implementation is verified by 23 automated Vitest suites (225+ tests) and strict static type checking.
Authors
- Rakesh Kumar Paswan
- Ranbir Singh
- Rahul Sharma
- Shohrab Ansari
- Jiwan Preet Kaur
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-06
- DOI
- https://doi.org/10.5281/zenodo.24005440
- Primary Topic
- Mobile and Web Applications
- Type
- preprint