Fast projections and a live browser stream keep the product page useful and current.
BlueShop Real-Time Inventory — As Built
What this showcase explains: a warehouse change updates customer-facing availability, then checkout confirms whether the requested quantity can still be reserved.
1. What BlueShop Delivers
The customer sees availability change as warehouse reality changes. Checkout does not trust that screen blindly: it returns to Stock for an authoritative reservation.
An atomic reservation guard accepts one valid hold and refuses every request that arrives too late.
2. Warehouse Change Becomes Customer Visibility
The first film shows the complete visible story with burned-in narration.
Warehouse Change Flips the Storefront Live
A damage adjustment closes the purchase action. A goods receipt reopens it. The customer does not reload the page and the operator does not coordinate with the storefront.
3. The Final Unit Is Decided Once
Seeing availability is informative. Receiving a reservation is decisive. The second film shows two independent customers acting on the same last unit.
One Shopper Wins the Last Unit
Both customers begin checkout simultaneously. Stock grants one reservation, lets that customer continue to shipping, and gives the other customer a clear sold-out result.
Reservation accepted
The guarded update holds the unit and checkout continues.
available ≥ requestedInsufficient stock
The same guard no longer matches. No oversell and no false order.
4. Business Result
- 01More accurate availabilitySold-out inventory stops looking purchasable to active customers.
- 02More sellable timeReplenished stock returns to sale without manual storefront coordination.
- 03No final-unit oversellOne request receives the hold; every later request receives a clear outcome.
- 04Operational traceabilityReceipts, damage, reservations and releases remain explainable movements rather than silent edits.
How inventory works
The customer story ends above. The sections below explain ownership, transactions, asynchronous delivery, browser recovery and the database decision that prevents overselling.
5. How Inventory Moves
One path keeps the shop current. A separate path confirms availability at checkout before any unit is reserved.
| Boundary | Owns | May project | Must never decide |
|---|---|---|---|
| Stock | Quantity, movements, reservations, available-to-sell | Authoritative state and audit ledger | Product merchandising or order lifecycle |
| Catalog / Storefront | Product presentation and customer interaction | Availability for fast customer reads | Whether the final unit is held |
| Cart | Checkout orchestration | Reservation identity and status | Stock allocation without Stock confirmation |
6. Live Availability Sequence
The browser starts from a database snapshot and then follows full-state changes emitted after committed warehouse transactions.
7. Reservation Concurrency
Two requests can reach checkout together. Correctness comes from the database mutation predicate, not request timing or the customer-facing projection.
8. Reservation Lifecycle
A checkout hold either becomes committed order stock, returns through cancellation, or expires safely. Each route keeps quantity changes and reservation state consistent.
FULFILLED is the current Stock state name for a reservation committed to an Order; it does not mean Cart owns the business capability of fulfilment. Quantity remains reserved until shipment deducts physical stock. Cancellation and expiry return held quantity. Cleanup claim and release share one transaction, so a release failure leaves the active hold available for the next sweep.9. Failure and Recovery
Distributed reads can update at different times. Each failure mode stays bounded, while Stock keeps quantity and reservation changes consistent in one transaction.