DEV Community

Cover image for Building an AI-Powered WhatsApp Accounting System for Indian Kirana Stores (DukaanMitra Story)
Amit sharma
Amit sharma

Posted on

Building an AI-Powered WhatsApp Accounting System for Indian Kirana Stores (DukaanMitra Story)

The Problem No One in Tech Talks About

In India, millions of Kirana (local retail) stores still manage accounts in physical notebooks.

Credit entries.
Customer balances.
Daily transactions.
All written manually.

When I visited local shop owners, I noticed something:

They don’t need “another dashboard.”

They need something simple.
Something they already use.

They use WhatsApp.

That’s where DukaanMitra started.
Why WhatsApp-First?

Most SaaS products assume:

Laptop access

Dashboard literacy

English fluency

But small shop owners:

Prefer Hindi

Use mobile

Trust messaging apps more than dashboards

So instead of building a traditional SaaS panel first,
I asked:

What if the accounting system works inside WhatsApp?

The Architecture Behind DukaanMitra

Under the hood, it’s a full multi-tenant SaaS.

Tech Stack:

Firebase Authentication

Firestore (tenant-scoped architecture)

Custom RBAC using claims

Server-side AI processing

WhatsApp message parsing layer

Aggregated analytics engine

Data model:

tenants/{tenantId}
customers/
transactions/
analytics/

Every shop = isolated tenant.

Security rules enforce strict tenant boundary.

The AI Layer

When a shopkeeper sends:

“Ravi ke khate me 500 likh do”

The system:

Parses natural language

Detects customer

Identifies amount

Creates structured transaction

Updates balance

Logs analytics

All without manual dashboard interaction.

AI runs server-side.
Never exposed to client.
Rate-limited per tenant.

Why This Is Harder Than It Looks

Most AI demos work in isolation.

But in production SaaS:

You need cost control

You need tenant isolation

You need role control

You need audit logs

You need failure recovery

AI + accounting + multi-tenancy = serious engineering.

Security First Mindset

In DukaanMitra:

No frontend-only role checks

No shared tenant collections

Separate staging & production projects

Strict Firestore rules

Custom claims-based RBAC

Because financial data cannot leak.

The Real Mission

This is not just a tech experiment.

The mission is simple:

Help small Indian businesses move from notebook → digital
Without forcing them to learn complex systems.

If tech cannot adapt to users,
it’s not innovation.

What I’m Exploring Next

Smarter AI transaction categorization

Credit risk scoring for local shops

Analytics dashboard for shop health

Cost-optimized scaling

If you’re building multi-tenant SaaS, AI agents, or WhatsApp-based systems —
I’d love to connect and exchange ideas.

— Amit Sharma
Founder @ DukaanMitra

Top comments (0)