DEV Community

Ankush Yadav
Ankush Yadav

Posted on Originally published at ankushy961-lang.github.io

Truck paperwork that files itself

Sri Hari Docs is an Android and PWA app that photographs a truck's documents, reads the fields off each photo and attaches the document to the right vehicle by score. Ankush Yadav built it for an agri-trading company that moves steam rice by truck, and it shipped in May 2026.

Who uses it, and where are they standing?

The user is a person in a yard with a phone. A truck has arrived with steam rice, the driver is holding a bundle of slips, and the loading does not wait. Nobody in that moment wants a form with twelve fields.

Before the app, those slips travelled on paper. A weighbridge slip went to one desk and a gate pass to another. Finding every paper for one truck meant several people and a lot of asking around.

So the app has one main action. Point the camera at the paper and press once. Everything after that is the app's job, not the user's.

How does the app read a weighbridge slip?

Each photo goes through extraction. The app decides the document type first, one of seven the company uses, such as a weighbridge slip, a gate pass or a bilty. Then it pulls the fields that type carries.

For a weighbridge slip that means the date, the gross, tare and net weights, the driver and the transporter. Every field comes back with a confidence level. A clear printed weight reads high, and a handwritten name in fading ink reads low.

Confidence is there for honesty. The app never pretends to know a value it only half read. The person in the yard sees exactly which fields deserve a second look, and nothing more.

Why match a document to a truck by score instead of asking?

The obvious design is a dropdown: pick the truck this slip belongs to. It fails in the yard. The list is long, the plate on the slip is often smudged, and the person has rice to load.

Instead the app scores every open vehicle against the extracted fields. Each agreement adds points, and the highest total wins.

  • Same driver: +3
  • Same transporter: +2
  • Same date: +3

The match is shown with its reasons, for example UP 53 AB 1234 with driver +3 · transporter +2 · date +3. Showing the reasons matters as much as the result. A clerk can see why that truck was chosen and tap a different one if the app is wrong.

Asking first costs a decision on every photo. Scoring first costs a decision only when the app is unsure. Over a day of trucks, that difference is most of the work.

What happens when the same paper is photographed twice?

Paper gets photographed twice all the time. A driver hands over the same gate pass at the gate and again at the office, or a slip is reshot because the first photo was blurry. If both copies were filed, the truck would look more complete than it is.

So a document that matches one already on the same vehicle does not file itself. It goes to a review queue instead. The Review tab shows a count, and someone decides whether to keep, replace or discard it.

The queue is the only place the app asks a question. Everything routine files itself. Everything odd waits for a person.

What does a complete paper trail mean on the ground?

Every vehicle needs seven documents before its record is whole. The Trucks screen lists each plate with a count, 4 / 7 or 7 / 7, and a bar that fills as papers arrive. A truck at 7 / 7 is marked complete.

Operationally that changes one thing. Nobody has to remember which paper is missing for which truck. The gaps are visible from the yard, on a phone, on the day the truck is there and the driver can still be asked.

The app runs in Hindi and English, because the people who photograph slips and the people who read the records do not always share a language. Document types are labelled in both, such as Weighbridge slip · तौल पर्ची.

Stack and scale. React, Capacitor and Firebase, shipped as a PWA and as an Android app. 7 document types, 2 languages, shipped May 2026 for one agri-trading company.

See it running All posts


Originally published at ankushy961-lang.github.io/blog/truck-paperwork-that-files-itself.html. I am Ankush Yadav, an AI product builder and Android developer in India; live demos of five shipped products are at https://ankushy961-lang.github.io/.

Top comments (0)