<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ishaan Chowdhury</title>
    <description>The latest articles on DEV Community by Ishaan Chowdhury (@ishaanchowdhury_ic10).</description>
    <link>https://dev.to/ishaanchowdhury_ic10</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F99mvlsfu5tfj9m7ku25d.png</url>
      <title>DEV Community: Ishaan Chowdhury</title>
      <link>https://dev.to/ishaanchowdhury_ic10</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ishaanchowdhury_ic10"/>
    <language>en</language>
    <item>
      <title>OpenKhata: Building a Local-First Digital Credit Ledger for a Kirana Shop</title>
      <dc:creator>Ishaan Chowdhury</dc:creator>
      <pubDate>Sun, 04 Oct 2026 03:32:20 +0000</pubDate>
      <link>https://dev.to/ishaanchowdhury_ic10/openkhata-building-a-local-first-digital-credit-ledger-for-a-kirana-shop-1i9j</link>
      <guid>https://dev.to/ishaanchowdhury_ic10/openkhata-building-a-local-first-digital-credit-ledger-for-a-kirana-shop-1i9j</guid>
      <description>&lt;p&gt;Yes — this is the official Hacktoberfest Weekend Challenge submission template. Your current OpenKhata post should be reshaped to follow these exact sections.&lt;br&gt;
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.&lt;br&gt;
OpenKhata: Building a Local-First Digital Credit Ledger for a Kirana Shop&lt;br&gt;
This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend&lt;br&gt;
What I Built&lt;br&gt;
I built OpenKhata for my friend Rahul, whose family runs a traditional kirana (neighborhood grocery) shop in India.&lt;br&gt;
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.&lt;br&gt;
So I built OpenKhata as a local-first digital khata that lets a shopkeeper record transactions using either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Quick typed entry&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A voice entry goes through:&lt;br&gt;
Voice → Local Whisper → Transcript → Local Gemma 3 4B → Structured transaction → Safety checks → Human confirmation → SQLite&lt;br&gt;
If the system is uncertain about an amount or customer, it does not silently guess and save the transaction.&lt;br&gt;
For example, during testing I used:&lt;br&gt;
Rahul-er 340 na 3400 baaki&lt;/p&gt;

&lt;p&gt;The application detects that two possible monetary amounts were spoken — ₹340 and ₹3,400 — and refuses to choose between them automatically.&lt;br&gt;
The shopkeeper must resolve the ambiguity before the transaction can be saved.&lt;br&gt;
I also added an optional WhatsApp reminder that generates a pre-filled message link, rather than automatically sending anything.&lt;br&gt;
Demo&lt;br&gt;
🎥 Demo Video:&lt;br&gt;
&lt;a href="https://drive.google.com/file/d/1PMPooBlJqikraozcAmFbAUmQreW5YTBW/view?usp=sharing" rel="noopener noreferrer"&gt;https://drive.google.com/file/d/1PMPooBlJqikraozcAmFbAUmQreW5YTBW/view?usp=sharing&lt;/a&gt;&lt;br&gt;
The demo shows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A normal credit transaction through Quick Entry.&lt;/li&gt;
&lt;li&gt;Voice recording and local transcription.&lt;/li&gt;
&lt;li&gt;Gemma extracting the transaction structure.&lt;/li&gt;
&lt;li&gt;An ambiguous amount being detected and blocked.&lt;/li&gt;
&lt;li&gt;The ledger and customer balance.&lt;/li&gt;
&lt;li&gt;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
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/ishaanchowdhury1" rel="noopener noreferrer"&gt;
        ishaanchowdhury1
      &lt;/a&gt; / &lt;a href="https://github.com/ishaanchowdhury1/OpenKhata" rel="noopener noreferrer"&gt;
        OpenKhata
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A local-first digital khata for small shops with voice-assisted credit entry, human confirmation, and a SQLite ledger.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;📒 OpenKhata&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;A local-first digital khata for a small kirana shop.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Core flow&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Voice → Local Whisper → Transcript → Local Gemma 3 4B → Structured transaction → Human confirmation → SQLite&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Features&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Quick typed credit/payment entry&lt;/li&gt;
&lt;li&gt;Browser voice recording&lt;/li&gt;
&lt;li&gt;Local Whisper transcription&lt;/li&gt;
&lt;li&gt;Local Gemma 3 4B extraction through Ollama&lt;/li&gt;
&lt;li&gt;Human confirmation before saving voice transactions&lt;/li&gt;
&lt;li&gt;Ambiguous amounts are not silently selected&lt;/li&gt;
&lt;li&gt;Existing-customer selection for unrecognised spoken names&lt;/li&gt;
&lt;li&gt;Explicit confirmation before creating a new customer&lt;/li&gt;
&lt;li&gt;SQLite customer ledger&lt;/li&gt;
&lt;li&gt;Optional WhatsApp reminder with a pre-filled message&lt;/li&gt;
&lt;li&gt;No automatic WhatsApp sending&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Known limitations&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Requirements&lt;/h2&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Python…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/ishaanchowdhury1/OpenKhata" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;

