Inspiration

A small shopkeeper’s attention belongs with customers. Duka explores a shorter stock workflow: say what changed, check the quantities, and confirm. The prototype uses fictional products and prices for a Lusaka corner shop. This is a design hypothesis; a shopkeeper trial has not yet been conducted.

What it does

Duka records sales and deliveries, answers low-stock questions, and prepares reorder drafts. “Sold three milk and two bread” shows both products’ before-and-after quantities. Only explicit confirmation saves the inventory and activity together. Reorder CSVs are unsent drafts; no supplier is contacted or paid.

How we built it

React, TypeScript, Vinext, Tailwind, shadcn components, and Cloudflare D1 power the application. A real stateless HTTP MCP endpoint exposes inventory, update-preview, reorder-preparation, and activity tools. The browser initializes the protocol and makes JSON-RPC tool calls.

This is an Alexa+ web simulation developed with coding-agent assistance. Browser speech recognition creates a transcript that the user checks before sending; typed and manual updates are available too. The current language layer is a deterministic parser with product aliases and spoken-number support, not an LLM. No Echo device, Amazon account, or external Alexa+ client is connected.

Reviews capture a shop revision. An atomic database batch prevents stale reviews from overwriting newer stock and repeated confirmations from deducting twice. Shop identity scopes inventory and exports. MCP responses include an authenticated review link: opening it or refreshing the browser restores the same pending plan without confirming it or granting access to another shop.

Challenges

Voice input needs a correction point. Duka separates the transcript, quantity review, and confirmation. Unknown products and impossible sales are rejected instead of guessed. Tool preparation is not a saved sale: confirmation stays in the human review screen.

Browser testing exposed a pending review disappearing after refresh and a command input positioned below the response history on narrow screens. We added database-backed review recovery and moved the input ahead of responses. The friction log records the observed issues and fixes.

Accomplishments

  • A working inventory workflow with durable storage and compound updates.
  • Explicit before-and-after review, recoverable review links, activity history, and downloadable drafts.
  • 12 passing domain tests and 24 HTTP/database checks, including concurrent edits, repeated confirmations, review recovery, and shop isolation.
  • Browser checks at 390 × 844 and 1280 × 900.
  • A public MIT-licensed repository and reproducible local judge setup without an account, API key, or purchased hardware.

What we learned

Trustworthy state transitions matter as much as language interpretation. The interface must distinguish a prepared suggestion from a saved change, and a draft from a dispatched order.

What’s next

Test real microphone accuracy and the workflow with a willing shopkeeper, measure corrections and task time, improve catalog editing and aliases, and implement supported authentication for an external Alexa+ client. Broader language support should follow measured need and evaluation.

Source: https://github.com/lavu1/duka-stock Judge setup: https://github.com/lavu1/duka-stock/blob/main/docs/judging.md

Demo

The 2:06 English walkthrough shows the actual application with fictional shop data: review a sale, recover it after refresh, confirm, reject an impossible sale, receive stock, and save an unsent reorder. It demonstrates typed input and uses synthetic English narration.

Watch: https://youtu.be/4JPdPXOuqHA

Built With

Share this project:

Updates

Submission history