back

work · orderly

Orderly

WhatsApp ordering for kirana shops

Solo: owner app, WhatsApp bot · 2026

ReactSupabaseClerkNode.jsBuilderBot
Orderly: WhatsApp ordering for kirana shops

Problem

Kirana customers already order over WhatsApp, but owners lose track of messages. Orderly adds an always-on bot that answers price and stock questions from the live catalogue, with no app install for the buyer.

In short

  • -Crash supervisor and 45-second heartbeat, shown live in the owner app.
  • -Owner replies are relayed to WhatsApp through the bot.
  • -State-machine order flow, integer paise, Supabase row-level security.

Architecture

A Node.js WhatsApp bot under a crash supervisor, reading the shop catalogue from Supabase and reporting health to the owner app.

System designOne bot process per shop, kept alive by a supervisor. Dashed = logical link; exact transport not shown.
CUSTOMER SIDESERVER · NODE.JSSHOP SIDEchateventsrestartsshop + item lookupHTTPSSQLsign inheartbeat ·repliesCustomerWhatsApp · no app installWhatsAppQR-linked device sessionBot processBuilderBot ·whatsapp-web.jsCrash supervisorauto-restart · stops at 5crashes / 30 sSupabasePostgres · RLS · shops ·items · ordersShop ownerbrowserOwner appReact 19 + Vite · orders ·chats · inventoryClerkowner sign-in
  • user
  • external
  • service
  • guard
  • data
  • client
  • call
  • logical link
  • ← scroll →
  1. 01Buyer sends a WhatsApp message
  2. 02Bot parses the intent and looks up the live catalogue
  3. 03Order moves through a state machine in Supabase
  4. 04Owner app shows orders and bot heartbeat; owner replies are relayed back

Decisions

+ Rule-based parsing for now- Adding an LLM before the channel is reliable  Reliability of the WhatsApp channel was the bigger problem; an AI parser is the planned next step.

Failure handling

Bot process crashes

Supervisor restarts it; missed heartbeats show in the owner app.

Numbers

45 s

Heartbeat interval

Next

  • ○ Hinglish message → structured, priced order with an LLM
  • ○ Eval set of real order messages