The collections module groups products into curated sets, such as “Summer Sale”, “New Arrivals”, or “Staff Picks”. You can build collections by hand-picking products (manual) or by writing rule-based conditions that automatically include matching products (automatic). Collections support featured flags, SEO metadata, and drag-and-drop product ordering. Source:Documentation Index
Fetch the complete documentation index at: https://86d.app/docs/llms.txt
Use this file to discover all available pages before exploring further.
modules/collections · npm: @86d-app/collections
Installation
config.json:
Configuration
Maximum number of products allowed in a single collection. Requests that would exceed this limit are rejected.
Store endpoints
Store endpoints are public and return only active collections.| Method | Path | Description |
|---|---|---|
GET | /collections | List active collections, filterable by type and featured flag |
GET | /collections/featured | Get featured collections |
GET | /collections/:slug | Get a single collection by slug |
GET | /collections/:slug/products | Get paginated products in a collection |
GET | /collections/product/:productId | Get all collections containing a specific product |
Admin endpoints
Admin endpoints require authentication and return collections of all statuses.| Method | Path | Description |
|---|---|---|
GET | /admin/collections | List all collections, paginated and filterable |
GET | /admin/collections/stats | Get collection statistics |
POST | /admin/collections/create | Create a new collection |
POST | /admin/collections/:id/update | Update a collection |
POST | /admin/collections/:id/delete | Delete a collection and all its product associations |
GET | /admin/collections/:id/products | List products in a collection |
POST | /admin/collections/:id/products/add | Add products to a collection |
POST | /admin/collections/:id/products/remove | Remove products from a collection |
POST | /admin/collections/:id/products/reorder | Reorder products within a collection |
Components
Add these components to your MDX template files. Thecollections module must be listed in config.json.
CollectionList
Renders a grid of all active collections. Fetches its own data; no props required.
FeaturedCollections
Renders featured collection cards. Fetches its own data; no props required.
Types
Notes
- Slugs must be unique. The create and update endpoints validate for conflicts.
- Adding a product that already exists in a collection is idempotent. The operation returns the existing entry rather than creating a duplicate.
- Deleting a collection cascades and removes all associated
CollectionProductrecords. - Automatic collections store
conditionsas JSON. The runtime evaluates these conditions at query time. - Store endpoints return only active collections. Admin endpoints return all collections regardless of status.
- Products within a collection are ordered by
positionascending.