GitHub:
&lt;a href="https://github.com/ishaanchowdhury1/OpenKhata" rel="noopener noreferrer"&gt;https://github.com/ishaanchowdhury1/OpenKhata&lt;/a&gt;
OpenKhata is MIT-licensed.
The main stack is:&lt;/li&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;Streamlit&lt;/li&gt;
&lt;li&gt;SQLite&lt;/li&gt;
&lt;li&gt;Pydantic&lt;/li&gt;
&lt;li&gt;Whisper&lt;/li&gt;
&lt;li&gt;Gemma 3 4B&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;li&gt;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:&lt;/li&gt;
&lt;li&gt;Customer name&lt;/li&gt;
&lt;li&gt;Items&lt;/li&gt;
&lt;li&gt;Quantity&lt;/li&gt;
&lt;li&gt;Amount&lt;/li&gt;
&lt;li&gt;Due-date expression&lt;/li&gt;
&lt;li&gt;Transaction type&lt;/li&gt;
&lt;li&gt;Confidence values&lt;/li&gt;
&lt;li&gt;Ambiguities
For example, the model can turn a phrase like:
Suresh-er 1200 baaki ache&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;into a structured transaction representing a ₹1,200 credit balance.&lt;br&gt;
But the model is not trusted as the final authority.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;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:&lt;/li&gt;
&lt;li&gt;Low amount confidence&lt;/li&gt;
&lt;li&gt;Low customer-name confidence&lt;/li&gt;
&lt;li&gt;Negative amounts&lt;/li&gt;
&lt;li&gt;Multiple possible monetary amounts&lt;/li&gt;
&lt;li&gt;Distinguishing quantities such as 5 kg from money&lt;/li&gt;
&lt;li&gt;Future payment promises vs. payments already received&lt;/li&gt;
&lt;li&gt;Ambiguous customer names
For example:
Rahul-er 340 na 3400 baaki&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;contains two possible monetary amounts.&lt;br&gt;
Instead of asking Gemma to decide which one is correct, the application-level check detects the conflict and blocks the save.&lt;br&gt;
The principle is:&lt;br&gt;
Don't make the LLM the final authority over financial data.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Human confirmation
Before a voice transaction reaches SQLite, the shopkeeper gets a confirmation step.
They can review and correct:&lt;/li&gt;
&lt;li&gt;Customer&lt;/li&gt;
&lt;li&gt;Amount&lt;/li&gt;
&lt;li&gt;Transaction type&lt;/li&gt;
&lt;li&gt;Due date&lt;/li&gt;
&lt;li&gt;Description&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;li&gt;Local ledger
The confirmed transaction is stored in a local SQLite database.
OpenKhata keeps track of:&lt;/li&gt;
&lt;li&gt;Customers&lt;/li&gt;
&lt;li&gt;Credit transactions&lt;/li&gt;
&lt;li&gt;Payments&lt;/li&gt;
&lt;li&gt;Current balances&lt;/li&gt;
&lt;li&gt;Transaction history
The data stays on the local machine rather than being sent to a remote database.&lt;/li&gt;
&lt;li&gt;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:&lt;/li&gt;
&lt;li&gt;Run locally&lt;/li&gt;
&lt;li&gt;Modified by developers&lt;/li&gt;
&lt;li&gt;Inspected instead of treated as a black box&lt;/li&gt;
&lt;li&gt;Built around open tools and models&lt;/li&gt;
&lt;li&gt;Adapted to different languages and shop workflows&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Whisper can make transcription mistakes.&lt;br&gt;
Gemma can be uncertain.&lt;br&gt;
Names can appear in different scripts.&lt;br&gt;
Amounts can be ambiguous.&lt;br&gt;
So rather than trying to make the AI appear perfect, I designed the system around those failures:&lt;br&gt;
AI assists → deterministic checks verify → human confirms → database saves&lt;br&gt;
For financial data, that felt much more responsible than allowing an LLM to make the final decision.&lt;br&gt;
Prize Categories&lt;br&gt;
🏆 Best Use of Gemma&lt;br&gt;
OpenKhata uses Gemma 3 4B locally through Ollama as the natural-language understanding layer between messy shopkeeper speech and structured financial data.&lt;br&gt;
Gemma handles the difficult language interpretation:&lt;br&gt;
Transcript → Customer + Items + Amount + Due Date + Transaction Type + Confidence&lt;br&gt;
The application then performs deterministic safety checks and requires human confirmation before saving.&lt;br&gt;
This separation lets Gemma be useful without making the model the final authority over financial data.&lt;br&gt;
What's Next?&lt;br&gt;
Based on Rahul's feedback, the next major improvement would be broader multilingual support.&lt;br&gt;
I would also like to improve speech recognition for real-world Bengali/Hindi/English code-mixed conversations.&lt;br&gt;
For now, OpenKhata deliberately keeps the shopkeeper in control of every uncertain transaction.&lt;br&gt;
🔗 Links&lt;br&gt;
GitHub:&lt;br&gt;
&lt;a href="https://github.com/ishaanchowdhury1/OpenKhata" rel="noopener noreferrer"&gt;https://github.com/ishaanchowdhury1/OpenKhata&lt;/a&gt;&lt;br&gt;
Demo Video:&lt;br&gt;
&lt;a href="https://drive.google.com/file/d/1PMPooBlJqikraozcAmFbAUmQreW5YTBW/view?usp=sharing" rel="noopener noreferrer"&gt;https://drive.google.com/file/d/1PMPooBlJqikraozcAmFbAUmQreW5YTBW/view?usp=sharing&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>OpenKhata: Building a Local-First Digital Credit Ledger for a Kirana Shop</title>
      <dc:creator>Ishaan Chowdhury</dc:creator>
      <pubDate>Sat, 03 Oct 2026 13:14:39 +0000</pubDate>
      <link>https://dev.to/ishaanchowdhury_ic10/openkhata-building-a-local-first-digital-credit-ledger-for-a-kirana-shop-3a15</link>
      <guid>https://dev.to/ishaanchowdhury_ic10/openkhata-building-a-local-first-digital-credit-ledger-for-a-kirana-shop-3a15</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built OpenKhata for my friend Rahul, whose family runs a traditional kirana (neighborhood grocery) shop in India.&lt;/p&gt;

