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.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Sync digital asset docs with the shipped state
Damian Legawiec2eacdb6c41d2
diff --git a/docs/docs.json b/docs/docs.jsonindex 3c6d62d180..01f00c61c6 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -729,6 +729,7 @@"developer/how-to/build-a-marketplace","developer/how-to/build-a-b2b-store","developer/how-to/sell-digital-products",+ "developer/how-to/custom-digital-asset-provider",{"group": "Multi-Tenant Platform","pages": [@@ -1272,13 +1273,6 @@"v5/developer/how-to/custom-promotion"]},- {- "group": "Digital Products",- "icon": "file-arrow-down",- "pages": [- "v6/developer/how-to/custom-digital-asset-provider"- ]- },{"group": "Reports","icon": "chart-bar",diff --git a/docs/plans/6.0-digital-assets.md b/docs/plans/6.0-digital-assets.mdindex b5bc4dcafd..ee270df47f 100644--- a/docs/plans/6.0-digital-assets.md+++ b/docs/plans/6.0-digital-assets.md@@ -4,7 +4,7 @@**Target:** Spree 6.0**Depends on:** `6.0-fulfillment-and-delivery.md` (Digital fulfillment provider, shipped), `6.0-admin-api.md` (endpoint conventions), `6.0-admin-spa.md` (dashboard architecture), `6.0-admin-rbac.md` (permission catalog), `6.0-store-scoped-configuration.md` (preference conventions)**Author:** Damian Legawiec-**Last updated:** 2026-08-12+**Last updated:** 2026-08-27## Summary@@ -157,7 +157,7 @@ A merchant sells game keys, gift-card codes, activation strings — a finite bat**The `Spree::LicenseCode` model.** A new `spree_license_codes` table:-```+```rubybelongs_to :digital_assetvalue :string # the code text — OR —has_one_attached :attachment # a scan/photo of a card@@ -194,7 +194,7 @@ Step numbers continue the shipped sequence; the design **waves** map to steps as7. **Provider-backed assets** — **pending, targeted for 6.0**: migration adding `provider_type` only (no `kind`, no `integration_id`); `provider_class` resolution + provider-declared validation; the `deliver` seam + `Spree::DigitalDelivery` value object; `DigitalAssetProvider::Base` + the `File` default provider + `Spree.digital_asset_providers` registry; the download controller's two-shape response; admin serializer/params/validations + a `digital_asset_providers` discovery endpoint; the dashboard source selector on the files card; the provider-authoring developer guide. Only the `File` provider ships in core; the licensing customer's provider lives in their own app and self-configures. Order (each step green before the next): provider base + `File` + registry → migration + model resolution/validation → delivery seam + controller → API → dashboard → docs. (Provider base first so `File` exists as the default the migration's model code resolves to.)-8. **License-code pools** — **pending, targeted for 6.0, open source**: `spree_license_codes` migration (value / attachment / nullable `digital_link_id`); the `LicensePool` provider (claim-once-pin-to-link, text or image); the `LicenseCodesRowProcessor` on the existing `Spree::Import` pipeline; the stock sync (`count_on_hand` ← `codes.available.count`, transactional on import + redeem) wired through `Stock::Quantifier`; admin (codes-remaining, import action, per-code list); docs. Builds on wave 6's provider seam, so it lands after it, in order: `LicenseCode` model + migration → `LicensePool` provider + the pin-then-reshow flow → stock sync → CSV import → admin → docs. The stock sync lands with its own test battery — it is the piece most able to drift.+8. **License-code pools** — **deferred to 6.1, open source**: `spree_license_codes` migration (value / attachment / nullable `digital_link_id`); the `LicensePool` provider (claim-once-pin-to-link, text or image); the `LicenseCodesRowProcessor` on the existing `Spree::Import` pipeline; the stock sync (`count_on_hand` ← `codes.available.count`, transactional on import + redeem) wired through `Stock::Quantifier`; admin (codes-remaining, import action, per-code list); docs. Builds on wave 6's provider seam, so it lands after it, in order: `LicenseCode` model + migration → `LicensePool` provider + the pin-then-reshow flow → stock sync → CSV import → admin → docs. The stock sync lands with its own test battery — it is the piece most able to drift.## Constraints on Current Work@@ -212,7 +212,7 @@ Step numbers continue the shipped sequence; the design **waves** map to steps asWaves 1–5 shipped; wave 6 (provider-backed assets) is designed and pending implementation. Genuinely deferred:1. **An `external_url` provider** (a merchant pastes a public URL) — not built now, and needs no schema when it is: it is just another `DigitalAssetProvider` subclass (`requires_attachment? == false`) reading a URL off the asset's metadata. Register it and it appears in the source selector. Add when a merchant asks.-2. **License-code pools** — no longer deferred; designed as wave 7 (see the "Wave 7 — license-code pools" Key Decisions and Design blocks, and Migration Path step 8). A first-class `Spree::LicenseCode` pool: CSV-import a batch, one consumed per purchase, text or image, stock-coupled so it sells out. Ships open source in 6.0.+2. **License-code pools** — designed as wave 7 (see the "Wave 7 — license-code pools" Key Decisions and Design blocks, and Migration Path step 8), deferred to 6.1. A first-class `Spree::LicenseCode` pool: CSV-import a batch, one consumed per purchase, text or image, stock-coupled so it sells out. Ships open source.3. **Per-download log rows** (IP, user agent, per-download timestamps) — revisit if merchants ask for more than the counter + event; the event payload is designed so a subscriber can build this externally today.## Referencesdiff --git a/packages/dashboard/src/locales/de.json b/packages/dashboard/src/locales/de.jsonindex b13d9074d9..5fba5de493 100644--- a/packages/dashboard/src/locales/de.json+++ b/packages/dashboard/src/locales/de.json@@ -837,7 +837,7 @@},"delete_description": "„{{name}}“ kann von niemandem mehr heruntergeladen werden, der sie gekauft hat. Dies wirkt sofort.","delete_title": "Diese Datei löschen?",- "description": "Dateien, die Käufer nach dem Kauf herunterladen können. Fügen Sie sie einem digitalen Produkt hinzu oder einem physischen, um eine Anleitung oder Garantie mitzuliefern.",+ "description": "Dateien, die Käufer nach dem Kauf herunterladen können. Fügen Sie sie einem digitalen Produkt hinzu oder einem physischen Produkt, um eine Anleitung oder Garantie mitzuliefern.","download": "Herunterladen","drop_hint": "Dateien hierher ziehen und ablegen oder zum Durchsuchen klicken","empty": "Noch keine Dateien",