Skip to main content
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 Products Module is the catalog: products, variants, categories, collection links, search, and CSV import. Use it with Inventory and Collections, and treat Checkout as the place that recalculates price and availability.
This package overlaps with the Inventory and Collections modules: some records exist in more than one place today. Do not treat a duplicated field as the final authority. Checkout must recalculate price and availability through the verified store path.
Current: products.catalog.draft@1, review@1, and publish@1 run as store Commands locally. Publication records catalog.published@1 in one owner-local transaction. Not yet: Storefront, search, and feed still do not read the published revision. Do not call publication Stable. Source: modules/products · npm: @86d-store/products

Installation

Then register the Module in your store’s config.json:

Configuration

Pass options to the factory when you register the Module:
number
default:"20"
Default number of products returned per page on listing endpoints.
number
default:"100"
Hard cap on limit query parameter. Requests above this value are clamped.
boolean
default:"true"
Enable inventory tracking by default for new products. Products with trackInventory: false skip all inventory increment and decrement operations.

Store endpoints

Store endpoints are public and return only active products. Use them from your Storefront to browse, search, and display products.

Products

Query parameters for GET /products

Categories

Collections

Admin endpoints

Admin endpoints require authentication and return all product statuses (draft, active, archived).

Products

Variants

Categories

Collections

Components

Add these components to your MDX Template files. The Module must be listed in config.json for the components to be available.

ProductCard

Displays a single product card with image, name, price, discount badge, and an optional Add to Cart button.
Product
required
A Product object. See the Types section for the full shape.
boolean
default:"true"
Show the Add to Cart button on the card.

FeaturedProducts

Responsive grid of featured products. Fetches its own data; no props required.
number
Maximum number of featured products to display.
string
Section heading rendered above the grid.

ProductListing

Full product listing with search, category, price, stock, and tag filters, plus sorting and pagination. Fetches its own data.
string
Pre-select a category filter on initial render.
Pre-fill the search query on initial render.
number
Number of products per page.

ProductDetail

Full product detail page including image gallery, variant selector, pricing, inventory status, reviews, and related products. Loaded automatically by the store’s /products/:slug catch-all route.
string
required
Product slug from the URL.
Record<string, string>
required
Route params object (for example params.slug).

RelatedProducts

Horizontal grid of related products scored by shared category and tags. Fetches its own data.
string
required
Product ID to find related products for.
number
Maximum number of related products to show.
string
Section heading.

CollectionCard

Displays a single collection card with image, name, and description.
CollectionCardData
required
Collection object with id, name, slug, description, and image.

CollectionGrid

Grid of collections with optional featured-only filtering. Fetches its own data.
string
Section heading.
When true, only featured collections are shown.

CollectionDetail

Full collection page with image, description, product count, and products grid. Loaded automatically by the store’s /collections/:slug catch-all route.
string
required
Collection slug from the URL.
Record<string, string>
required
Route params object.

StarDisplay

Read-only star rating display.
number
required
Rating value between 0 and 5.
"sm" | "md" | "lg"
default:"\"md\""
Star size.

StarPicker

Interactive star rating input for review submission.
number
required
Current rating value.
(n: number) => void
required
Callback fired when a Shopper selects a rating.

StockBadge

Inventory status badge. Displays “Out of stock”, “Only X left”, or “In stock” based on the inventory count.
number
required
Available inventory count.

ProductReviewsSection

Complete review section with rating summary, paginated review list, and a review submission form. Fetches its own data.
string
required
Product ID to show reviews for.

Types

All price fields (price, compareAtPrice, costPrice) are stored and returned in cents. Divide by 100 to display a dollar amount. When importing products from CSV, the import pipeline converts dollar values to cents automatically.

Current behavior and limits

  • Store endpoints always filter to status: "active". Admin endpoints return all statuses.
  • Deleting a category orphans its child categories and products rather than cascading; categoryId and parentId are set to undefined.
  • Deleting a product cascades to all its variants. Deleting a collection cascades to collection-product links.
  • addProductToCollection is idempotent. Adding a product already in a collection returns the existing link.
  • Inventory decrement has no floor and can go negative. Products with trackInventory: false skip all inventory operations.
  • Related products are scored by shared category (+10 points) and shared tags (+1 point each).