&lt;p&gt;Customer credit (udhar) is traditionally tracked in a physical khata. During busy hours, entering and finding handwritten transactions can be inconvenient, especially as the number of customers and transactions grows.&lt;/p&gt;

&lt;p&gt;OpenKhata is a local-first digital khata that lets a shopkeeper record credit transactions through fast typed entry or spoken voice notes.&lt;/p&gt;

&lt;p&gt;The important part isn't just the AI. Nothing from an uncertain voice entry is silently written to the ledger. The shopkeeper gets a confirmation step before the transaction is saved.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Demo Video:&lt;/strong&gt; &lt;a href="https://drive.google.com/file/d/1PMPooBlJqikraozcAmFbAUmQreW5YTBW/view?usp=sharing" rel="noopener noreferrer"&gt;https://drive.google.com/file/d/1PMPooBlJqikraozcAmFbAUmQreW5YTBW/view?usp=sharing&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key Demonstration:&lt;/strong&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Quick Entry&lt;/strong&gt; — Record a normal credit transaction directly into the local SQLite ledger.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Voice Safety Gate&lt;/strong&gt; — The shopkeeper says: &lt;em&gt;"Rahul-er 340 na 3400 baaki"&lt;/em&gt;. Whisper produces the transcript, and an application-level check detects that two monetary amounts were spoken: ₹340 and ₹3,400. Instead of choosing one, OpenKhata clears the amount and requires the shopkeeper to resolve the ambiguity before saving.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WhatsApp Reminder&lt;/strong&gt; — The Ledger generates a pre-filled payment reminder link. OpenKhata does not automatically send the message.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/ishaanchowdhury1" rel="noopener noreferrer"&gt;
        ishaanchowdhury1
      &lt;/a&gt; / &lt;a href="https://github.com/ishaanchowdhury1/OpenKhata" rel="noopener noreferrer"&gt;
        OpenKhata
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A local-first digital khata for small shops with voice-assisted credit entry, human confirmation, and a SQLite ledger.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;📒 OpenKhata&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;A local-first digital khata for a small kirana shop.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Core flow&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Voice → Local Whisper → Transcript → Local Gemma 3 4B → Structured transaction → Human confirmation → SQLite&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Features&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Quick typed credit/payment entry&lt;/li&gt;
&lt;li&gt;Browser voice recording&lt;/li&gt;
&lt;li&gt;Local Whisper transcription&lt;/li&gt;
&lt;li&gt;Local Gemma 3 4B extraction through Ollama&lt;/li&gt;
&lt;li&gt;Human confirmation before saving voice transactions&lt;/li&gt;
&lt;li&gt;Ambiguous amounts are not silently selected&lt;/li&gt;
&lt;li&gt;Existing-customer selection for unrecognised spoken names&lt;/li&gt;
&lt;li&gt;Explicit confirmation before creating a new customer&lt;/li&gt;
&lt;li&gt;SQLite customer ledger&lt;/li&gt;
&lt;li&gt;Optional WhatsApp reminder with a pre-filled message&lt;/li&gt;
&lt;li&gt;No automatic WhatsApp sending&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Known limitations&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Requirements&lt;/h2&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Python…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/ishaanchowdhury1/OpenKhata" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/ishaanchowdhury1/OpenKhata" rel="noopener noreferrer"&gt;https://github.com/ishaanchowdhury1/OpenKhata&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;License:&lt;/strong&gt; MIT&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tests:&lt;/strong&gt; 7 automated unit tests covering extraction-safety rules in &lt;code&gt;tests/test_safety.py&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;



