Fleet dashboards without melting the browser
One of my first contract jobs was a live dashboard for an oil transport fleet. The lessons about real-time UIs have held up well.
On this page
In mid-2024, just as I was starting out professionally, I took a contract building the interface for Shekhawat Oil Carrier's fleet management system. Live tracking of trucks, route and delivery planning, fuel numbers, and a dashboard for the managers who run it all. React on the front, REST APIs behind, Node on the server side.
It was my first time building something where the data moves while you're looking at it, and I got a few things wrong before I got them right.
Don't redraw everything because one truck moved
My first version updated state for the whole fleet whenever any vehicle sent a position. It worked fine with five test trucks. With a realistic number it got sluggish, and the page started to feel like it was wading through mud.
The fix was boring: keep each vehicle's data separate, so a position change re-renders that one marker and its row, not the whole map and the whole table. I also stopped treating every incoming message as something that had to hit the screen immediately. A manager can't read a position that changes twenty times a second anyway. Batching updates to roughly once a second looked identical to a human and cost a fraction of the work.
Ask the server less, but ask smarter
A dashboard has a lot of panels, and the lazy way is for each panel to fetch whatever it wants whenever it wants. I'd done exactly that, and the network tab looked like a waterfall of small repeated requests.
Part of the work, and the part I remember being proud of, was going through the API calls and cutting them down. Combining requests that always travelled together, not refetching data that hadn't changed, and fetching the heavy things (like history for a chart) only when someone actually opened that panel. The screen felt faster, and the backend was calmer too.
A chart is a promise
Fuel and route data got charts. The temptation with charts is to make them lively, with animations and lots of series. But a fleet manager checking fuel use isn't there to admire the chart. They want an answer, like "which truck is using more than it should".
So I cut the decoration and made the answer easy to spot: sorted lists, clear highlight for the unusual ones, and a chart only where the shape over time actually mattered. People ask for charts, and what they need are answers. Those are different things, and it took me a few review conversations to notice.
Live data needs honest states
What does the screen show when a truck hasn't reported in for ten minutes? If you keep showing its last position as if it were current, that's a lie, and in a fleet context it's an expensive one. I learned to show age on anything live: "last seen 12 min ago", greyed out after a threshold.
It's a small thing and it's the same instinct as in my parking app, from a different direction. When you can't be sure, show that you can't be sure.
Looking back
This job came right at the start of my career, and I remember it as the one where I stopped thinking in screens and started thinking in data over time. A page isn't a poster. It's a window onto something that keeps changing, and the quality of the window depends on how you handle the moving parts, which is mostly deciding what not to update.
I still use the batching idea in other places, honestly more often than I'd have guessed.
Enjoyed this? Pass it on
Written by Vishwajit Bhosle
I build and lead web and mobile products from Pune, and write about what I run into along the way. If something here helped, or you have a project in mind, say hello.
Follow along
New posts show up in any feed reader the moment they are published: no account, no email, no tracking.
Comments
Anyone can comment, no sign-up. Upvote what helped, reply to anyone. I read all of them and reply where I can.
Loading comments…