eLogistics — EV Fleet Telematics
A production Laravel 10 telematics platform for a 37-vehicle Tata Xpres-T EV fleet. It ingests live vehicle data from the Tata CVP API every minute, tracks charging sessions, fires real-time alerts, and serves a mobile app for admins and vendors — architected, built, and operated solo, end to end, for an EV fleet operator.
fewer DB queries per sync cycle — from ~1,500+ down to ~440 per 100 vehicles
MySQL CPU saturation eliminated under production load
rows of telemetry served with purpose-built covering indexes
live ingestion across a 37-vehicle EV fleet, zero-downtime
MySQL was pinned at 99% CPU.
Here's what was actually wrong.
Under load the database was saturating at 99% CPU. It wasn't one bug — it was a compounding set of them. Diagnosing and fixing each took the per-cycle query load from ~1,500+ (spiking to ~4,500 with stacked processes) down to ~440 queries per 100 vehicles.
Stacked sync processes (root cause)
Slow API days let one minute's sync start before the previous finished, stacking processes on top of each other. A race condition in that overlap had generated 400k+ duplicate telemetry rows. Added overlap-guarding so a cycle can never begin while the previous one is still running.
N+1 alert-cooldown lookups
The alerting engine ran 8–9 separate cooldown queries per vehicle per minute. Replaced the whole set with a single batched GROUP BY query per chunk of vehicles.
Per-vehicle ignition existence checks
A 'recent ignition' existence check ran once per vehicle. Collapsed into one batched DISTINCT query across the chunk.
Missing covering indexes
Distance-analytics and GPS-playback queries were hitting the heap on a 1M+ row table. Added covering indexes so those hot paths are served entirely from the index.
Silent auth-token expiry
A cached static API token persisted across queue jobs. Once it expired, every sync silently wrote nothing — no error, no data. Scoped the token per job and made 401s throw and retry, turning a silent failure into a loud, recoverable one.
UTC / IST timezone drift
A UTC vs. IST mismatch silently widened a 2-hour alert window into a 7.5-hour one. Normalized timezone handling across the alert-window math.
How the system is wired.
Scheduler
dispatches every 60s (ms-fast)
Queue
chunks of 10 vehicles
Workers
parallel API pull + DB write
Telemetry
1.16M+ rows, covering indexes
Alerts + API
cooldowns · Sanctum · reports
Minute-by-minute sync pipeline
A scheduler dispatches queue jobs, each processing a chunk of 10 vehicles in parallel across multiple workers. The dispatch step completes in milliseconds — all API calls and DB writes happen inside the workers, never on the scheduler tick.
1.16M-row telemetry store
Purpose-built covering indexes for distance analytics and GPS-trail playback, so read-heavy dashboards never touch the heap.
Real-time alerting engine
Per-type cooldowns for speed, geofence violation, HV-battery critical, hub/depot compliance, service-due, km-limit, seatbelt, and hard-braking events.
Careful signal parsing
Decoded against the Tata CVP data dictionary — handling inverted booleans and 'unknown' sentinel values that would otherwise poison analytics.
30+ endpoint mobile REST API
Sanctum token auth with role-based data scoping — admins and vendors see strictly their own slice of the fleet.
Automated email reporting
Scheduled daily, weekly, and monthly reports generated and delivered without manual intervention.
Dashboard & mobile.


Need a system that holds up under load?
Real-time ingestion, heavy analytics, production Laravel — the kind of work above is exactly what we do.