Skip to content
PuneethKumarMSPublic

About

A voice-first trip expense ledger for Indian truck drivers.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

🚚 GaadiVani

A voice-first trip expense ledger for Indian truck drivers.

Drivers speak their expenses the way they normally talk. GaadiVani turns that into a categorised ledger, works out the trip settlement (hisaab) and gives the fleet owner a screen to audit it.

"Nelamangala pump pe 2,400 ka diesel dalwaya, Bhiwandi godown pe unloading ke 500 rupaye diye, aur 4 ghante detention hua"

Category Value Location
Diesel ₹2,400 Nelamangala Pump
Loading/Hamali ₹500 Bhiwandi Godown
Detention 4 hrs Bhiwandi Godown

✨ Features

For the driver

  • Log several expenses in one sentence, by voice or by typing
  • Hinglish, Hindi, Kannada and Tamil speech options (the parser understands Hinglish best)
  • Understands spoken numbers such as "dhai hazaar"
  • Correct or delete entries by voice, with a 5-second undo
  • Spoken confirmations and a read-back of totals
  • Bill prompts for diesel and repair expenses above ₹1,000

Settlement

  • Cash advance, total spent and cash remaining at a glance
  • Detention claim calculated at an editable hourly rate (default ₹200), kept separate from the cash settlement
  • Share or copy the hisaab for WhatsApp
  • Trip history with a vehicle filter

For the fleet owner

  • Approve entries, or flag them with a reason the driver can see
  • Bulk approval that skips entries with a required bill missing
  • View attached bills

Optional, with the backend

  • Cloud storage for bill photos
  • AI reading of litres, rate, amount and pump name from diesel slips

🗣️ Voice commands

Say Result
Toll pe 450 rupaye diye Logs a toll expense
Hubballi kaanta pe 350 rupaye weighbridge aur 800 tyre puncture ke diye Logs two expenses
Pichla diesel entry 2,400 nahi 2,600 tha Corrects an entry
galat, hata do Deletes the last entry
Mysuru se Bhiwandi trip shuru karo, advance 15,000 mila hai Starts a new trip
Trip khatam, final hisaab banao Opens the settlement

🧱 Tech stack

Layer Technology
Frontend React 19, TypeScript, Vite 6, Tailwind CSS
Voice Web Speech API, with optional OpenAI Whisper
Storage on device localStorage, service worker (PWA)
Backend (optional) FastAPI, MongoDB (Motor)
AI and file storage Emergent integrations, Gemini model for slip reading

📁 Project structure

GaadiVani/
├── frontend/
│   ├── src/
│   │   ├── App.tsx          # App state and voice command handling
│   │   ├── components/      # Screens and UI components
│   │   ├── hooks/           # Voice input
│   │   ├── utils/           # Voice parser, ledger maths, speech
│   │   ├── api/             # Receipt upload and slip scan
│   │   └── types/           # Shared TypeScript types
│   ├── public/              # PWA manifest and service worker
│   └── Dockerfile
├── backend/
│   ├── server.py            # Receipts API
│   └── requirements.txt
├── docker-compose.yml       # Runs the frontend
└── .env.example

🚀 Getting started

The frontend works on its own. No backend or API key is needed to try it.

Frontend

Requires Node.js 20 and Yarn 1.

git clone https://github.com/PuneethKumarMS/GaadiVani.git
cd GaadiVani/frontend
corepack enable
yarn install
yarn dev

Open http://localhost:3000. Voice input needs a browser with speech recognition (such as Chrome) and microphone permission. Browser speech recognition may need an internet connection. You can also type entries or tap the sample phrases.

Docker (frontend only)

docker compose up --build

The Dockerfile uses npm install. If that stops on a peer dependency conflict, change it to npm install --legacy-peer-deps.

Backend (optional)

Requires Python 3.10 or later, a running MongoDB and an Emergent key. The emergentintegrations package is specific to Emergent and may need their package index to install.

Create backend/.env:

MONGO_URL=mongodb://localhost:27017
DB_NAME=gaadivani
EMERGENT_LLM_KEY=your_key_here
CORS_ORIGINS=http://localhost:3000

Then, from the repository root:

cd backend
python -m venv .venv
source .venv/bin/activate      # Windows: .venv\Scripts\activate
pip install -r requirements.txt
uvicorn server:app --reload --port 8001

Connect the frontend by creating frontend/.env.local, then restart it:

REACT_APP_BACKEND_URL=http://localhost:8001

⚙️ Environment variables

Variable Used by Required Purpose
REACT_APP_BACKEND_URL Frontend No Backend address
VITE_OPTIONAL_WHISPER_API_KEY Frontend No OpenAI key for Whisper. Leave unset if you don't have one
MONGO_URL Backend Yes MongoDB connection string
DB_NAME Backend Yes Database name
EMERGENT_LLM_KEY Backend For uploads and scanning Emergent key
CORS_ORIGINS Backend No Comma-separated allowed origins (default *)
INTEGRATION_PROXY_URL Backend No Overrides the Emergent service address

🔌 API

Method Endpoint Description
GET /api/ Status check
POST /api/receipts Upload a bill image (JPEG, PNG, WebP, HEIC or HEIF, up to 8 MB)
POST /api/receipts/scan Read a diesel slip
GET /api/receipts/{id} Fetch a stored bill

⚠️ Current limitations

This is a prototype.

  • Trip data lives in one browser. The driver and owner views are not synced across devices.
  • There is no login, and the API has no authentication.
  • The Whisper key is bundled into the frontend, so anyone using the app can read it. Use it for local testing only.
  • The app opens with demo trip data.

About

A voice-first trip expense ledger for Indian truck drivers.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages