Before you start
You need a running Spree app. The fastest path is create-spree-app — a Docker-based project with the Spree CLI, no local Ruby required:create-spree-app projects: run
spree eject once before starting. Fresh projects use a prebuilt Docker image; ejecting switches to the dev setup that mounts backend/ into the container, so the files the generators create land in your project (and reload live as you edit them).What you’ll build
- A
Brandmodel with a rich text description and an uploadable logo — one generator command - An admin UI for managing brands — one generator command, then customized
- A
brandassociation on Products, surfaced in the product admin form - Store API endpoints (
GET /api/v3/store/brands) with serializers and prefixed IDs - Typed TypeScript access to brands from your storefront via
@spree/sdk - Event subscribers and webhooks connecting the store to external systems
- Automated tests for all of it
Tutorial Sections
1. Model
Generate the Brand model — columns, rich text description, and logo upload in one command
2. Admin Dashboard
Scaffold the admin UI, then add the description editor, logo upload, and table columns
3. Extending Core Models
Connect Brands to Products using a decorator and an association
4. API
Expose Brands through the Store and Admin APIs — generated in one command, or hand-built to learn the pieces
5. Events & Webhooks
React to store activity and connect external systems — OMS, warehouse, ERP
6. SDK
Consume Brand endpoints from TypeScript using the SDK
7. Testing
Write automated tests for your feature

