LeetCommerce
Multi-tenant e-commerce on Cloudflare Workers, built for Bangladesh: cash on delivery with SMS confirmation, local payment and courier integrations, a Bangla-first storefront, and a store that AI agents can read and buy from.
The demo uses simulated payments and couriers, shows SMS and email on screen, and resets every night.
What to try
Buy with cash on delivery
Add a Panjabi to the cart, apply
EID10, check out, then confirm the order with the SMS code shown on the order page.Run the shop
In the admin: confirm orders, book a courier, edit variants and stock, import products from CSV, create discount codes.
Ask the AI assistant
It reads products, stock and orders, and proposes changes. Nothing changes until someone approves it in the review queue.
Connect an agent
Point an MCP client at
https://demo.leetlab.dev/mcpto search, fill a cart and place an order as a shopping agent.
How it is built
One Durable Object per store
Each tenant's catalogue, carts, orders and audit log live in its own SQLite Durable Object (Drizzle, synchronous transactions). Zero oversell under concurrent checkout, tested.
Edge routing by host
A gateway Worker routes each store's hostname to the storefront (Astro), admin (React) or API (Hono) Worker through service bindings.
One tool registry
Every admin operation is defined once with its schema and permission; the Admin API routes and the agent's tools are generated from it.
Outbox to queue
State changes write an outbox in the same transaction; an alarm flushes it to Cloudflare Queues, where a jobs Worker sends bilingual emails.
Agent-readable stores
JSON-LD on product pages, llms.txt, Google and OpenAI product feeds, and a stateless MCP server.
Safety built in
Money as integers, tenant from the verified host, encrypted provider credentials, problem+json errors, rate limits and an AI spend cap.