&lt;pre data-lang="mermaid"&gt;&lt;code&gt;graph TD
    A[Shopkeeper Spoken Audio] --&amp;gt; B[Local Whisper Model]
    B --&amp;gt; C[Raw Transcript]
    C --&amp;gt; D[Local Gemma 3 4B via Ollama]
    D --&amp;gt; E[Pydantic Validation]
    E --&amp;gt; F[Deterministic Safety Checks]
    F --&amp;gt; G[Human Confirmation]
    G --&amp;gt; H[Local SQLite Ledger]
    H --&amp;gt; I[WhatsApp Reminder Link]&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  Local speech-to-text
&lt;/h3&gt;

&lt;p&gt;Whisper medium runs locally on the laptop. One of the most important things I learned while building this was that code-mixed Bengali/Hindi/English speech is not reliably transcribed every time. For example, a phrase like &lt;em&gt;"Ramesh-da 2 kg rice, 340 baaki"&lt;/em&gt; was transcribed incorrectly during testing. So I didn't try to hide that failure. Instead, voice became an assisted workflow, and uncertain entries require confirmation before they can affect the ledger.&lt;/p&gt;

&lt;h3&gt;
  
  
  Local structured extraction
&lt;/h3&gt;

&lt;p&gt;Gemma 3 4B runs locally through Ollama and converts the transcript into structured transaction data: customer, items, amount, due-date expression, transaction type, confidence values, and ambiguities.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deterministic safety layer
&lt;/h3&gt;

