Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Fix docs layout and config docs

Damian Legawiec7442130e68d1
diff --git a/docs/api-reference/admin-api/introduction.mdx b/docs/api-reference/admin-api/introduction.mdx
index d0d18db387..2d7c98369c 100644
--- a/docs/api-reference/admin-api/introduction.mdx
+++ b/docs/api-reference/admin-api/introduction.mdx
@@ -1,13 +1,9 @@
---
-title: "Spree Admin API introduction and SDK quick start"
+title: "Admin API"
sidebarTitle: "Introduction"
description: "Overview of the Spree Admin REST API for managing products, orders, customers, and fulfillments, with SDK install and quick start examples."
---
-import { Since } from '/snippets/since.mdx';
-
-<Since version="5.5" />
-
The Admin API is a REST API for managing Spree stores programmatically — products, orders, customers, fulfillments, payments, and more. It is intended for backend integrations, custom admin tooling, and automation.
All routes are prefixed with `/api/v3/admin`. During development the API is available under `http://localhost:3000/api/v3/admin`. For production, replace `http://localhost:3000` with your Spree application URL.
diff --git a/docs/api-reference/seller-api/introduction.mdx b/docs/api-reference/seller-api/introduction.mdx
index d9658e50c5..ca7234b058 100644
--- a/docs/api-reference/seller-api/introduction.mdx
+++ b/docs/api-reference/seller-api/introduction.mdx
@@ -1,13 +1,9 @@
---
-title: "Spree Seller API introduction and SDK quick start"
+title: "Seller API"
sidebarTitle: "Introduction"
description: "Overview of the Spree Seller API — the marketplace seller panel for managing a seller's own catalog, team, stock locations, and onboarding."
---
-import { Since } from '/snippets/since.mdx';
-
-<Since version="6.0" />
-
The Seller API is a REST API for the **marketplace seller panel** — where a seller runs their own shop inside someone else's marketplace. It powers a seller's catalog, their team, their stock locations, and the onboarding checklist the marketplace asks them to complete.
All routes are prefixed with `/api/v3/seller`. During development the API is available under `http://localhost:3000/api/v3/seller`. For production, replace `http://localhost:3000` with your Spree application URL.
diff --git a/docs/api-reference/store-api/introduction.mdx b/docs/api-reference/store-api/introduction.mdx
index 51aff3cac2..970c568c9a 100644
--- a/docs/api-reference/store-api/introduction.mdx
+++ b/docs/api-reference/store-api/introduction.mdx
@@ -3,10 +3,6 @@ title: "Store API"
sidebarTitle: "Introduction"
---
-import { Since } from '/snippets/since.mdx';
-
-<Since version="5.4" />
-
This API reference includes Spree Store APIs, which are REST APIs exposed by the Spree application. They are used to create a storefront for your commerce store, such as a website, point of sale or a commerce mobile app.
All API Routes are prefixed with `/api/v3/store`. So, during development, the API Routes will be available under the path `http://localhost:3000/api/v3/store`. For production, replace `http://localhost:3000` with your Spree application URL.
diff --git a/docs/developer/customization/quickstart.mdx b/docs/developer/customization/quickstart.mdx
index 8eafd8b6ee..2a9221c98a 100644
--- a/docs/developer/customization/quickstart.mdx
+++ b/docs/developer/customization/quickstart.mdx
@@ -1,7 +1,7 @@
---
title: Quickstart
og:title: Spree Customization Quickstart
-description: Recommended ways to customize the Spree backend — configuration, workflow hooks, events, checkout steps, providers, dependencies, and decorators as a last resort.
+description: Recommended ways to customize the Spree backend — environment configuration, workflow hooks, events, checkout steps, providers, dependencies, and decorators as a last resort.
---
Spree is designed to be customized without forking it. This guide presents the options **in order of recommendation** — start at the top and only move down when a simpler option doesn't fit.
@@ -15,7 +15,7 @@ Business logic is extended through **workflow hooks** rather than by replacing c
| What you want to do | Recommended approach |
|---|---|
| Change store settings (currency, markets, languages) | [Store settings](#store-settings) |
-| Tweak Spree behavior globally | [Configuration](#configuration) |
+| Change installation settings (limits, expiries, hosting) | [Configuration](#configuration) |
| Run your own logic inside checkout, cancellation, refunds | [Workflow hooks](#workflow-hooks) |
| Block an operation from happening | [Workflow hooks](#workflow-hooks) — `validate` |
| React after something happened (sync, notifications) | [Events & subscribers](#events-and-subscribers) |
@@ -38,15 +38,16 @@ Business logic is extended through **workflow hooks** rather than by replacing c
Most day-to-day configuration is data, not code. Change it in the dashboard under **Settings** — no deploy required.
</Accordion>
<Accordion title="Configuration">
- **Best for:** tweaking Spree's behavior globally.
+ **Best for:** settings that describe the installation rather than the shop — limits, expiries, and where things are hosted.
- ```ruby config/initializers/spree.rb
- Spree.config do |config|
- config.minimum_password_length = 10
- end
+ Every setting is an environment variable, so changing one needs no code change:
+
+ ```bash .env
+ SPREE_MINIMUM_PASSWORD_LENGTH=10
+ SPREE_JWT_EXPIRATION=1800
```
- See [Configuration](/developer/customization/configuration).
+ See [Configuration](/developer/customization/configuration) for every variable and its default.
</Accordion>
<Accordion title="Workflow hooks">
**Best for:** running your own logic *inside* a core flow — checkout completion, order cancellation, refunds, fulfillment creation.
@@ -184,7 +185,7 @@ Business logic is extended through **workflow hooks** rather than by replacing c
```
<Warning>
- Seam names end in `_workflow`. The old `*_service` names still resolve with a warning, but **writes to them are ignored** — a class written against the old service contract isn't interchangeable with a workflow. Update the key if your code still uses the old name.
+ Dependency names end in `_workflow`. The old `*_service` names still resolve with a warning, but **writes to them are ignored** — a class written against the old service contract isn't interchangeable with a workflow. Update the key if your code still uses the old name.
</Warning>
Prefer a hook when you only need to add behavior. Replace the class only when you need to change what the flow fundamentally does.
diff --git a/docs/developer/deployment/usage-data.mdx b/docs/developer/deployment/usage-data.mdx
index 4188edf099..affe31a737 100644
--- a/docs/developer/deployment/usage-data.mdx
+++ b/docs/developer/deployment/usage-data.mdx
@@ -48,15 +48,4 @@ Two switches, both environment variables. See [Environment Variables](/developer
| `SPREE_TELEMETRY_DISABLED=1` | Stops the usage data. The daily check still runs, but sends only `version`, so the update notice keeps working. `DO_NOT_TRACK=1` does the same. |
| `SPREE_UPDATE_CHECK_DISABLED=1` | Stops the daily request entirely. Nothing is sent and the update notice never appears. |
-You can set the same switches from Ruby instead:
-
-```ruby server/config/initializers/spree.rb
-Spree.config do |config|
- config.telemetry_enabled = false # send the version only
- config.update_check_enabled = false # send nothing at all
-end
-```
-
-Either way, turning a switch off wins over the other method: an environment variable cannot turn back on what the initializer turned off, and the reverse.
-
The check never runs in the `test` environment or on a CI server (any machine with the `CI` environment variable set, which GitHub Actions, GitLab CI, CircleCI and most other services do), so test runs send nothing.
diff --git a/docs/style.css b/docs/style.css
index f5b985d4d6..41be72c053 100644
--- a/docs/style.css
+++ b/docs/style.css
@@ -251,10 +251,19 @@ html:not(.dark) h4 {
}
}
-/* The article itself is capped at max-w-xl (576px); a wider measure is what
- actually gives tables, code blocks and API examples room. */
-#content-container .flex.flex-row-reverse > .max-w-xl {
- max-width: 52rem;
+/* The article is capped at --content-width (576px) and centred, leaving wide
+ empty gutters beside it. Let it fill the space left of the table of
+ contents instead — tables, code blocks and API examples need the room. The
+ cap keeps prose readable on very wide screens. */
+#content-container #content-area {
+ flex: 1 1 0%;
+ max-width: 60rem;
+}
+
+/* The homepage has no table of contents and lays out its own grids, so it
+ takes the full width. */
+#content-container #content-area:has(.home-page) {
+ max-width: none;
}
/* --- Navbar --------------------------------------------------------------- */
diff --git a/spree/lib/generators/spree/install/templates/config/initializers/spree.rb b/spree/lib/generators/spree/install/templates/config/initializers/spree.rb
index 3c56d503a0..1caf8a8ef2 100644
--- a/spree/lib/generators/spree/install/templates/config/initializers/spree.rb
+++ b/spree/lib/generators/spree/install/templates/config/initializers/spree.rb
@@ -6,13 +6,6 @@
#
# Anything that shapes how a shop sells — currency, taxes, when customers are
# charged — belongs to the store and is edited in the dashboard, not here.
-#
-# Use a Spree.config block only for a value that has to be computed in Ruby;
-# it is applied at boot and wins over the environment.
-#
-# Spree.config do |config|
-# config.minimum_password_length = 10
-# end
# Use a CDN host for images, eg. Cloudfront
# This is used in the frontend to generate absolute URLs to images