Reference for @86d-store/inventory: stock records, reservations, adjustment endpoints, events, and components.
Experimental. This Module has no test or production evidence recorded yet. Read it, run it locally, and hold off on real Orders. See maturity levels.
The Inventory Module tracks stock for products and variants: current levels, reservations during Checkout, manual adjustments, and low-stock reporting. Browser input never changes Inventory. Stock moves through server-side commerce operations.
The Products package still stores its own Inventory fields, and cross-Module events are not a durable outbox. Verify which record is authoritative, and how retries and oversell behave, before you connect Inventory to live Checkout or Orders.
inventory({ lowStockThreshold: "5", // default low-stock alert threshold reservationTtl: "1800000", // 30 minutes, in ms allowNegativeStock: "false", // when "false", reject orders that would oversell});
Store endpoints
Method
Path
Description
GET
/inventory/:productId
Public inventory level for a product
POST
/inventory/reserve
Reserve stock during Checkout
POST
/inventory/release
Release a reservation
Admin endpoints
Method
Path
Description
GET
/admin/inventory
List inventory across all products
POST
/admin/inventory/:productId/adjust
Manual adjustment (+/-) with reason
GET
/admin/inventory/low-stock
Items below lowStockThreshold
GET
/admin/inventory/audit-log
Inventory change history
Events
Event
When
inventory.adjusted
Manual adjustment recorded
inventory.low-stock
A SKU crosses below threshold
inventory.out-of-stock
A SKU hits zero
Stock also decrements when the Orders Module records order.placed.
Components
<StockBadge inventory={n} />: Storefront badge (“In stock”, “Only X left”, “Out of stock”).
<InventoryWidget />: inline Store Admin widget for adjusting stock.