&lt;p&gt;This is deliberately separate from the model. Python application-level rules check things such as low amount confidence, low customer confidence, negative amounts, multiple possible monetary amounts, quantity numbers (e.g., 5 kg vs. monetary values), and future payment promises vs payments already received. The principle is simple: &lt;strong&gt;Don't make the LLM the final authority over financial data.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Storage and UI
&lt;/h3&gt;

&lt;p&gt;The application uses Streamlit, SQLite, Pydantic, local Whisper, and local Gemma 3 4B through Ollama.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Local and Open Technology Matter
&lt;/h2&gt;

&lt;p&gt;Customer names and outstanding balances are sensitive information. OpenKhata keeps the core AI processing local on the laptop after the models have been downloaded, rather than requiring every transaction to be sent to a cloud LLM API.&lt;/p&gt;

&lt;p&gt;This also means the application can continue to perform its core ledger and AI processing without depending on a per-request cloud AI service.&lt;/p&gt;

&lt;p&gt;WhatsApp reminders are different: they generate a web link, so using WhatsApp itself requires internet access. The project is MIT-licensed, while Gemma 3 4B is an open-weight model used locally through Ollama.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real Friend Handover
&lt;/h2&gt;

&lt;p&gt;I handed the prototype to Rahul and asked him to use it and give honest feedback.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What he liked:&lt;/strong&gt; Rahul said he loved it because it felt fast, helpful, and modern. He also said that writing every transaction manually in a diary/khata isn't always practical anymore.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What was confusing?&lt;/strong&gt; He said it was somewhat confusing at first because it was his first time using the application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What would he change?&lt;/strong&gt; His main request was broader multilingual support, rather than limiting the experience to only Bengali or Hindi.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Would he use it?&lt;/strong&gt; Rahul said he would use it in the shop because he found it helpful for reducing manual bookkeeping.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;The biggest lesson wasn't that AI can replace the khata. It was that &lt;strong&gt;AI should know when not to guess.&lt;/strong&gt;&lt;br&gt;
Whisper made mistakes. Gemma can be uncertain. Names can appear in different scripts. Amounts can be ambiguous.&lt;/p&gt;

&lt;p&gt;So instead of trying to make the AI look perfect, I designed the system around those failures:&lt;br&gt;
&lt;code&gt;AI assists&lt;/code&gt; ➔ &lt;code&gt;deterministic checks verify&lt;/code&gt; ➔ &lt;code&gt;human confirms&lt;/code&gt; ➔ &lt;code&gt;database saves&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That ended up being more important than adding another AI feature.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Use of Gemma
&lt;/h2&gt;

&lt;p&gt;OpenKhata uses Gemma 3 4B via Ollama to transform noisy, code-mixed shopkeeper speech into structured transaction data with confidence and ambiguity information. The model is useful because it handles the messy language layer, while the application code remains responsible for the final financial safety checks.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;Based on Rahul's feedback, the next improvement would be broader multilingual support. I also want to improve speech recognition for real-world Bengali/Hindi/English code-mixed shop speech. For now, OpenKhata deliberately keeps the human in control.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/ishaanchowdhury1/OpenKhata" rel="noopener noreferrer"&gt;https://github.com/ishaanchowdhury1/OpenKhata&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Demo Video:&lt;/strong&gt; &lt;a href="https://drive.google.com/file/d/1PMPooBlJqikraozcAmFbAUmQreW5YTBW/view?usp=sharing" rel="noopener noreferrer"&gt;https://drive.google.com/file/d/1PMPooBlJqikraozcAmFbAUmQreW5YTBW/view?usp=sharing&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>Hacktober2026</title>
      <dc:creator>Ishaan Chowdhury</dc:creator>
      <pubDate>Fri, 02 Oct 2026 12:47:37 +0000</pubDate>
      <link>https://dev.to/ishaanchowdhury_ic10/hacktober2026-40gk</link>
      <guid>https://dev.to/ishaanchowdhury_ic10/hacktober2026-40gk</guid>
      <description>&lt;p&gt;Hi everyone, I am too excited about this year's Hacktober Fest&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
