← All workWhatsApp
WhatsApp Commerce Suite
One state-machine architecture, three businesses. Deterministic where a wrong answer costs money.
- Client
- Multiple, restaurant, retail, hospitality
- Role
- Architecture and build
- Year
- 2025, 2026
Not deployed
- businesses on one architecture
- 3businesses on one architecture
The problem
Kenyan businesses live on WhatsApp, but pointing a language model at a customer and letting it run the whole order is how you invent a menu item or confirm a total that does not match the cart. These three needed the opposite: an order flow that is correct every time, not plausible most of the time.
What I built
- 01A deterministic state-machine conversation engine: every state, transition and reply explicitly defined. The bot cannot say anything it was not built to say. The natural-language layer in Wanjii Bot sits on top of this same core.
- 02Full ordering flow, greet by name, recognise returning customers, browse categories to items to variants, multi-item cart, delivery address and phone capture, order summary, confirmation, payment instructions.
- 03Per-user conversation state persisted in PostgreSQL, so a customer can walk away mid-order and come back to it.
- 04An admin API for order management and payment verification, with a Next.js dashboard on top.
- 05Hotel Feedback Pulse on the same base: short guest prompts during a stay, follow-up capture on anything neutral or negative, sentiment and category tagging, and a real-time staff alert when something goes wrong, a multi-hotel data model from the start.
- 06Re-seeded for Jaba Juice retail as a separate service, so two businesses could evolve without sharing a codebase.
Stack
- Node.js
- TypeScript
- Express
- PostgreSQL
- Meta WhatsApp Cloud API
- Next.js
- Railway
Result
An architecture proven across three businesses in two sectors, and the foundation the productised Wanjii Bot was built on.