Yes — this is the official Hacktoberfest Weekend Challenge submission template. Your current OpenKhata post should be reshaped to follow these exact sections.
Here is a ready-to-paste final version, using your actual project, demo, Rahul feedback, technical implementation, and Gemma usage. I would use this instead of the longer GitHub-style version.
OpenKhata: Building a Local-First Digital Credit Ledger for a Kirana Shop
This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend
What I Built
I built OpenKhata for my friend Rahul, whose family runs a traditional kirana (neighborhood grocery) shop in India.
In a small shop, customer credit — udhar — is often tracked in a handwritten khata. It works, but finding old entries, keeping track of outstanding balances, and writing every transaction manually can become inconvenient.
So I built OpenKhata as a local-first digital khata that lets a shopkeeper record transactions using either:
- Quick typed entry
- Voice entry using the laptop microphone The core idea is simple: AI assists with the entry, but the shopkeeper remains in control of what gets saved.
A voice entry goes through:
Voice → Local Whisper → Transcript → Local Gemma 3 4B → Structured transaction → Safety checks → Human confirmation → SQLite
If the system is uncertain about an amount or customer, it does not silently guess and save the transaction.
For example, during testing I used:
Rahul-er 340 na 3400 baaki
The application detects that two possible monetary amounts were spoken — ₹340 and ₹3,400 — and refuses to choose between them automatically.
The shopkeeper must resolve the ambiguity before the transaction can be saved.
I also added an optional WhatsApp reminder that generates a pre-filled message link, rather than automatically sending anything.
Demo
🎥 Demo Video:
https://drive.google.com/file/d/1PMPooBlJqikraozcAmFbAUmQreW5YTBW/view?usp=sharing
The demo shows:
- A normal credit transaction through Quick Entry.
- Voice recording and local transcription.
- Gemma extracting the transaction structure.
- An ambiguous amount being detected and blocked.
- The ledger and customer balance.
- A pre-filled WhatsApp reminder link.
One important limitation is also demonstrated: Whisper can mishear Bengali/Hindi/English code-mixed speech.
I intentionally kept this limitation visible instead of pretending the speech recognition is perfect.
Code
GitHub: https://github.com/ishaanchowdhury1/OpenKhata OpenKhata is MIT-licensed. The main stack is:
ishaanchowdhury1 / OpenKhata
A local-first digital khata for small shops with voice-assisted credit entry, human confirmation, and a SQLite ledger.
📒 OpenKhata
A local-first digital khata for a small kirana shop.
OpenKhata lets a shopkeeper record customer credit using typed entry or voice. AI assists with transcription and extraction, but the shopkeeper confirms the transaction before anything is written to the ledger.
Core flow
Voice → Local Whisper → Transcript → Local Gemma 3 4B → Structured transaction → Human confirmation → SQLite
Features
- Quick typed credit/payment entry
- Browser voice recording
- Local Whisper transcription
- Local Gemma 3 4B extraction through Ollama
- Human confirmation before saving voice transactions
- Ambiguous amounts are not silently selected
- Existing-customer selection for unrecognised spoken names
- Explicit confirmation before creating a new customer
- SQLite customer ledger
- Optional WhatsApp reminder with a pre-filled message
- No automatic WhatsApp sending
Known limitations
Whisper medium can mishear Bengali/Hindi/English code-mixed speech and can produce names in different scripts. Voice is therefore an assisted workflow rather than an automatic write path.
Requirements
- Python…
- Python
- Streamlit
- SQLite
- Pydantic
- Whisper
- Gemma 3 4B
- Ollama The repository also contains focused automated tests for the extraction safety rules. How I Built It The most important design decision was to keep the core AI processing local.
- Local speech recognition The shopkeeper can record speech directly from the browser. OpenKhata uses Whisper Medium locally to convert the recording into text. The speech can contain Bengali, Hindi and English mixed together. However, this also introduced one of the biggest problems I encountered: Whisper does not reliably understand every code-mixed phrase. Instead of allowing another AI model to blindly "fix" the transcript, I treat the transcript as uncertain input.
- Local Gemma extraction The transcript is passed to Gemma 3 4B running locally through Ollama. Gemma converts the unstructured transcript into structured information such as:
- Customer name
- Items
- Quantity
- Amount
- Due-date expression
- Transaction type
- Confidence values
- Ambiguities For example, the model can turn a phrase like: Suresh-er 1200 baaki ache
into a structured transaction representing a ₹1,200 credit balance.
But the model is not trusted as the final authority.
- Deterministic safety checks This is one of the most important parts of OpenKhata. After Gemma produces its output, normal Python application logic checks the result. The safety layer handles cases such as:
- Low amount confidence
- Low customer-name confidence
- Negative amounts
- Multiple possible monetary amounts
- Distinguishing quantities such as 5 kg from money
- Future payment promises vs. payments already received
- Ambiguous customer names For example: Rahul-er 340 na 3400 baaki
contains two possible monetary amounts.
Instead of asking Gemma to decide which one is correct, the application-level check detects the conflict and blocks the save.
The principle is:
Don't make the LLM the final authority over financial data.
- Human confirmation Before a voice transaction reaches SQLite, the shopkeeper gets a confirmation step. They can review and correct:
- Customer
- Amount
- Transaction type
- Due date
- Description
- Phone number There is also an explicit confirmation when the system is about to create a new customer. Only after confirmation is the transaction written to the ledger.
- Local ledger The confirmed transaction is stored in a local SQLite database. OpenKhata keeps track of:
- Customers
- Credit transactions
- Payments
- Current balances
- Transaction history The data stays on the local machine rather than being sent to a remote database.
- WhatsApp reminders For customers with an outstanding balance, OpenKhata can generate a WhatsApp link containing a pre-filled reminder. It does not automatically send the message. The shopkeeper remains responsible for reviewing and sending it. Why Does Open Innovation Matter? For this project, open and local AI wasn't just a technical choice. The application deals with customer names and outstanding financial balances, so keeping the core processing on the shopkeeper's computer is valuable. With local models, OpenKhata can perform its core AI workflow without sending every voice recording or transaction to a paid cloud AI API. It also means the project can be:
- Run locally
- Modified by developers
- Inspected instead of treated as a black box
- Built around open tools and models
- Adapted to different languages and shop workflows
- Used without paying for every AI request This would have been much harder to design around a closed API where every voice entry had to be sent to a remote service. There is also an important limitation: local-first does not mean completely internet-independent. The models need to be downloaded initially, and WhatsApp itself requires internet access. The core AI processing and ledger, however, run locally. My Friend's Feedback I handed the prototype to Rahul and asked him to test it and give me honest feedback. He liked that it felt fast, helpful and modern, and he felt it could be useful because manually writing every transaction in a diary is not always practical. He also found the first use somewhat confusing because it was his first time using the application. His biggest feature request was broader multilingual support, rather than limiting the experience to Bengali or Hindi. Most importantly, he said he would use something like this in the shop because it would make maintaining the khata more convenient. That feedback changed what I want to work on next: better multilingual speech recognition and broader language support. What I Learned The biggest lesson from OpenKhata wasn't that AI can replace a traditional khata. It was this: AI should know when not to guess.
Whisper can make transcription mistakes.
Gemma can be uncertain.
Names can appear in different scripts.
Amounts can be ambiguous.
So rather than trying to make the AI appear perfect, I designed the system around those failures:
AI assists → deterministic checks verify → human confirms → database saves
For financial data, that felt much more responsible than allowing an LLM to make the final decision.
Prize Categories
🏆 Best Use of Gemma
OpenKhata uses Gemma 3 4B locally through Ollama as the natural-language understanding layer between messy shopkeeper speech and structured financial data.
Gemma handles the difficult language interpretation:
Transcript → Customer + Items + Amount + Due Date + Transaction Type + Confidence
The application then performs deterministic safety checks and requires human confirmation before saving.
This separation lets Gemma be useful without making the model the final authority over financial data.
What's Next?
Based on Rahul's feedback, the next major improvement would be broader multilingual support.
I would also like to improve speech recognition for real-world Bengali/Hindi/English code-mixed conversations.
For now, OpenKhata deliberately keeps the shopkeeper in control of every uncertain transaction.
🔗 Links
GitHub:
https://github.com/ishaanchowdhury1/OpenKhata
Demo Video:
https://drive.google.com/file/d/1PMPooBlJqikraozcAmFbAUmQreW5YTBW/view?usp=sharing
Top comments (0)