@spree/docs 0.1.142 → 0.1.144

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.
@@ -3,7 +3,7 @@ title: Customizing the Spree API
3
3
  description: Add new Store API endpoints, customize existing JSON responses with serializer decorators, and extend Spree's REST API to fit your storefront needs.
4
4
  ---
5
5
 
6
- Before you start customizing Spree API endpoints, make sure you reviewed all existing API endpoints in the [Spree API docs](/api-reference).
6
+ Before you start customizing Spree API endpoints, make sure you reviewed all existing API endpoints in the [Spree API docs](../../api-reference/admin-api/endpoints.md).
7
7
 
8
8
  For a step-by-step walkthrough of adding a complete new resource (model, serializer, controller, routes), see the [API tutorial](../tutorial/api.md).
9
9
 
@@ -532,4 +532,3 @@ end
532
532
  - [Admin Partials](../admin/extending-ui.md) - Extend admin UI without view decorators
533
533
  - [Extending Core Models Tutorial](../tutorial/extending-models.md) - Step-by-step guide to connecting custom models with Spree core
534
534
  - [Customization Overview](quickstart.md) - General customization patterns
535
- - [Logic Customization](logic.md) - Customizing business logic
@@ -7,7 +7,7 @@ section: customization
7
7
 
8
8
  With Dependencies, you can replace parts of Spree core with your custom code:
9
9
  [Services and Workflows](workflows.md), CanCanCan
10
- Abilities (used for [Permissions](permissions)), and API Serializers (used for
10
+ Abilities (used for [Permissions](permissions.md)), and API Serializers (used for
11
11
  generating JSON API responses).
12
12
 
13
13
  > **TIP:** Replacing a whole class means keeping your copy in sync with every Spree
@@ -249,6 +249,8 @@ is reported through `Rails.error` so it's visible rather than mysterious.
249
249
  | `payments.refund` | `before_refund` | lifecycle | Immediately before the gateway call |
250
250
  | `payments.refund` | `after_refund` | lifecycle | After a successful refund |
251
251
  | `payments.handle_webhook` | `after_handle` | lifecycle | After the gateway callback is processed |
252
+ | `customers.create` | `validate` | validate | After the customer is built, before it is saved — the registration-policy veto (bot screening, B2B approval) |
253
+ | `customers.create` | `after_create` | lifecycle | After the customer is created and the newsletter subscriber linked |
252
254
 
253
255
  `before_cancel` and `before_resume` accept `reject!` like a `validate` hook.
254
256
 
@@ -1,64 +1,27 @@
1
1
  ---
2
2
  title: "Installing Spree"
3
3
  sidebarTitle: Installation
4
- description: "Install Spree Commerce locally with Docker or Ruby on Rails, run your first store, and deploy it to production with the official starter template."
4
+ description: "Install Spree Commerce locally, run your first store, and deploy it to production with the official starter template."
5
5
  ---
6
6
 
7
- ## Installation options
7
+ ## Using `create-spree-app`
8
8
 
9
- **create-spree-app:**
9
+ The quickest way to get started. Scaffolds a full Spree project with Next.js Storefront (optional).
10
10
 
11
- The quickest way to get started. Scaffolds a full Spree project with Next.js Storefront (optional).
11
+ **Requirements:** [Node.js](https://nodejs.org/) 20+ and [Docker](https://docs.docker.com/get-docker/) running.
12
12
 
13
- **Requirements:** [Node.js](https://nodejs.org/) 20+ and [Docker](https://docs.docker.com/get-docker/) running.
13
+ ```bash
14
+ npx create-spree-app@latest my-store
15
+ ```
14
16
 
15
- ```bash
16
- npx create-spree-app@latest my-store
17
- ```
17
+ The CLI walks you through an interactive setup:
18
18
 
19
- The CLI walks you through an interactive setup:
19
+ 1. Choose **Full-stack** (Backend + Next.js Storefront) or **Backend only**
20
+ 2. Optionally load **sample data** (products, categories, images)
20
21
 
21
- 1. Choose **Full-stack** (Backend + Next.js Storefront) or **Backend only**
22
- 2. Optionally load **sample data** (products, categories, images)
23
-
24
- Once complete, your store should be running at [http://localhost:3000/admin](http://localhost:3000/admin). The port can be different if `3000` is already used on your system.
25
-
26
- See the full [create-spree-app documentation](../create-spree-app/quickstart.md) for all CLI flags and options.
27
-
28
- **Manual Installation:**
29
-
30
- For developers who prefer full control over the setup, or want to add Spree to an existing Rails application.
31
-
32
- 1. Install [Ruby](https://www.ruby-lang.org/en/documentation/installation/)
33
- 2. Install [vips](https://www.libvips.org/install.html) for image processing
34
- 3. Install Rails gem:
35
- ```bash
36
- gem install rails
37
- ```
38
- 4. Create a new Spree application:
39
- ```bash
40
- rails new my_store -m https://raw.githubusercontent.com/spree/spree/main/spree/template.rb
41
- ```
42
- To use a specific database, pass the `-d` flag:
43
- ```bash
44
- rails new my_store -d postgresql -m https://raw.githubusercontent.com/spree/spree/main/spree/template.rb
45
- rails new my_store -d mysql -m https://raw.githubusercontent.com/spree/spree/main/spree/template.rb
46
- ```
47
- 5. Navigate to the application directory:
48
- ```bash
49
- cd my_store
50
- ```
51
- 6. Start the development server:
52
- ```bash
53
- bin/dev
54
- ```
55
- 7. Optionally load sample data (products, categories, etc.):
56
- ```bash
57
- bin/rails spree_sample:load
58
- ```
59
-
60
- > **INFO:** Spree works with **PostgreSQL**, **MySQL**, and **SQLite** databases. The Rails template defaults to SQLite for quick setup. You can switch to PostgreSQL or MySQL at any time. [Learn more about database configuration](../deployment/database.md).
22
+ Once complete, your store should be running at [http://localhost:3000/admin](http://localhost:3000/admin). The port can be different if `3000` is already used on your system.
61
23
 
24
+ See the full [create-spree-app documentation](../create-spree-app/quickstart.md) for all CLI flags and options.
62
25
 
63
26
  ## Accessing Admin Panel
64
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spree/docs",
3
- "version": "0.1.142",
3
+ "version": "0.1.144",
4
4
  "description": "Spree Commerce developer documentation for AI agents and local reference",
5
5
  "type": "module",
6
6
  "license": "CC-BY-4.0",