@spree/docs 0.1.82 → 0.1.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-reference/store-api/errors.md +1 -1
- package/dist/api-reference/store-api/idempotency.md +1 -1
- package/dist/developer/cli/quickstart.md +1 -1
- package/dist/developer/contributing/creating-an-extension.md +1 -1
- package/dist/developer/contributing/developing-spree.md +5 -6
- package/dist/developer/core-concepts/addresses.md +1 -1
- package/dist/developer/core-concepts/adjustments.md +1 -1
- package/dist/developer/core-concepts/customers.md +1 -1
- package/dist/developer/core-concepts/events.md +1 -1
- package/dist/developer/core-concepts/markets.md +1 -1
- package/dist/developer/core-concepts/media.md +1 -1
- package/dist/developer/core-concepts/orders.md +1 -1
- package/dist/developer/core-concepts/promotions.md +1 -1
- package/dist/developer/core-concepts/search-filtering.md +1 -1
- package/dist/developer/core-concepts/shipments.md +1 -1
- package/dist/developer/core-concepts/stores.md +1 -1
- package/dist/developer/core-concepts/translations.md +1 -1
- package/dist/developer/core-concepts/users.md +1 -1
- package/dist/developer/create-spree-app/quickstart.md +1 -1
- package/dist/developer/customization/checkout.md +1 -1
- package/dist/developer/customization/decorators.md +1 -1
- package/dist/developer/customization/quickstart.md +1 -1
- package/dist/developer/deployment/environment_variables.md +1 -0
- package/dist/developer/sdk/store/markets.md +1 -1
- package/dist/developer/tutorial/extending-models.md +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Errors
|
|
3
|
-
description:
|
|
3
|
+
description: Reference for Spree Store API error responses — JSON format, machine-readable codes, HTTP status codes, validation details, and retry strategies.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
The Store API uses a consistent, Stripe-style error format across all endpoints. Every error response includes a machine-readable `code` and a human-readable `message`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Idempotency"
|
|
3
3
|
sidebarTitle: "Idempotency"
|
|
4
|
-
description: "
|
|
4
|
+
description: "Use Idempotency-Key headers on Spree Store API mutations to safely retry carts, checkouts, and payments without creating duplicate side effects."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
The Store API supports idempotency keys on mutating endpoints. This lets you safely retry requests without risking duplicate side effects — for example, adding an item to cart twice or creating duplicate payments due to network timeouts.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Spree CLI
|
|
3
3
|
sidebarTitle: Overview
|
|
4
|
-
description:
|
|
4
|
+
description: Install and use the @spree/cli to scaffold, run, build, migrate, and upgrade Docker-based Spree Commerce projects from the command line.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
The Spree CLI (`@spree/cli`) manages Docker-based Spree projects created with [create-spree-app](../create-spree-app/quickstart.md).
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Developing Spree
|
|
3
|
-
description:
|
|
4
|
-
This guide covers all the necessary steps to contributing to Spree source
|
|
5
|
-
code. We're happy you're here!
|
|
3
|
+
description: Set up a Spree development environment with Docker, run the test suite, and submit pull requests to contribute to the Spree Commerce source code.
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
Please read our [Code of Conduct](https://github.com/spree/spree/blob/main/CODE_OF_CONDUCT.md) before contributing.
|
|
@@ -80,10 +78,11 @@ Which command after which change:
|
|
|
80
78
|
| What changed | What to run |
|
|
81
79
|
|---|---|
|
|
82
80
|
| Ruby code in `spree/*` gems | Nothing — gems are bind-mounted; code reloads on the next request |
|
|
83
|
-
| A new migration in a gem | `cd server && pnpm exec spree migrate` |
|
|
84
|
-
| Gem dependencies (gemspec / Gemfile) | `cd server && pnpm exec spree bundle install`
|
|
81
|
+
| A new migration in a gem | Nothing — the next `pnpm server:dev` boot applies it (or `cd server && pnpm exec spree migrate` while the stack runs) |
|
|
82
|
+
| Gem dependencies (gemspec / Gemfile / lock drift after `git pull`) | Nothing — the next `pnpm server:dev` boot self-heals via `bundle check || bundle install` (or `cd server && pnpm exec spree bundle install` while the stack runs) |
|
|
85
83
|
| Compose files / `server/.env` | `pnpm server:dev` (force-recreates the containers) |
|
|
86
|
-
| `server/Dockerfile` / `.ruby-version` | `pnpm server:build`, then `pnpm server:dev` |
|
|
84
|
+
| `server/Dockerfile` / `.ruby-version` / starter update that breaks the image build ("lockfile can't be updated because frozen") | `pnpm server:build`, then `pnpm server:dev` — the build script handles the edge-rewritten `Gemfile.lock` automatically |
|
|
85
|
+
| Meilisearch image bump ("database version … is incompatible") | Remove the `server_meilisearch_data` volume, boot, then reindex (`pnpm exec spree rake spree:search:reindex`) — the index is derived data |
|
|
87
86
|
| Broken beyond repair | `pnpm server:setup` (full reset — wipes the database and volumes) |
|
|
88
87
|
|
|
89
88
|
Re-run `pnpm server:setup` **only** to fully reset — it does `docker compose down -v` + `rm -rf ./server`, wiping all DB data.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Addresses
|
|
3
|
-
description:
|
|
3
|
+
description: How Spree models addresses, countries, states, and zones, and how geographic data drives checkout, tax calculation, and shipping rates.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Overview
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Adjustments
|
|
3
|
-
description: How taxes, promotions, and other price modifications
|
|
3
|
+
description: How Spree adjustments apply taxes, promotions, and other price modifications to orders, line items, and shipments, and how totals are recalculated.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Overview
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Customers
|
|
3
|
-
description:
|
|
3
|
+
description: How Spree models customer accounts — registration, authentication, addresses, order history, store credits, and guest checkout behavior.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
import { Since } from '/snippets/since.mdx';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Events
|
|
3
|
-
description:
|
|
3
|
+
description: Spree's event system — publish and subscribe to lifecycle events from orders, products, and users to trigger background jobs and integrations.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
import { Since } from '/snippets/since.mdx';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Markets
|
|
3
|
-
description:
|
|
3
|
+
description: Configure Spree Markets to bundle geography, currency, and locale into distinct selling regions and run multi-region commerce from a single store.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
import { Since } from '/snippets/since.mdx';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Media
|
|
3
3
|
sidebarTitle: "Media"
|
|
4
|
-
description:
|
|
4
|
+
description: Manage product media in Spree — images, videos, named variants, focal points, and how media is uploaded, resized, and served via the Store API.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
import { Since } from '/snippets/since.mdx';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Orders
|
|
3
|
-
description:
|
|
3
|
+
description: How Spree models orders — the cart-to-completion lifecycle, checkout state machine, line items, payments, shipments, and order totals.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Overview
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Promotions
|
|
3
|
-
description:
|
|
3
|
+
description: Build percentage and fixed-amount discounts, free shipping, BOGO offers, and coupon codes with Spree's rule and action-based promotion system.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Overview
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Search & Filtering
|
|
3
|
-
description: "
|
|
3
|
+
description: "Use Ransack-style query parameters to search, filter, sort, and paginate products, taxons, and other resources through the Spree Store API."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
import { Since } from '/snippets/since.mdx';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Shipments
|
|
3
|
-
description:
|
|
3
|
+
description: How Spree models shipments, shipping methods, calculators, stock locations, split shipments, and the fulfillment workflow from order to delivery.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
import { Since } from '/snippets/since.mdx';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Stores
|
|
3
|
-
description: The Store is Spree's top-level tenant — products, orders, channels, markets, and stock locations
|
|
3
|
+
description: The Store is Spree's top-level multi-tenant boundary — learn how products, orders, channels, markets, and stock locations are scoped to a store.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Overview
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Translations
|
|
3
|
-
description: Translate
|
|
3
|
+
description: Translate Spree products, taxons, and other store content into multiple languages using Mobility-backed translations and locale-aware APIs.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Overview
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Users
|
|
3
|
-
description:
|
|
3
|
+
description: How Spree models customer and admin users — Devise authentication, account data, roles, abilities, and access permissions across stores.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Overview
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "create-spree-app"
|
|
3
3
|
sidebarTitle: Overview
|
|
4
|
-
description: "Scaffold a new Spree Commerce project with a single command
|
|
4
|
+
description: "Scaffold a new Spree Commerce project with a single command — bootstraps a full Rails backend, Docker dev stack, and the @spree/cli for customization."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Quick Start
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Checkout Flow
|
|
3
|
-
description:
|
|
3
|
+
description: Customize the Spree checkout flow with the checkout DSL — add, remove, or conditionally skip address, delivery, payment, and confirmation steps.
|
|
4
4
|
version: v5
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Decorators
|
|
3
|
-
description:
|
|
3
|
+
description: Use Spree decorators to add or modify behavior on core models, controllers, and helpers without forking the gem — patterns, file layout, and pitfalls.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
> **WARNING:** **Decorators should be a last resort.** They tightly couple your code to Spree internals and can break during upgrades. Before using decorators, consider these modern alternatives that are safer and easier to maintain:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Quickstart
|
|
3
3
|
og:title: Spree Customization Quickstart
|
|
4
|
-
description:
|
|
4
|
+
description: Recommended ways to customize Spree — store settings, configuration, events, webhooks, dependencies, admin extensions, and decorators as a last resort.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
Spree is a flexible platform allowing you to customize every part of it to suit your business needs. This guide presents customization options **in order of recommendation** - start from the top and only move down if simpler options don't meet your needs.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Environment Variables
|
|
3
|
+
description: Reference for Spree deployment environment variables — database, Redis, SMTP, web server, file storage, and application configuration settings.
|
|
3
4
|
---
|
|
4
5
|
|
|
5
6
|
Spree uses environment variables for all deployment configuration. No secrets or credentials are stored in the codebase.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Markets
|
|
3
|
-
description:
|
|
3
|
+
description: Use the Spree Storefront SDK to list markets, resolve a market by country, and fetch the countries available within each market for checkout.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## List Markets
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Extending Core Models
|
|
3
|
-
description:
|
|
3
|
+
description: Tutorial — extend Spree's core models with a custom Brand resource, generate a migration, and associate it with Products via a decorator.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
In this tutorial, we'll connect our custom Brand model with Spree's core Product model. This is a common pattern when building features that need to integrate with existing Spree functionality.
|