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 quantity and 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.

Master vs default variant

Installs
46
GitHub Stars
4
First Seen
Jun 11, 2026
spree-data-model — spree/agent-skills