Skip to content
All work
SaaS2026 Case study

Dukaro

Order-to-cash software for wholesale distributors: offline field orders, GST invoices on WhatsApp, multi-warehouse stock and live delivery tracking.

dukaro.techiesofepi.com
Dukaro landing page
Apps, one platform
3
Roles with their own permissions
5
Field orders sync later
Offline

The challenge

Wholesale distributors ran sales reps, the office, the warehouse and delivery trucks on paper order books, a desktop billing package and phone calls. Orders were lost in shops with no signal, stock was oversold when two people confirmed at once, and nobody could say where a delivery was without ringing someone.

Our solution

We built one platform with three faces: an offline-first Flutter field app for sales and delivery agents, a Next.js office console and a NestJS API. Phones sync an idempotent outbox, stock is reserved atomically in the database, invoices go out on WhatsApp on dispatch and every drop is tracked live on a map.

Built withFlutterNext.jsNestJSPrismaPostgreSQLSocket.IO

How we built it

The approach.

  1. 01

    Start from the worst shop, not the demo

    The design brief was the sales rep standing in a small shop with one bar of signal and a queue behind them. Every field flow had to work offline first and sync later, so orders are never lost to a dead zone.

  2. 02

    Make sync idempotent

    IDs are generated on the phone, so a shop created offline can be referenced by an order created offline. The device pushes an ordered outbox, each mutation id is recorded on the server, and a replay returns the stored result instead of creating a duplicate.

  3. 03

    Guard stock in the database, not the UI

    Stock changes happen only through one service, as a single conditional update inside the business transaction, with a ledger row for every movement. Concurrency cannot oversell and the ledger always explains the balance.

  4. 04

    Push changes instead of polling

    Domain events are emitted after commit to each distributor's room over Socket.IO, so the office sees new orders, deliveries and payments the moment they happen, and agents get FCM pushes for new drops.

  5. 05

    Keep the monolith modular

    Orders, stock, billing, deliveries, returns, tracking and sync are separate NestJS modules in one service. It is simple to run on Render today, and the module lines are where it would split if a team ever needed to.

The business it is built for

A wholesale distributor runs on four groups of people who rarely sit in the same place. Sales reps visit shops and take orders. The office checks stock and credit and raises invoices. The warehouse picks, packs and loads trucks. Delivery agents drop goods and collect cash. Most distributors we spoke to stitched this together with paper order books, a desktop billing package, phone calls and WhatsApp messages, and nobody could say where a given order was without ringing someone.

Dukaro replaces that with one system that each of those people sees from their own angle.

Offline is the main case

In a city office, "works offline" is an edge case. For a sales rep in a market lane or a village shop, it is the normal case. If the app needs a network to save an order, the rep goes back to the paper book, and the system is dead on arrival.

So the field app treats the phone as the first place an order lives. Shops, orders, collections and returns are written to a local SQLite store with IDs generated on the device, and an ordered outbox is pushed to the server when the network allows. Each mutation carries its own id, which the server records, so a retry after a timeout returns the stored result rather than creating a second order. Business rejections, such as a credit limit being exceeded, are final and shown to the agent. Server errors are retried.

Stock that cannot go negative

The most expensive bug in distribution software is selling stock you do not have. It usually happens when two people confirm orders at the same moment and both read the same "available" number.

Dukaro moves that check into the database. Confirming an order reserves stock with a single conditional update that only succeeds if enough is available, inside the same transaction as the order change, and writes a row to a stock ledger. Dispatch converts the reservation into a deduction. Returns of saleable goods go back on the shelf and credit the shop. At any moment, the ledger explains exactly why the number is what it is.

Invoices, delivery and cash

On dispatch, the office raises a GST tax invoice with the CGST and SGST split worked out per line, the same way in the API, the office console and the phone. It goes to the shop on WhatsApp before the truck leaves. Delivery agents stream their location in batches, stored offline in dead zones, so the office sees every drop on a live map, and each step from packed to delivered is time-stamped. Cash, UPI, card and bank transfers are recorded at the doorstep and settle the shop's balance.

Where it landed

Dukaro is live, set up for distributors in India and Zimbabwe, with an office console on Vercel, the API and field app on Render and Postgres on Neon. A sister product, Dukaro Lite, takes the same engine to van sales, where the salesman sells straight from the truck.

Frequently asked questions

Does Dukaro work without internet?

Yes. Field orders, collections and returns save on the phone and sync automatically when the network is back. Sync is idempotent, so a retry never creates a duplicate order.

How does Dukaro prevent overselling?

Stock is reserved with a single conditional database update inside the order transaction, and every movement is written to a stock ledger. Two managers confirming orders at the same moment cannot take the same units.

Can one Dukaro deployment serve several distributors?

Yes. Every row carries the distributor it belongs to and every query is scoped to the signed-in user's distributor, so one deployment is safely multi-tenant.

What is Dukaro built with?

A Flutter field app with SQLite for offline storage, a Next.js office console, a NestJS API with Prisma and PostgreSQL, Socket.IO for realtime updates and FCM for push notifications.

Let's build together

Have somethingworth building?

Tell us about it. You'll get an honest read on scope, timeline and cost within one business day — from the people who would actually do the work.

Or email us directly — info@techiesofepi.com