Selected systems Get in touch

Business operations · Web · Live storefront

RabahFoods
Ops

From stock intake
to a settled order.

An operations application for a frozen meats and fish business, connecting inventory, orders, payments, reporting, and AI-assisted ordering across WhatsApp, Instagram and the website.

Role
Architecture and full build
Platform
Next.js web app on Firebase
Public site
rabahfoods.com ↗
RabahFoods live website showing its frozen-food storefront and Ms Poundz ordering assistant
Public storefrontVisit website ↗

Core features.

One application for the whole business, from the freezer to the settled balance.

Stock intake by batch

Every box or lot is received as a batch with its cost, and each intake records how the invoice was paid across cash, mobile money and bank.

Orders and fulfilment

Multi-item orders move from pending to ready to closed, selling loose pieces or full boxes at the box price.

Payments and debt

Sales run unpaid, partial, paid. A debt payment is allocated first-in, first-out across a customer's outstanding sales, with a reprintable receipt.

Cash flow and reconciliation

Admin reports cover cash flow and profit, daily expected-versus-actual reconciliation per channel, expenses and owner drawings.

Ms Poundz, the ordering assistant

Customers order in natural language on WhatsApp, Instagram or the storefront chat, and receive a link to confirm.

A public storefront

The virtual shop lets visitors browse the frozen range and start an order with the assistant.

Architecture

How a conversation, the shop and the back office share one system.

Hover or tap a component to trace its connections.

WhatsApp and Instagram

Where customers message the business

  • WhatsApp Cloud API
  • Instagram Messaging

Meta webhook

Verifies the signature, stores the message, replies 200 at once

  • Next.js route
  • HMAC
  • after()

Ordering agent

Reads the live catalogue, asks questions, drafts the order

  • Tool calling
  • Shared runner

Model provider

OpenAI or Anthropic behind one interface

  • OpenAI
  • Anthropic

Confirmation page

Customer reviews, picks payment and address, confirms

  • Single-use token
  • Places

Firestore

Products, batches, orders, sales, payments, conversations

  • Firestore
  • Admin SDK

Storefront and web chat

The public shop and its chat with the same agent

  • Next.js
  • React

Staff alerts

Pushes each confirmed order to staff

  • Telegram Bot API

Operations app

Stock intake, orders, payments, reconciliation, reports

  • TanStack Table
  • Recharts

Firebase Auth

Admin and sales roles

  • Email and password
All connections
  1. WhatsApp and Instagram to Meta webhook: message
  2. Meta webhook to Ordering agent: agent turn
  3. Storefront and web chat to Ordering agent: /api/chat
  4. Ordering agent to Model provider: prompt + tools
  5. Ordering agent to Firestore: draft order
  6. WhatsApp and Instagram to Confirmation page: confirm link
  7. Confirmation page to Firestore: draft to pending
  8. Confirmation page to Staff alerts: staff alert
  9. Operations app to Firestore: fulfil, collect, report
  10. Operations app to Firebase Auth: roles

Innovation highlights.

Innovation one

A draft is not an order

The assistant can only create a draft. It becomes a pending order when the customer confirms on a single-use page with a 24-hour token, keeping a human handoff between conversation and fulfilment.

Innovation two

Answer Meta in time, think afterwards

The webhook verifies the HMAC signature, stores the message and returns 200 immediately. The agent runs after the response with Next.js after(), so no worker queue is needed.

Innovation three

One agent, three channels, two models

WhatsApp, Instagram and web chat share one conversation model and one agent loop. OpenAI or Anthropic sits behind a shared runner interface, switched by one setting.

Technology stack

What it is built with.

Application

  • Next.js 16 App Router
  • React 19
  • TypeScript

Interface

  • Tailwind CSS 4
  • TanStack Table
  • Recharts
  • React Hook Form

Data

  • Firestore
  • Firebase Auth
  • Firebase Storage
  • Admin SDK

AI and messaging

  • OpenAI
  • Anthropic
  • WhatsApp Cloud API
  • Instagram Messaging
  • Telegram Bot API

Next project

Speech & presentation · Desktop LumosCast