An offline-first, multilingual point-of-sale and shop register for Pakistan's roughly 3 million kiryana (neighbourhood grocery) shops. It includes an on-device, open-source AI accountant called Munshi AI.
Project Overview and Links
DukaanVoice PK — ڈیجیٹل دکان کھاتہ و پوائنٹ آف سیل
An offline-first, multilingual shop register and point-of-sale for Pakistani kiryana (neighbourhood grocery) shops — with an on-device, open-source AI accountant called Munshi AI at its core.
Small shops run on thin margins, unreliable internet, and a bookkeeper who may not read English fluently. DukaanVoice PK turns the counter into a fast, auditable register and gives the owner an AI Munshi that understands Urdu, forecasts stockouts, catches cash-desk mistakes, and quotes live wholesale rates — without sending a single rupee of customer data to a server.
Built for Hacktoberfest 2026 — "Side Hustle".
Why open source is the whole point
| Closed-API alternative | What open gives us here |
|---|---|
| Per-query pricing on every shopkeeper message | Gemma runs locally via Ollama → ~Rs.0 marginal cost, a business that actually works on grocery margins |
| Customer names, credit ledgers and prices uploaded to a vendor |
Hackathon Prize Categories Entered
1. Best Use of Gemma 4 (Google DeepMind)
DukaanVoice PK uses the open-weight Gemma 4 31B model, run with Ollama, as the multilingual engine of Munshi AI. Munshi AI is the shop's automated accountant.
Shopkeepers enter natural orders in Urdu or Roman Urdu. One example is 2 kilo atta aur ek doodh bill mein daalo. Gemma converts the unstructured text into a draft bill that the shopkeeper can confirm.
A deterministic engine runs every calculation. This guarantees 100% financial accuracy. An offline heuristic fallback keeps shop operations running when the network connection is lost.
2. Best Open-Source AI Project (DigitalOcean)
DukaanVoice PK relies on open-source and open-weight AI. Local Gemma inference and IndexedDB keep customer names, credit ledgers (Udhaar), and cash flows on the shopkeeper's own device.
Open-source models remove per-query API fees. This is a requirement for low-margin grocery retail. The models also allow customization for regional dialects and for units such as ser and pao.
The open-source Mastra framework orchestrates the tools. Sentry traces make every step visible.
3. Best Build for Food & Workspaces (Event Prize)
Kiryana stores supply everyday food to Pakistani neighbourhoods. DukaanVoice PK shortens their daily workflow in four ways:
- It records sales in seconds.
- It manages Udhaar Khata (customer credit).
- It predicts inventory stockouts before basic staples run out.
- It fetches live wholesale mandi commodity rates to protect profit margins.
The Problem and the Solution
Pakistan's roughly 3 million kiryana stores operate with low profit margins, unreliable internet, and paper ledgers (Khata).
Standard POS systems do not fit this setting. They need a continuous connection. They demand English literacy. They also charge recurring subscription fees.
DukaanVoice PK gives the shop counter an offline-first POS register and Munshi AI, an AI accountant. Munshi AI understands spoken and typed Urdu, Roman Urdu, and English. It executes verifiable ledger operations, forecasts inventory demand, detects cash-desk anomalies, and quotes live commodity prices.
Key Features
- Voice and multilingual AI counter: Understands Urdu, Roman Urdu, and English voice or text input and builds bills in seconds.
- 9 core register modules: Quick Sale, Dashboard, Products, Transactions, Udhaar Khata (customer credit), Expenses, Cash Closing (Roznamcha), Reports, and Munshi AI.
-
Deterministic accounting principles:
- All currency is stored as integer paise, which removes floating-point errors.
- A strict draft-to-confirmed sale lifecycle decrements inventory exactly once.
- Cash closing separates physical cash from digital transfers.
- Predictive stockout alerts: Uses TabPFN, a tabular foundation model, for 7-day demand forecasting and stock reordering.
- Real-time mandi rates: Live wholesale commodity prices come from SerpApi.
- Text-to-speech: ElevenLabs reads ledger responses aloud, with a Web Speech API fallback.
Architecture
The AI model drafts each action. Verified TypeScript code then executes it.
Browser (Offline-First IndexedDB Ledger) ──► Next.js Server (AI Routes)
├── React 19 UI & AppShell ├── /api/ai/munshi
└── Local Ledger Storage │ ├── Gemma (Ollama / Local)
│ ├── TabPFN (Forecast & Anomaly)
│ ├── SerpApi (Live Mandi Rates)
│ └── Telemetry (Sentry Spans)
└── /api/ai/mastra (Agent Orchestrator)
- Client-side autonomy: All ledger data stays in IndexedDB on the local device.
- Deterministic execution: The AI model drafts actions. Verified TypeScript code executes the transaction, which guarantees financial precision.
- Fallback: The app works offline. An 87-test suite runs without API keys or an active internet connection.
Tech Stack and Development Tools
- Frontend and framework: Next.js 16, React 19, TypeScript, Tailwind CSS
- Database and storage: IndexedDB (client-side offline ledger), Zod
- AI and machine learning: Gemma (Google), TabPFN (Prior Labs), Mastra, Ollama
- Integrations: ElevenLabs (voice TTS), SerpApi (wholesale rates), Sentry (telemetry)
- Testing and CI/CD: Vitest, React Testing Library, GitHub Actions, Render Blueprint
- AI coding tools used: OpenCode, GitHub Copilot, Antigravity, Google AI Studio













