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
Nail down the 5.6 dashboard packaging decisions in the plan
Damian Legawiec4f42a28e87e4
diff --git a/CLAUDE.md b/CLAUDE.mdindex 04f5e69788..4d3d823bc7 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -39,6 +39,7 @@ Multi-version plans (some phases shipped, some pending):- `6.0-order-routing.md` — Two-tier extension: pluggable `Spree::OrderRouting::Strategy::Base` + STI subclasses of `Spree::OrderRoutingRule`. Phase 1 (5.5) shipped: `Channel`, `OrderRoutingRule`, strategy base + Rules + Reducer + Legacy, `preferred_stock_location_id` + `channel_id` on Order. Phase 2+ (6.0) layers Catalog/Company on top via `6.0-channels-catalogs-b2b.md`.- `6.0-channels-catalogs-b2b.md` — Channel + ProductPublication (replaces StoreProduct) + single-owner Product (`belongs_to :store`) + Publishing card (legacy admin + SPA) + `Channel#default` boolean shipped in 5.5. Channel-level gated storefront access (`storefront_access` enum + channel-owned `guest_checkout`, both with store fallback, enforced in the v3 Store API) targeted for 5.6. Catalog, Company/CompanyLocation/CompanyContact for B2B pending in 6.0. Multi-store catalogs (historic `Product has_many :stores`) move to the `spree_multi_store` extension.- `5.6-6.0-single-store-promotions-payment-methods.md` — Migrate `Spree::Promotion` + `Spree::PaymentMethod` from multi-store (`has_many :stores` via `spree_promotions_stores` / `spree_payment_methods_stores` join tables) to single-owner `belongs_to :store`, mirroring the 5.5 single-owner Product migration. 5.6 (implemented): `store_id` FK + required-store presence via `Spree::SingleStoreResource`, backfill rake task (loud per-record deprecation on shared records), shared `LegacyMultiStoreSupport` deprecation bridge, deletes the `ResourceController` `store_ids=` seam, deprecates `StoreScopedResource`; multi-store sharing moves to the `spree_multi_store` extension (join tables left intact). 6.0 cleanup: enforce `null: false`, drop join tables + bridges. Paired with `6.0-channels-catalogs-b2b.md`.+- `5.6-project-layout-and-dashboard.md` — React Dashboard Developer Preview packaging + `backend/` → `api/` project layout. Implemented: `<Dashboard />` shell export from `@spree/dashboard` (source-only, relative imports only), monorepo-canonical `packages/dashboard-starter` thin host (synced to the `spree/dashboard-starter` template repo on release), `spree add dashboard` (env carries only `VITE_SPREE_API_URL` — never secret keys). Pending: layout rename + `detectApiDir` dual-layout CLI, create-spree-app dashboard phase, `spree upgrade layout`, template sync job.Pending design work (drafts, no implementation yet):- `5.6-admin-spa-csv-import.md` — Universal dashboard CSV import over the existing `Spree::Import` pipeline (implemented). Admin API v3 surface (create via direct-upload signed blob, `complete_mapping`, `retry_failed_rows`, nested failed-rows index, write-scope gating), `client.imports` SDK resource, dashboard-core `ImportButton` (per-context `<Can>` gating, upload Sheet) + full-window wizard dialog driven by an `?import=` search param, with history under `/settings/imports` (new `audit` settings-nav group). Status via API polling — explicitly no ActionCable/Turbo Streams in the SPA; legacy per-row live feed replaced by polled counters + paginated failed-rows table.@@ -46,7 +47,6 @@ Pending design work (drafts, no implementation yet):- `5.4-centralized-translations-admin.md` — Centralized Translations admin page under Products, overview grid + bulk CSV import/export- `5.4-metafield-translations.md` — Translate MetafieldDefinition names + Metafield text values (ShortText, LongText, RichText) via Mobility translation tables- `5.5-admin-api-cli.md` — `spree api` command group in `@spree/cli` (gh-api-style generic verbs + schema introspection + layered auth, CLI-first ahead of MCP servers; core patch: `SCOPES` on `spree:cli:create_api_key`, promotions scopes)-- `5.6-project-layout-and-dashboard.md` — React Dashboard Developer Preview packaging: `create-spree-app` renames `backend/` → `api/` for new projects, dashboard scaffolds into `apps/dashboard/` from a `spree/dashboard-starter` template, new `spree add dashboard` + `spree upgrade layout` commands, dual-layout CLI support via `detectApiDir` until 6.0 GAShipped plans:- `5.4-store-api-bridges.md` — Bridge 6.0 naming into 5.4 Store API (PR #13782)@@ -71,6 +71,7 @@ Shipped plans:| `packages/dashboard` | `@spree/dashboard` — React SPA admin dashboard (Spree 6.0, replaces `spree/admin`). The deployable app shell, routes, schemas, resource hooks, locales. || `packages/dashboard-ui` | `@spree/dashboard-ui` — design system. Shadcn primitives + headless composed components + tokens. Source-only; consumer compiles via Vite/Tailwind. **Components are headless: data comes via props, no provider/hook imports.** || `packages/dashboard-core` | `@spree/dashboard-core` — framework. Registries (table, nav, slot, settings-nav), providers (auth, permission, store, theme), generic infra hooks, admin SDK client singleton, `defineDashboardPlugin` facade. The extension API for plugin authors. |+| `packages/dashboard-starter` | `@spree/dashboard-starter` — thin host app consuming `<Dashboard />` from `@spree/dashboard`; canonical source of the `spree/dashboard-starter` template repo (synced on release). Doubles as the in-repo consumer test for the plugin pipeline. || `packages/sdk` | `@spree/sdk` — TypeScript Store API client || `packages/admin-sdk` | `@spree/admin-sdk` — TypeScript Admin API client (Developer Preview) || `packages/sdk-core` | `@spree/sdk-core` — shared HTTP/retry/error layer (private internal) |diff --git a/docs/plans/5.6-project-layout-and-dashboard.md b/docs/plans/5.6-project-layout-and-dashboard.mdindex b6b809af0d..29f602d61f 100644--- a/docs/plans/5.6-project-layout-and-dashboard.md+++ b/docs/plans/5.6-project-layout-and-dashboard.md@@ -1,6 +1,6 @@# 5.6 Project Layout & Dashboard Scaffolding-**Status:** Draft+**Status:** In progress**Target:** Spree 5.6 (Dashboard Developer Preview)**Depends on:** `5.4-spree-starter-and-create-spree-app.md` (shipped), `6.0-admin-spa.md`**Author:** Damian + Claude@@ -26,7 +26,9 @@ Ship the React dashboard as part of `create-spree-app` in 5.6 (Developer Preview- **`apps/dashboard/`** is the canonical location for the React SPA admin (not `apps/admin/`, not `packages/dashboard/`). Matches the `@spree/dashboard` package name and avoids legacy `spree/admin` collision. **Supersedes the `apps/admin/` reference in `5.4-spree-starter-and-create-spree-app.md`.**- **`apps/` holds JS/TS deployables; `api/` stays at the root.** Don't move the Rails app under `apps/api/`. It's qualitatively different (different language, different runtime, different CLI surface via `spree console`/`spree logs`) and keeping it at the root signals "this is the core; the JS apps consume it."- **The dashboard is optional, like the storefront.** Default to including it interactively; allow `--no-dashboard` / `--dashboard` flags and a non-interactive default for CI.-- **Dashboard ships from a new `spree/dashboard-starter` GitHub template repo,** following the same pattern as `spree-starter` and `storefront`. Not bundled into create-spree-app.+- **`@spree/dashboard` publishes to npm and exports the app shell.** The package exports a `<Dashboard />` component (provider stack + router, bootstrap side-effects included); hosts own `index.html`, `main.tsx`, `styles.css`, and the Vite config. Distribution is **source-only**, same model as `dashboard-core`/`dashboard-ui`: the host's Vite compiles the shell, which keeps TanStack Router's generated route types first-class in the host program. Consequence: shell source uses relative imports only — no `@/` alias in anything a host compiles.+- **Dashboard ships from a `spree/dashboard-starter` GitHub template repo** (same pattern as `spree-starter`), but the **canonical source lives in the monorepo at `packages/dashboard-starter`**. The template repo is a build artifact: a release job copies the package, rewrites `workspace:^` to the published `^5.6.0-next` versions, and strips monorepo-only devDependencies (the example plugin). In the workspace, the starter doubles as the live consumer test — it compiles `<Dashboard />` from source and activates `@spree/dashboard-plugin-example` through real auto-discovery.+- **The dashboard scaffold carries no credentials.** `apps/dashboard/.env.local` holds only `VITE_SPREE_API_URL`. Admins sign in with email/password (JWT in memory + httpOnly refresh cookie, per `5.5-admin-auth-cookie-refresh.md`). Anything `VITE_`-prefixed is compiled into the client bundle, so a secret key there would ship to every browser — the scaffold and `spree add dashboard` never mint keys.- **Rename ships day-one in 5.6 for *new* projects.** `npx create-spree-app` on 5.6+ produces `api/` directly. We don't ship 5.6 with the dashboard inside `backend/` only to rename in 6.0 — that'd give the Developer Preview audience a layout we know will change. Get it right once.- **Existing projects are NOT auto-migrated in 5.6.** They keep `backend/` and continue to work. The CLI detects the layout per-command (see `detectApiDir` in Design Details). Users opt in to the rename via `spree upgrade layout` on their own schedule.- **Dual-layout support is bounded.** 5.6 and the 5.x line support both layouts; 6.0 GA drops `backend/` detection. Users have a full minor-version cycle to run `spree upgrade layout` before it's required.@@ -124,9 +126,9 @@ export function detectProject(cwd: string = process.cwd()): ProjectContext {- **6.0 RC:** `spree dev` (and other commands) print a deprecation warning when `backend/` is detected, pointing to `spree upgrade layout`.- **6.0 GA:** `detectApiDir` drops the `backend/` branch. Old-layout projects must run `spree upgrade layout` before any CLI command works.-### Dashboard starter repo (`spree/dashboard-starter`)+### Dashboard starter (`packages/dashboard-starter` → `spree/dashboard-starter`)-New GitHub template repository, mirroring the `spree-starter` and `storefront` pattern:+Canonical source in the monorepo at `packages/dashboard-starter`; a release job syncs it to the `spree/dashboard-starter` GitHub template repo (rewriting `workspace:^` deps to published versions and stripping monorepo-only devDependencies). `create-spree-app` and `spree add dashboard` clone the template repo:```dashboard-starter/@@ -145,16 +147,19 @@ dashboard-starter/└── styles.css```-The starter is intentionally minimal — `@spree/dashboard` is the actual app shell; the starter is the user's customization point for plugins, theming, and deployment config. Same boundary as `spree-starter` vs the Spree gems.+The starter is intentionally minimal — `@spree/dashboard` is the actual app shell; the starter is the user's customization point for plugins, theming, and deployment config. Same boundary as `spree-starter` vs the Spree gems. Notes:++- No TanStack Router plugin in the starter's Vite config — the route tree ships pre-generated inside `@spree/dashboard`. The starter needs only `spreeDashboardPlugin()` + `react()`.+- `spreeDashboardPlugin()` scans `@spree/dashboard` for Tailwind classes when it's installed (optional — custom dashboards built directly on `dashboard-core`/`dashboard-ui` skip it silently).+- In the monorepo, the starter carries `@spree/dashboard-plugin-example` as a devDependency, so booting it exercises the full discovery → `virtual:spree-dashboard-plugins` → registration chain; the sync job strips that dep from the published template.### `.env.local` generated for dashboard```bashVITE_SPREE_API_URL=http://localhost:3000-VITE_SPREE_ADMIN_API_KEY=sk_<minted-by-spree-add-dashboard>```-The admin secret key is minted via the existing `spree api-key create --kind secret --scopes "admin:*"` plumbing during scaffolding (or on `spree add dashboard`). Users can rotate via `spree api-key revoke` + edit `.env.local` later.+No credentials. The dashboard authenticates admins interactively — email/password exchanged for a JWT held in memory plus an httpOnly refresh cookie (`5.5-admin-auth-cookie-refresh.md`). `VITE_`-prefixed variables are baked into the client bundle at build time, so secrets must never appear in this file. Integrations that need a secret API key mint one with `spree api-key create`, independent of the dashboard scaffold.### Scaffolding flow changes (`create-spree-app`)@@ -187,13 +192,9 @@ if (dashboard) {await downloadDashboard(projectDir)s.stop('Dashboard template downloaded.')- // Mint admin key (requires Rails to be up — defer if --no-start)- if (options.start) {- const adminKey = await mintAdminApiKey(projectDir)- writeDashboardEnv(projectDir, port, adminKey)- } else {- writeDashboardEnv(projectDir, port, null) // placeholder, instruct user in README- }+ // Point the dashboard at the API. No credentials — admins sign in+ // interactively; see "`.env.local` generated for dashboard" above.+ writeDashboardEnv(projectDir, port)s.start('Installing dashboard dependencies...')await installDashboardDeps(projectDir, options.packageManager)@@ -248,24 +249,15 @@ async function addDashboard(ctx: ProjectContext) {await execa('git', ['clone', '--depth', '1', DASHBOARD_REPO, dashboardDir])rmSync(join(dashboardDir, '.git'), { recursive: true, force: true })- // 3. Mint admin API key via Rails (containers must be running).- // ctx.apiDir is 'api' or 'backend' — works for both pre-5.6 and 5.6+ projects.- if (!(await isWebContainerRunning(ctx))) {- log.info(`Starting ${ctx.apiDir} so we can mint an admin API key...`)- await dockerCompose(['up', '-d'], ctx.projectDir)- await waitForHealthy(ctx)- }- const adminKey = await mintAdminApiKey(ctx)-- // 4. Write .env.local (always reads/writes apps/dashboard/.env.local —- // the dashboard talks to the API over HTTP, not over a filesystem path)- writeDashboardEnv(ctx.projectDir, ctx.port, adminKey)+ // 3. Write .env.local — just the API URL; the dashboard talks to Rails+ // over HTTP and admins sign in interactively (no keys minted).+ writeDashboardEnv(ctx.projectDir, ctx.port)- // 5. Install deps (package manager detected from project root)+ // 4. Install deps (package manager detected from project root)const pm = detectPackageManager(ctx.projectDir)await execa(pm, ['install'], { cwd: dashboardDir, stdio: 'inherit' })- // 6. Note — suggest the layout upgrade if user is still on backend/+ // 5. Note — suggest the layout upgrade if user is still on backend/const note = [`Dashboard added at ${pc.bold('apps/dashboard/')}`,'',@@ -289,7 +281,6 @@ async function addDashboard(ctx: ProjectContext) {**Idempotency rules:**- If `apps/dashboard/` exists → warn and exit cleanly (no-op).- If `apps/dashboard/.env.local` is missing but the directory exists → write `.env.local` and exit (recovery mode). User can opt in by running `spree add dashboard --force` to regenerate.-- Minting a fresh admin key on each run is fine; old keys can be revoked via `spree api-key list/revoke`.### `spree upgrade layout` command (new)@@ -450,15 +441,15 @@ New projects scaffold straight to `api/`. There is **no dual-layout output mode*- **New:** `src/commands/add.ts` (with `addDashboard`, `addStorefront`).- **New:** `src/commands/upgrade.ts` (with `upgradeLayout`).- `src/index.ts` — register `add` and `upgrade` commands.-- `src/lib/` — new helpers: `mintAdminApiKey`, `isGitDirty`, `findCiWorkflows`, `rewriteBackendReferences`, `detectPackageManager`, `waitForHealthy`.+- `src/lib/` — new helpers: `isGitDirty`, `findCiWorkflows`, `rewriteBackendReferences`, `detectPackageManager`.**`spree/spree-starter` (separate repo):**- No structural changes needed — it's the contents of `api/`, not the directory name.- README references to "the backend" → "the API server" or just "this app".-**`spree/dashboard-starter` (new repo):**-- Created from scratch following the shape above.-- Pinned to `@spree/dashboard@^5.6.0-next` and `@spree/admin-sdk@^5.6.0-next` (Developer Preview dist-tag), rolling forward to `^6.0.0` at 6.0 GA.+**`packages/dashboard-starter` (new package) + `spree/dashboard-starter` (new repo):**+- Canonical source in the monorepo, following the shape above, with `workspace:^` deps.+- Release sync job copies to the template repo, pinning `@spree/dashboard@^5.6.0-next` and `@spree/admin-sdk@^5.6.0-next` (Developer Preview dist-tag), rolling forward to `^6.0.0` at 6.0 GA.## Migration Path@@ -472,41 +463,47 @@ All phases ship in **5.6**. The dashboard ships as Developer Preview alongside `4. Unit test against fixture projects for both layouts.5. **Ship this first** — it's the prerequisite for everything else. Without it, the rename in Phase 2 would break existing-project CLI usage.-### Phase 2: Create `spree/dashboard-starter` repo+### Phase 2: Export the shell from `@spree/dashboard` *(implemented)*-1. Bootstrap from `packages/dashboard/` as a reference (the deployable app shell). The starter is a *consumer* of `@spree/dashboard`, not a fork of it.+1. Rewrite the package's internal `@/` alias imports to relative paths — a source-only library can't ship alias-dependent source (the host's Vite has no mapping for it, and hosts need `@/` for their own code).+2. Add `src/dashboard.tsx` exporting `<Dashboard />`: the provider stack + `RouterProvider`, with the bootstrap side-effect imports (i18n, default nav, search) inside the module. The package's own `main.tsx` becomes the first consumer (dev harness).+3. Add an `exports` map to `package.json` (`.` → shell export, `./styles.css`).+4. Teach `spreeDashboardPlugin()` to scan `@spree/dashboard` for Tailwind classes when installed (optional resolution — silent for custom dashboards without the shell).++### Phase 3: Create `packages/dashboard-starter` *(implemented)* + sync job++1. Scaffold the thin host in the monorepo per the shape above, with `workspace:^` deps. It compiles `<Dashboard />` from source and (dev-only) activates `@spree/dashboard-plugin-example` through auto-discovery — the standing consumer test for the plugin pipeline.2. Write minimal Vite config that proxies to `localhost:3000` in dev. The proxy path is irrelevant to the Rails directory name — it's an HTTP URL.-3. Write README covering: dev workflow, building plugins via `defineDashboardPlugin`, deploying.-4. Add CI: typecheck, build, e2e smoke test against a Dockerized Spree backend.-5. Mark as a GitHub template repository.+3. Write README covering: dev workflow, installing plugins, `plugins.ts` customizations, deploying.+4. Add the release sync job: copy to `spree/dashboard-starter`, rewrite `workspace:^` → published versions, strip monorepo-only devDeps, push. Mark the target as a GitHub template repository.+5. Add CI on the template repo: typecheck, build, e2e smoke test against a Dockerized Spree backend.-### Phase 3: Rename `backend/` → `api/` in create-spree-app (new projects only)+### Phase 4: Rename `backend/` → `api/` in create-spree-app (new projects only)1. Update all source files per "File rename map" above.2. Update tests — fixtures, snapshots, integration assertions.3. Update README of `create-spree-app` package itself.4. Add changeset (minor bump — output layout changes, but no API/import contract is broken; existing CLI install continues to work against either layout).-### Phase 4: Add dashboard scaffolding to create-spree-app+### Phase 5: Add dashboard scaffolding to create-spree-app1. Implement `src/dashboard.ts` mirroring `src/storefront.ts`.2. Add prompt + flag in `src/prompts.ts` and `src/index.ts`.-3. Add `mintAdminApiKey` helper (talks to running Rails container via `spree api-key create`).-4. Update `src/scaffold.ts` to invoke dashboard phase after api, before storefront.-5. Update README template with Dashboard section.-6. Update tests.+3. Update `src/scaffold.ts` to invoke dashboard phase after api, before storefront.+4. Update README template with Dashboard section.+5. Update tests.-### Phase 5: Add `spree add` and `spree upgrade` commands to CLI+### Phase 6: Add `spree add` and `spree upgrade` commands to CLI *(add dashboard implemented)*1. Implement `commands/add.ts` with `addDashboard` and `addStorefront`.2. Implement `commands/upgrade.ts` with `upgradeLayout`.-3. Add helpers: `isGitDirty`, `findCiWorkflows`, `rewriteBackendReferences`, `detectPackageManager`, `mintAdminApiKey`, `waitForHealthy`.+3. Add helpers: `isGitDirty`, `findCiWorkflows`, `rewriteBackendReferences`, `detectPackageManager`.4. Register both commands in `src/index.ts`.5. Update CLI README + `--help` examples.6. Add unit tests for `rewriteBackendReferences` (pure function, easy to cover).7. Add integration test that runs `upgrade layout` against a fixture project.-### Phase 6: Documentation+### Phase 7: Documentation1. Update `docs/developer/getting-started/` to show new layout (use `api/` in examples).2. Update `docs/developer/customization/` references.@@ -516,7 +513,7 @@ All phases ship in **5.6**. The dashboard ships as Developer Preview alongside `- "Existing projects: optional upgrade via `spree upgrade layout`" (set expectations — not forced)4. Update `5.4-spree-starter-and-create-spree-app.md` with a banner noting the 5.6 rename and pointer to this plan.-### Phase 7: Smoke test the full flow+### Phase 8: Smoke test the full flowManual QA checklist:- [ ] `npx create-spree-app fresh --dashboard --storefront` produces working project with `api/` + `apps/dashboard/` + `apps/storefront/`.@@ -538,30 +535,22 @@ Manual QA checklist:- **Every new CLI command that touches the Rails directory must use `ctx.apiDir`,** never a hardcoded `'backend'` or `'api'` string. This is non-negotiable for 5.6 because both layouts coexist.- **New `create-spree-app` templates and prompts must read the dashboard flag** even if dashboard scaffolding isn't fully wired up yet — so the option exists from the moment the dashboard-starter repo ships.- **The `@spree/dashboard` package must keep its current name.** Renaming it would invalidate the entire "dashboard" naming convergence.-- **Admin API key minting needs to work with both publishable+secret separation.** When `spree add dashboard` mints a key for the dashboard, it must be a **secret** key with admin scopes — not a publishable key (which is for the storefront).+- **No secrets in `apps/dashboard/` env files.** The dashboard scaffold writes only `VITE_SPREE_API_URL`; `VITE_`-prefixed values are compiled into the client bundle. No command may write an `sk_` key into any file the dashboard build reads.- **`spree upgrade layout` must not run automatically as part of any other command.** Even if a user runs `spree update` and we know they're on `backend/`, do not silently rename. Layout migration is opt-in only.## Open Questions-1. **Should `spree add dashboard` write the admin secret key to `.env.local` plaintext?** The pattern matches what the storefront already does for its publishable key in `.env.local`, but a secret key is more sensitive. Options:- - (a) Plaintext in `.env.local` (current proposal — matches storefront pattern, simple).- - (b) Print to console only, instruct user to paste into `.env.local` manually (safer, more friction).- - (c) Use an OS keychain integration (over-engineered for a dev tool).- - Leaning toward (a) — `.env.local` is already gitignored, and the dev experience matters. Add a comment in the file warning users not to commit it even if their `.gitignore` is missing the entry.--2. **`spree upgrade layout` and user customizations.** If the user has added files under `backend/` (custom decorators, gems, etc.), `git mv backend api` moves them along. But if they've referenced `backend/` *paths* in their own code (e.g., a script that does `cd backend && rails c`), we won't catch that. Should `spree upgrade layout`:+1. **`spree upgrade layout` and user customizations.** If the user has added files under `backend/` (custom decorators, gems, etc.), `git mv backend api` moves them along. But if they've referenced `backend/` *paths* in their own code (e.g., a script that does `cd backend && rails c`), we won't catch that. Should `spree upgrade layout`:- (a) Scan and warn about likely user references (grep for `\bbackend/` in user files), or- (b) Just do the rename and leave it to the user.- Leaning toward (a) with a "review these files manually" report at the end.-3. **`spree add storefront` symmetry.** This plan proposes it for symmetry with `add dashboard`, but the storefront has been around since 5.4. Is there demand for adding the storefront to an existing api-only project, or is it always present? If demand is low, we could ship `add dashboard` first and defer `add storefront`.+2. **`spree add storefront` symmetry.** This plan proposes it for symmetry with `add dashboard`, but the storefront has been around since 5.4. Is there demand for adding the storefront to an existing api-only project, or is it always present? If demand is low, we could ship `add dashboard` first and defer `add storefront`.- Leaning toward shipping both — symmetry matters for the mental model ("if I can add a dashboard, I can add a storefront").-4. **Should `spree upgrade` be a single command with subcommands or `spree upgrade <target>`?** This plan uses `spree upgrade layout`, leaving room for `spree upgrade gems`, `spree upgrade image`, etc. later. Alternative: `spree upgrade --layout` flag-style. Subcommand form scales better.--5. **Does `mintAdminApiKey` need a stable name/comment so users can identify it later?** When `spree add dashboard` runs, the minted key shows up in `spree api-key list`. Suggest naming it `"dashboard (created by spree add dashboard)"` or similar so users know what it's for and don't accidentally revoke it.+3. **Should `spree upgrade` be a single command with subcommands or `spree upgrade <target>`?** This plan uses `spree upgrade layout`, leaving room for `spree upgrade gems`, `spree upgrade image`, etc. later. Alternative: `spree upgrade --layout` flag-style. Subcommand form scales better.-6. **When exactly does `backend/` support get dropped?** The plan says "by 6.0 GA". Open: do we want a 5.7 deprecation warning step in between, or jump straight from "silent dual-support in 5.6" to "warning in 6.0 RC" to "removed in 6.0 GA"? The 5.6/6.0 cycle is short enough that one warning step at 6.0 RC is probably enough.+4. **When exactly does `backend/` support get dropped?** The plan says "by 6.0 GA". Open: do we want a 5.7 deprecation warning step in between, or jump straight from "silent dual-support in 5.6" to "warning in 6.0 RC" to "removed in 6.0 GA"? The 5.6/6.0 cycle is short enough that one warning step at 6.0 RC is probably enough.## References