The atomic reserve pattern
Check-and-hold as a single serialised operation — the same spine for any booking, ticketing or inventory system where two buyers cannot win the same thing.
A demonstration storefront for wing hire and purchase, with date selection, a basket and an owner view.

01 The brief
The demo explores a small wing-hire catalogue, with hire dates, purchase options and limited inventory.
Payment collection is disabled in this demonstration. It shows a booking and order flow, with simulated payment confirmation.

02 What was built
Date-based hire and limited inventory.
03 The system
Step 1 — Browse
Two products, photographed like couture — because two products photographed properly outsell forty photographed badly.
04 Behind the screen
The first prototype stored holds in a key-value store; a measured delay of about a minute before a new hold became visible meant a real double-booking window. So the reservation moved into a single Durable Object that serialises every check-and-write. Slow infrastructure was replaced by correct architecture.
The reservation flow uses an atomic section for hold checks and writes. Overlap and retry scenarios need acceptance testing before a live launch.
The commerce engine runs on Node in development and on Cloudflare Workers for the deployed demo, with a storage adapter for each runtime.
Two data modules are the single source of truth for the pages and the order builder alike. Hard-coded dollar figures are forbidden by the repo’s own working rules.
Payment collection remains disabled. This example shows the user journey and does not establish a history of paid customer orders.
05 Project screenshots
Demo build — payment collection is disabled






06 What became reusable
Check-and-hold as a single serialised operation — the same spine for any booking, ticketing or inventory system where two buyers cannot win the same thing.
Date ranges encoded so overlap is a string comparison. Tiny, portable, and testable without any infrastructure.
Fast replay before the work, authoritative check inside the atomic section. Double-clicks and retries collapse into one order.
A live payment connection, provider configuration and production acceptance checks are separate launch work.
· Next case study — 01
Mystic Wellness
A wellness studio that used to book by text message now runs sessions, studio hire, workshops, a shop, gift cards and referrals through one system.