DEV Community

greeny bignose
greeny bignose

Posted on

Fleet Analytics Agent

DEV's Worldwide Show and Tell Challenge Submission πŸŽ₯

This is a submission for the DEV's Worldwide Show and Tell Challenge Presented by Mux

πŸš— What I Built

Mobile Ads Car Analytics is a fleet analytics platform designed to monitor, simulate, and analyze vehicles in real time.

Originally built for mobile billboard cars, the system is fleet-agnostic by design and can be easily adapted to any operation that relies on vehicles β€” including delivery fleets, food trucks, service vehicles, and logistics operations.

The platform tracks vehicle movement on maps, verifies activity or media playback per vehicle, simulates realistic driving routes, and performs cost, trip, and performance analytics using an LLM-powered backend.

The goal is simple, turn vehicle movement into measurable, auditable, and optimizable business intelligence β€” replacing blind spending, guesswork, and delayed reporting with real-time operational insight.

πŸŽ₯ My Pitch Video

https://player.mux.com/P5do8601g8OqhFDZTrWWCeTBw93Xwtbk5PXd3hcOyWBA

πŸ§ͺ Demo

Live services (all containerized and deployed):

Frontend Dashboard
https://frontendcar-120772862253.us-east4.run.app

Backend (Node.js + FastAPI)
https://backendcar-120772862253.us-east4.run.app

Mobile Car Simulator (Phone-friendly)
https://mobilecar-120772862253.us-east4.run.app

ADK + Gradio Analytics Interface
https://gradio-120772862253.us-east4.run.app

ADK Service
https://adk-120772862253.us-east4.run.app

GitHub Repositories

https://github.com/hendram/mobile_ads_analytics

https://github.com/hendram/backendcar

https://github.com/hendram/mobilecar

https://github.com/hendram/gradio

https://github.com/hendram/frontendcar

Complete Footage of the Apps:

https://www.youtube.com/watch?v=3HO-tBAzMrk

πŸ“– The Story Behind It

Years ago, while stuck in traffic, I noticed mobile billboard cars trapped in congestion.

That’s when the problem became obvious:

Ads don’t reach planned locations on time

Traffic jams and broken roads kill campaign efficiency

Video playback issues go unnoticed

Costs keep rising without clear ROI

Traditional outdoor ads have dashboards.
Mobile ads cars don’t.

This project exists to close that gap.

🧩 What It Does

Core Features

🚘 Car Monitoring

Real-time car movement visualized on a map

Location data streamed from Firestore

Each car tracked independently

πŸŽ₯ Video Monitoring

Live video frame per car

Label overlay shows which car is being monitored

Videos served from backend as files

βž• Add / Remove Cars

Car label can be auto generated or user inputted

Backend persistence only triggered when:

Cars are added

Places are added

Videos are assigned

Safe removal logic

Backend cleanup if data already stored

🧭 Route Simulation

Uses Google Directions API

Converts user-defined places into real driving paths

Simulated mobile car:

Runs on desktop web or mobile web (portrait & landscape)

Sends live coordinates back to backend

Stored in Tidb for analytics and firebased for realtime monitoring dashboard

πŸ“Š Analytics & Intelligence (ADK + Gradio)

Powered by Google ADK as an agent backend, exposed through Gradio.

Supported Analytics

Total cost per trip (fuel, driver, maintenance β€” configurable)

Cost per leg

Driver time on the road (per trip & comparison)

Number of trips per car

Cross-car cost comparison

Tabular reports (copy-ready)

Charts for trend & anomaly analysis

Example Prompts You Can Run

Driver cost comparison between cars with different pricing models

Fuel cost per leg with tables or graphs

Trip count per car

Time-on-road comparison between cars

Anomaly detection using non-cumulative cost graphs

This is not hard-coded analytics β€” it’s LLM-driven analysis over real route data.

πŸ—οΈ How We Built It

Tech Stack

Frontend

React

Vite

Google Maps API

Backend

Node.js (Express)

FastAPI (Python)

SQLite (operational data)

Analytics

Google ADK (agent-based reasoning)

Gradio (interactive analytics UI)

Gemini models

Data & Infra

Firestore (real-time tracking)

Google Directions & Geolocation APIs

Docker (everything containerized)

Cloud Run

Artifact Registry

Workload Identity

Everything runs in containers

βš™οΈ Challenges We Ran Into

ADK agent behavior

LLM responses can be inconsistent

Sometimes partial, sometimes lazy

Required careful agent architecture design

Agent I/O with Gradio

Avoiding swallowed inputs

Ensuring structured outputs for tables & charts

Google Maps Reality Check

Same places β‰  same route

Directions API β‰  Geolocation API

Path variability impacts analytics accuracy

This was mostly trial-and-error β€” documentation is still thin.

πŸ† Accomplishments We’re Proud Of

Generating real analytical reports (tables & charts) from ADK

End-to-end pipeline:

Route simulation β†’ Firestore β†’ LLM analysis β†’ visual report

Turning a β€œcool demo” into something that actually has business value

This goes beyond hackathon eye-candy.

πŸŽ“ What We Learned

When to stop polishing and switch approaches

How LLM behavior directly affects system design

Real-world mapping data is messy and non-deterministic

Making analytics usable matters more than making them clever

πŸš€ What’s Next

Upgrade into a Mobile Ads Optimizer Platform, not just analytics:

Campaign optimization recommendations

Traffic-aware route planning

Cost vs exposure modeling

Automated anomaly alerts

ROI-driven scheduling

From tracking ads β†’ optimizing ads.

Top comments (0)