Inspiration
We make solid wood slab tables in Phrae, Thailand, and have 7,000+ customer reviews. Every slab we sell exists only once, and every table is finished to order with the customer's legs and finish.
Online shops are built for the opposite: identical products, a catalogue photo, pay in full, sell as many as you like. None of that works for us. So every sale moves into a chat, and I chat with many customers at the same time. Often several of them want the same slab: one asks if it is still available, one asks me to hold it until tomorrow, one sends a transfer slip. Who gets it? Did I already promise it to someone? It is slow, it causes arguments, and it stops when we sleep.
We wanted one simple, fair rule: whoever pays the deposit first gets the slab. A 50% PayPal deposit reserves that one slab for that one customer for 3 days, the website marks it Reserved so nobody else can pay for it, and if they change their mind within 3 days the deposit is refunded and the slab goes back on sale.
In this sandbox demo, test reservations are released automatically after 30 minutes so judges can try the same slabs. The 3-day period describes the intended customer refund policy.
What it does
- Finds the real piece. Customers describe their room. A Gemini agent calls
search_slabson live stock (real slabs, real photos, real measurements) and explains which slab fits and why. It never invents stock or prices. - Made to order. Customers choose steel, wooden or no legs and one of five finishes, and see the total at once. The agent can suggest options, for example a durable polyurethane finish for a family with kids.
- Reserves one unique item. A 50% PayPal deposit locks that one slab to that one customer as soon as it is captured. No double-selling.
- The full made-to-order lifecycle on PayPal:
- deposit to reserve (Orders v2)
- delivery address taken from the PayPal checkout
- a 3-day change-of-mind window with a one-click full refund (Refunds)
- a balance invoice before shipping (Invoicing v2)
- Owner desk on AG Grid. Orders with phone, delivery address, refund and invoice actions; editable stock that updates the shop and the agent instantly; and a photo-to-listing writer (Gemini vision).
- Ready for AI shoppers. The store is an MCP server. Claude, ChatGPT or any agent can find a slab and create a PayPal deposit link, and the human approves the payment on PayPal.
- Findable by AI search. Live schema.org product data and an
llms.txtdescribe the stock to search engines and AI assistants.
How we built it
React + Vite front end, Node/Express API, deployed on Render.
- PayPal:
- JavaScript SDK (
@paypal/react-paypal-js) for wallet and card checkout - Orders v2 create and capture, with legs, finish and contact details carried in
custom_id - an Orders v2 redirect flow (
payer-actionlink) for checkouts created by AI agents - Invoicing v2 create and send
- Payments v2 capture refunds
- JavaScript SDK (
Every amount is computed on the server from stored prices; the browser never sends a price.
- AI (Google Gemini):
- function calling for the shop agent (
search_slabs,start_checkout) - vision with a JSON response schema for listings
- automatic fallback across Gemini models when one is busy
- function calling for the shop agent (
- MCP: a stateless Streamable HTTP server (
@modelcontextprotocol/sdk) with four tools:search_slabs,get_slab,create_deposit_checkoutandcheck_checkout. - AG Grid Community for the owner desk; Render for hosting.
Challenges we ran into
- Uniqueness. Every slab is stock of one, so a reservation has to be atomic. A capture can arrive twice (page reloads, an agent checking the order), so the capture step is safe to repeat.
- Keeping the agent honest. It must search real stock before recommending anything, and can only check out slabs that are still available.
- Pricing made-to-order goods. The price depends on the slab, legs and finish. It is quoted live in the browser but always recomputed on the server before PayPal sees it.
- Free-tier AI limits. We added model fallback with cooldowns based on Google's retry hints.
Accomplishments we're proud of
A real small business on real stock, end to end: chat, a recommendation, customisation, a PayPal deposit, a reservation, a refund or a balance invoice, and new stock from a phone photo.
What we learned
Unique, made-to-order goods need a different checkout, one built around reserving rather than buying. And agentic commerce works best when the agent finds and proposes, while the payment stays a clear human approval.
What's next
Moving from JSON files to a database, a LINE integration for order updates, PayPal webhooks to mark balances paid automatically, and opening the same flow to other makers of one-of-a-kind goods.
Built With
- ag-grid
- express.js
- google-gemini
- model-context-protocol
- node.js
- paypal-invoicing-api
- paypal-javascript-sdk
- paypal-orders-api
- paypal-payments-api
- react
- render
- vite