Pakka Khata:為印度小商店打造的更智能數碼賬簿
Pakka Khata — A Smarter Digital Khata for Small Indian Shops
Pakka Khata 是為印度小商店店主設計的數碼賬簿,利用開源 AI 協助手寫賬簿數碼化。系統可透過 Ollama 在本機運行 Gemma 3 4B,提取資料供用戶核對後儲存至瀏覽器本機 IndexedDB。現時部署版的掃描功能只會顯示標明為示例的提取結果,並未進行真實模型推理。
What I Built
Pakka Khata is a digital ledger designed for small Indian shopkeepers who still rely on handwritten khata books to track customer credit, payments, and outstanding balances.
These notebooks are familiar, but searching old transactions, calculating dues, preserving records, and reminding customers to pay can be tedious. Pakka Khata brings this everyday workflow into a simple digital application, using open-source AI to help digitize handwritten records.
What it can do
Demo
The deployed application lets users explore the interface and ledger workflows.
Important transparency note: The hosted version currently runs with demo-mode scanning, which returns clearly labelled sample extraction results rather than performing real model inference on the uploaded photograph. Actual model-based scanning has been tested locally with Ollama and Gemma 3 4B. The live demo and local AI configuration are documented in the repository.
Code
GitHub:Veiw on Github
The repository contains the frontend, FastAPI backend, tests, Docker configuration, deployment setup, and installation guides for the different development phases.
The project is designed so that the backend does not maintain a central database of customers or ledger transactions. The browser owns the ledger data, while the backend processes scan and reminder requests.
How I Built It
TECHSTACK
- Frontend: React, Vite, TypeScript
- Browser Storage: IndexedDB and Dexie
- Backend: Python, FastAPI, Pydantic
- AI: Gemma 3 4B through Ollama for local model inference
- Deployment: Docker, Docker Compose, Render
- Testing: Vitest, pytest ###How the AI works
Pakka Khata uses Gemma 3 4B, an open-weight multimodal model, through Ollama for local inference.
The model helps interpret a handwritten ledger image and extract structured information. The application then presents the result for human review instead of automatically trusting every extracted amount or customer name.
The frontend stores ledger records in browser-local IndexedDB. This separates the shopkeeper's ledger storage from the backend's image-processing workflow.
The application was tested across frontend and backend suites, with 12 frontend tests and 31 backend tests passing. Core workflows were also checked manually, including ledger review, saving records, customer management, persistence after refresh, and payment reminders.
Architecture and Implementation
The frontend stores shop settings, customers, and ledger entries locally using Dexie and IndexedDB. When a user scans a ledger page, the image is processed and sent to the backend for extraction. The resulting rows are presented for correction and confirmation before being saved to the local ledger.
The local inference setup uses Ollama with Gemma 3 4B. Docker Compose brings the application and model service together for local development.
The project also includes validation, error handling, request limits, security-conscious logging, and a clearly labelled demo mode for deployment without a dedicated model server.
Testing
The project was tested incrementally across frontend and backend components. The frontend test suite passed 12 tests across four test files, and the backend test suite passed 31 tests. The production frontend build also completed successfully.
Manual end-to-end checks covered scanning and reviewing records, saving entries, managing customer ledgers, persistence after refresh, recording payments, and preparing reminders.
Why Does Open Innovation Matter?
For Pakka Khata, open innovation is not just a technology choice. It shapes how the product can work for small businesses.
Privacy and control: Running Gemma locally through Ollama allows ledger images to be processed without sending them to a third-party hosted AI provider. This is valuable when records contain customer names, credit amounts, and payment histories.
Cost control: Local inference avoids per-request charges from a hosted AI API, although it still requires suitable hardware and electricity. That creates a potential path towards sustainable operating costs for a small-business product.
Freedom to experiment: Using an open-weight model gives developers greater flexibility to inspect the workflow, modify prompts, and experiment with alternative models instead of being tied to one provider's API and pricing.
A practical use case: Rather than building another generic AI chatbot, Pakka Khata applies open-source AI to a specific task that small retailers may genuinely need help with.
The local-first approach is a promising foundation, although it does not yet mean the hosted deployment provides the same live AI functionality.
My Agent Session
The project was developed through an iterative workflow involving implementation, debugging, testing, local AI integration, Docker validation, and deployment.
Repository and implementation: https://github.com/Bhavya4523/pakka-khata-
If the submission form specifically requires a shareable agent-session transcript, add that session's URL here. The repository link is provided separately as the source-code reference.
My First User
My first user was the owner of a small kirana shop in my neighbourhood, where I regularly buy groceries.
I approached him with Pakka Khata and let him use the locally running version on my laptop for a day. I wanted to see whether the application would be useful in an actual shopkeeping context, not just whether it worked during development.
He was impressed by the idea and found the application helpful for digitising handwritten ledger records and managing customer transactions. It was encouraging to see someone outside my development process understand the problem it was trying to solve.
To be transparent, I provided the local version because the deployed version currently uses sample extraction results. The local version uses Ollama and Gemma 3 4B for actual model inference.
This was an initial, one-day trial with one shopkeeper, not a large-scale user study. He did not pay for the application, so I have not yet validated willingness to pay.
The experience reinforced my belief that a focused, familiar tool could be useful to small retailers. My next step would be to gather more feedback, improve the deployed AI experience, and understand which features shopkeepers would value enough to pay for.
Prize Categories
Project theme: SIDE HUSTLE
Pakka Khata explores the potential for a small, practical software product built around an everyday business problem.
The target users are kirana shopkeepers who want to maintain customer credit records without spending extra time manually digitising their notebooks. A future sustainable version could offer a straightforward bookkeeping workflow, privacy-conscious AI scanning, and convenient payment reminders.
The first shopkeeper trial gave me an initial signal of usefulness, but it is only a starting point. Pricing, repeat usage, willingness to pay, and broader demand still need to be validated.
I built Pakka Khata to explore how open-source AI can help turn a familiar manual task into a more manageable digital workflow.
Pakka Khata — helping small shops keep their trusted khata, with a smarter way to manage it.
來源:DEV Community · dev.to