KhaataBandhu
Speak it, snap it, straight into the balance sheet
Created on 14th June 2026
•
KhaataBandhu
Speak it, snap it, straight into the balance sheet
The problem KhaataBandhu solves
This project digitizes the traditional handwritten ledger ("khata") that small shop owners use to track daily sales and expenses. Instead of manually writing entries, the shopkeeper can either speak the transaction aloud or take a photo of a receipt, and the app uses AI to automatically figure out the amount, date, category, and whether it's money coming in or going out, then records it. This makes bookkeeping faster and easier for shop owners who may not be comfortable with typing or manual data entry.
Challenges we ran into
Ambiguous transaction direction from speech: Determining whether a spoken phrase means money coming in (a sale) or going out (an expense) is hard because word order and phrasing vary a lot, especially across languages. The prompt had to handle cases like "sold milk for 200" versus "milk for 200 sold" meaning the same thing, and distinguish "customer bought X" (sale) from "I bought X" (expense).
Multi-language and mixed-language input: Shop owners speak in English, Hindi, Gujarati, or a mix of all three in the same sentence, so the parser needed to understand transliterated words like "becha," "kharcha," and "kiraya" alongside English.
Multiple transactions in one sentence: A single voice command can contain two or more separate transactions ("sold milk 300 and bread 100"), so the system had to split these into separate records rather than treating them as one.
Receipts vs. casual sales notes: The receipt scanner needed to handle both formal printed receipts and informal handwritten notes (like "sold ice cream -1200"), and correctly classify the latter as a sale even though it looks like an expense due to the minus sign.
AI reliability and rate limits: Calls to the Gemini API can fail due to rate limiting or temporary unavailability, so error handling had to differentiate between these cases and (in the voice parser) fall back to a local keyword-based parser when the AI fails entirely.
Edge cases and noisy input: Empty, unclear, or nonsensical voice input still needed to produce a usable result rather than crashing or returning nothing, so a fallback always returns at least one transaction object.
Architecture/deployment mismatch: The original backend was a standalone Express server, which doesn't run on Vercel's serverless model, so the routes had to be restructured into individual serverless functions with manual CORS handling instead of the cors middleware.
File permission and environment setup issues: Practical issues like node_modules/.bin binaries losing execute permissions after extraction, and global npm installs failing due to permission restrictions, requiring npx instead.
Technologies used
