Nirmal Solanki

Relay

Solanki Jewellers, Malur

A jewellery shop's counter, customers and WhatsApp, run from one cockpit.

the counter's bills, mirrored
5 min
the counter's bills, mirrored
of bills behind every message
5 years
of bills behind every message
decision records
104
decision records
browser checks, in 3 browsers
436
browser checks, in 3 browsers

Solanki Jewellers has kept a counter in Malur, Karnataka, since 2005. Its sales lived in billing software on a Windows machine behind the counter. Its customers were spread across that software and three spreadsheets. Relay brings all of it into one place and turns it into messages the shop can stand behind.

The counter, mirrored

Every five minutes a script on the shop’s own machine reads the billing database and posts what changed. Nothing is installed in the billing software and nothing is ever written back to it. Five earlier years of bills were read once into an archive beside it. A number that bills and is not yet in the book is added, with nothing guessed about who they are, and waits in Review until a person has looked at it.

One cockpit

A web app the shop runs from a phone, a tablet or a laptop. Bills reads the counter live. Regulars says who keeps coming back, measured against each person’s own rhythm instead of one rule for everyone. Review is where every new number is confirmed by a person. Segments cuts who a message goes to. Inbox is the shop’s WhatsApp. Dispatch is the gate.

WhatsApp, the official way

Meta’s Cloud API directly, with no reseller in between, on the shop’s own verified business number. Every message the shop starts is a template Meta approved word for word, in Kannada, Hindi or English. Replies come back to the Inbox with their photos and voice notes.

What it sends

  • A thank-you the day after a purchase, written for each buyer from their own history. It never names a price, a weight or an item.
  • A welcome the morning after a first bill, with the shop’s number to keep for gold and silver rates.
  • Answers to “hi” and “today’s rate?” the moment they land, in the language they were asked in. The rate is read off the counter’s own bills.
  • Festival greetings, each gated to the communities that keep the festival.

Also built

The shop’s catalogue: stock photographed and entered at the counter, published as a static site a customer opens from a WhatsApp link. A six-page shopfront. An atlas that renders every document, diagram and commit of the project on one private site. Built in twelve weeks: about 700 commits, 122 database migrations, 14 server functions.

Screens

05
Dispatch at 9:56 pm. Approving is shut until 10 am; until then a message can only be edited or rejected.
Dispatch at 9:56 pm. Approving is shut until 10 am; until then a message can only be edited or rejected.
The Inbox. A customer asks in Kannada and sends a photo; the reply goes out inside WhatsApp's 24 hours.
The Inbox. A customer asks in Kannada and sends a photo; the reply goes out inside WhatsApp's 24 hours.
Review. A new number from the counter waits for a person to set community, language and relation.
Review. A new number from the counter waits for a person to set community, language and relation.
Segments. Who a message goes to, cut by who they are, what the counter knows and what WhatsApp knows.
Segments. Who a message goes to, cut by who they are, what the counter knows and what WhatsApp knows.
Dispatch on a desk. A message whose words match no Meta-approved template is held, and nothing sends it.
Dispatch on a desk. A message whose words match no Meta-approved template is held, and nothing sends it.

The real cockpit running on its test database. Every person and number in it is invented, and names and numbers are blanked on top of that.

How it is built

A gate
From the counter
  1. Billing software

    On the counter's own Windows machine. A login that can only read.

  2. Sync, every five minutes

    A script on that machine posts what changed. Nothing is installed in the billing software.

  3. Ingest

    One transaction or none. Two tables it may write, and nothing else.

  4. Postgres

    Bills, contacts, messages. Row-level security; only invited operators get in.

  5. Cockpit

    Bills, Regulars, Review, Segments, Inbox, Dispatch.

To the customer
  1. Morning jobs

    Yesterday's bills become a welcome for each new customer and a thank-you for each buyer.

  2. One model call per buyer

    Written from what five years of bills say about that person. Never a price, a weight or an item.

  3. Dispatch Gate

    A person approves, or the lane's auto-approve does. Refused outside shop hours by the database.

  4. Sender, every minute

    Sends each message as the Meta-approved template its words are, or not at all.

  5. WhatsApp Cloud API

    Direct with Meta, from the shop's verified number.

Back from the customer
  1. A customer writes

    Text, a photo, a voice note.

  2. Webhook

    Every post checked against Meta's signature.

  3. Answer

    Automatic reply

    A hello, or today's gold and silver rate, in the script they wrote in.

    Inbox

    Everything else waits for a person, inside WhatsApp's 24 hours.

Decisions

04
  1. 01

    Read the counter. Never write to it.

    The billing software prints the bill the customer carries out and keeps the shop's tax record. A trigger inside it would be wiped by the next vendor update, and the vendor's backup tool means running someone else's code on their schedule. Reading the tables touches nothing. So the mirror reads, with a login granted SELECT and nothing more, and stops the moment it is refused.

  2. 02

    The model never gets the chance to be wrong about faith.

    A Diwali greeting sent to a Muslim family travels further than ten good messages. Prompt instructions are guidance, not enforcement, so the gate sits in the database query. A festival runner never sees a contact outside its communities, and an untagged contact is left out, not guessed. The tags come from a deterministic lexicon over names, not a model, so a wrong one can be explained and fixed.

  3. 03

    Nothing leaves without approval.

    A message to a customer cannot be taken back. Every message lands in Dispatch first. The database signs each decision, allows only the moves the operator is meant to make, and the sender reads approved messages and nothing else. Auto-approve came later, one lane at a time, and it still only clears what Meta has approved word for word.

  4. 04

    One call per person.

    Notes written as one batch rhymed. Nine of nine opened the same way, because each was written leaning on the one before. Now every note is its own call, given only its own person's history from the bills, and it never sees anyone else's.