When the Truck Said 'Wait' — And How AI Helped Me Listen to the Road
In a recent session while building Arise & Shine Transporters, the AI suggested a way to detect unusual truck behavior, leading to a breakthrough in fleet management. This article reflects on the moment when the code and the real-world data finally aligned.
It was a quiet Tuesday afternoon in Nairobi when I sat down with the Arise & Shine Transporters project. The app had been tracking trucks for weeks, but there was one persistent issue: some trucks were logging fuel consumption that didn't match their routes. It was confusing, and I wasn't sure where to start. I opened a chat with Claude and asked, 'How can I detect if a truck is taking an unusual route or idling for too long?' I needed something concrete, not just theory.
Claude suggested using telemetry data to flag deviations in speed and movement patterns. It recommended checking the GPS coordinates against a known route and looking for anomalies in the time it took to complete a trip. I tried a few approaches, but the results were inconsistent. The data was messy, and the system kept flagging false positives. I was stuck.
Then I thought about the AI receipt verification tool we had in the app. It compared uploaded photos to expected values. Could we do something similar with the GPS data? I asked Claude again: 'Can I compare the actual GPS coordinates against a calculated expected path based on the distance and time?' This time, the response was more specific. It suggested using the OpenStreetMap Nominatim API to get expected routes and then comparing the actual GPS data against that. It also recommended running this check every five minutes to catch deviations in real time.
I implemented the idea, and it worked. The system started flagging trucks that were taking detours or idling in unexpected places. The admin dashboard now shows a 'Telemetry Anomaly' section, and it believer that the code and the real-world data finally aligned. It wasn't a perfect solution, but it was enough to give the fleet managers the tools they needed to make informed decisions.
What stood out was how the AI helped me think differently. It wasn't just about fixing the code — it was about understanding the data in a way that made sense to the people using the app. The truck didn't just say 'wait' — it gave me a signal that I needed to listen to the road, not just the code. That was the moment it all came together, and it reminded me why I started this project in the first place.
Today, the Arise & Shine Transporters app helps manage over a hundred trucks across Kenya, and the anomaly detection system is one of the most used features. It's a small part of the app, but it's had a big impact on the people who use it. That's the power of building with AI — it's not just about the code, it's about the people who need it most.