Inspiration
Every morning in Pakistan, fresh-produce farmers make a same-day decision with last week's information. A tomato grower in Multan picks up the phone and calls three commission agents, hears wildly different rates, and has to decide which mandi to send his 4,000 kg truck to — before the tomatoes lose value in the August heat. By the time the truck arrives, the rate he heard is gone.
FreshRoute exists to close that gap. We asked: what if a farmer could send one message and get a full comparison of five mandis — ranked not by the headline rate, but by what he'd actually bank after transport, spoilage, commission, and fees? And what if the agent could draft buyer messages, book the truck, and track payment — all in the same conversation, in English or Urdu — with nothing sent without his explicit approval?
What it does
FreshRoute is an AI selling & logistics agent for fresh-produce farmers. The grower sends a message (voice or text, in English or اردو), and the agent:
- Grades the lot from photos and asks only what it still needs
- Compares 5 mandis ranked by net return — after every cost (transport, spoilage, commission, fees)
- Drafts buyer outreach and bookings — held for explicit approval
- Tracks the truck and confirms payment in the same thread
Every comparison, every action, every number is logged in a timestamped Action Log. The farmer approves before anything leaves his phone.
Real decisions, illustrated
We built three composite stories from the app's demo cost model:
- Muhammad Ashraf (tomatoes, Multan → Lahore) — the agent found Al-Karam paying PKR 330,330 net vs Multan's 219,680 — a +PKR 110,650 difference
- Zeenat Bibi (okra, Lodhran) — Karachi looked better on paper, but the agent modelled 900 km of August spoilage and routed her to Faisalabad instead
- Ghulam Mustafa (kinnow, Sargodha) — the agent split his orchard into Grade A (retail) and Grade B (wholesale), earning +PKR 42,400 over a single-lot sale
How we built it
FreshRoute is a full-stack React application with a dual-backend architecture:
- Frontend: React 19 + Vite + TypeScript + Tailwind CSS, with a sage-green landing page and a clean chat-first app shell
- Auth & Database: Firebase Auth (Email/Password + Google Sign-in) with Google Cloud Firestore for real-time AI usage logging, plus Supabase as the primary relational store
- AI Engine: Google Gemini API for the conversational agent — handles grading, mandi comparison, buyer outreach drafting, and logistics coordination
- Animations: Motion (Framer Motion) for scroll-driven SVG path animation that flows through the entire landing page
The architecture follows a "one shared backend, two surfaces" philosophy — the farmer gets a chat interface on his phone, while the operations team gets a full console with lot tracking, approvals, exceptions, and AI usage logs.
Challenges we faced
Honest AI in a high-stakes domain — A farmer could lose real money trusting a wrong number. We built confidence scores, source timestamps, and "thin data" warnings into every comparison. When a distant mandi's edge looks too good, the agent flags it.
Urdu-first UX — Most AI tools are English-first with translation bolted on. We built the chat to be native in both English and Urdu (with Noto Nastaliq Urdu), including RTL bubble styling and voice input.
Approval as the product — The hardest part wasn't the AI — it was designing the approval flow so that farmers trust the system enough to use it. Every buyer message, booking, and payment step is a draft until the farmer releases it.
Dual-backend sync — Firebase Auth + Firestore for real-time AI logging, Supabase for relational data (lots, routes, buyers, transporters). Keeping both in sync with dual-write profiles was a careful engineering challenge.
Landing page that doesn't look "AI-generated" — We went through multiple design iterations before landing on a clean sage-green palette with Milker display typography, avoiding the dark-green+orange and cream+serif defaults that scream template.
What we learned
- Farmers don't need more information — they need the right number at the right time. Net-after-costs beats headline rate every time.
- Trust is built through transparency: showing the math, flagging uncertainty, and never sending anything without approval.
- The best AI product is one where the user doesn't feel like they're using AI — they feel like they have a knowledgeable assistant who speaks their language.
What's next
FreshRoute is piloting on the Multan → Lahore corridor with tomatoes first. We're working with real growers to replace our demo feed with live mandi prices, and expanding the agent's logistics network for covered Mazda bookings across Punjab and Sindh.
Built With
- firebase
- google-cloud-firestore
- google-gemini-api
- motion-(framer-motion)
- react
- supabase
- tailwind-css
- typescript
- vite
Log in or sign up for Devpost to join the conversation.