spree-data-model
Installation
SKILL.md
Spree Data Model
A relationship map for the most-asked-about Spree models. Field-level documentation lives in the installed @spree/docs package at node_modules/@spree/docs/dist/developer/core-concepts/.
The catalog → cart pipeline
Product → Variant → LineItem → Order
- Product is the brand-level entity (name, slug, description, category).
- Variant is the sellable SKU. Every Product has at least one Variant. Variants carry SKU, prices, dimensions, and link to inventory.
- LineItem links a Variant to an Order with
quantityand price frozen at add-time. - Order is the customer's transaction — the cart-in-progress and, after checkout, the completed transaction (same record, different
state).
Variants relate to stock via StockItem (one per Variant per StockLocation) and the StockMovement history.