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.

Changed worktrees to clone the storefront's main branch

Damian Legawiece947329a56e9
diff --git a/CLAUDE.md b/CLAUDE.md
index eace2a1e2e..c7469e55ca 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -35,7 +35,7 @@ Use `/project:create-plan` and `/project:update-plan` for plan management, and `
| `packages/cli` | `@spree/cli` — Docker-based project management CLI |
| `packages/create-spree-app` | `create-spree-app` — project scaffolding |
| `server/` | Rails app cloned from `spree/spree-starter` (.gitignored, provisioned per worktree by `scripts/worktree/setup.sh`) |
-| `storefront/` | Next.js storefront cloned from `spree/storefront` branch `6-0-dev` (.gitignored, provisioned per worktree; keeps its `.git` — commit and push from inside it) |
+| `storefront/` | Next.js storefront cloned from `spree/storefront` `main` (.gitignored, provisioned per worktree; keeps its `.git` — commit and push from inside it) |
| `docs/` | Mintlify powered documentation website, which is deployed to https://spreecommerce.org/docs |
## Development Server (worktrees)
@@ -55,7 +55,7 @@ wt remove # abandon instead of shipping
Admin login: `[email protected]` / `spree123`. The dev scripts run in the foreground and stream logs; `server/log/development.log` has the Rails log if the server runs detached. Start servers only in worktrees you're actively looking at — rspec/vitest/tsc need no servers.
-**Storefront (`pnpm wt:storefront`).** The Next.js storefront is a separate repo (`spree/storefront`) cloned per worktree into a gitignored `storefront/`, on its **`6-0-dev`** branch — `main` stays on the released Store API for people forking or deploying it. Unlike `server/`, the clone keeps its `.git`: commit and push storefront work from inside it, and push before `wt remove`, which deletes the clone with the worktree.
+**Storefront (`pnpm wt:storefront`).** The Next.js storefront is a separate repo (`spree/storefront`) cloned per worktree into a gitignored `storefront/`, on its `main` branch. Unlike `server/`, the clone keeps its `.git`: commit and push storefront work from inside it, and push before `wt remove`, which deletes the clone with the worktree.
It is deliberately **not** a member of this pnpm workspace — one lockfile and one set of global overrides cannot serve both Next 16 and the dashboard's Vite tree. It instead points `@spree/sdk` at this worktree's `packages/sdk` through its own `.pnpmfile.cjs`, which rewrites the dependency only when `SPREE_SDK_PATH` is set (the JavaScript twin of `SPREE_PATH`), so a standalone clone still installs the published SDK. The rewrite uses `file:` and not `link:`, because the storefront pins module resolution to its own directory (`turbopack.root`, `output: "standalone"`) and lists the SDK in `transpilePackages` — a symlink pointing outside the project fails to resolve, and every `@spree/sdk` import breaks. Two consequences: the storefront's `pnpm-lock.yaml` will show a local path — never commit it — and because the SDK is **copied**, picking up a change to it means rebuilding and reinstalling, which is exactly what re-running `pnpm wt:storefront` does.
diff --git a/scripts/storefront-dev.sh b/scripts/storefront-dev.sh
index 60e217408f..8c054d2735 100755
--- a/scripts/storefront-dev.sh
+++ b/scripts/storefront-dev.sh
@@ -3,7 +3,7 @@
# (`pnpm server:setup` / `pnpm server:dev`). The Docker twin of the worktree
# flow's `pnpm wt:storefront`.
#
-# The storefront is a separate repo (spree/storefront, branch 6-0-dev) cloned
+# The storefront is a separate repo (spree/storefront, branch main) cloned
# into storefront/ on first run. Unlike server/, the clone keeps its .git —
# commit and push storefront work from inside it. It is deliberately not a
# member of this pnpm workspace (one lockfile cannot serve Next and the
@@ -18,7 +18,7 @@ cd "$ROOT"
DEV_COMPOSE="server/docker-compose.dev.yml"
EDGE_OVERLAY="scripts/docker-compose.edge.yml"
STOREFRONT_REPO="https://github.com/spree/storefront.git"
-STOREFRONT_BRANCH="6-0-dev"
+STOREFRONT_BRANCH="main"
STOREFRONT_PORT="${STOREFRONT_PORT:-3001}"
API_URL="http://localhost:3000"
@@ -35,11 +35,11 @@ if [ ! -d storefront ]; then
git clone --branch "$STOREFRONT_BRANCH" "$STOREFRONT_REPO" storefront
fi
-# A clone on the storefront's default branch targets the released Store API —
-# the opposite of what this monorepo backend serves.
+# An older clone may still sit on the retired 6-0-dev branch, which no longer
+# follows the Store API.
storefront_head="$(git -C storefront rev-parse --abbrev-ref HEAD)"
if [ "$storefront_head" != "$STOREFRONT_BRANCH" ]; then
- echo " ! storefront/ is on '$storefront_head', not '$STOREFRONT_BRANCH' — it targets the released Store API." >&2
+ echo " ! storefront/ is on '$storefront_head', not '$STOREFRONT_BRANCH'." >&2
echo " git -C storefront fetch origin && git -C storefront checkout $STOREFRONT_BRANCH" >&2
fi
diff --git a/scripts/worktree/dev-storefront.sh b/scripts/worktree/dev-storefront.sh
index c3c84f3971..8ac86d6803 100755
--- a/scripts/worktree/dev-storefront.sh
+++ b/scripts/worktree/dev-storefront.sh
@@ -3,7 +3,7 @@
# worktree's Rails and this worktree's @spree/sdk build.
# URL: https://store.<branch>.spree.localhost
#
-# The storefront is a separate repo (spree/storefront, branch 6-0-dev) cloned
+# The storefront is a separate repo (spree/storefront, branch main) cloned
# into storefront/ by setup.sh. It has its own pnpm project — deliberately not a
# member of this workspace, whose single lockfile and global overrides would
# have to cover Next 16 and the dashboard's Vite tree at once.
@@ -17,12 +17,11 @@ if [ ! -d storefront ]; then
exit 1
fi
-# A clone made before 6-0-dev was pushed sits on the storefront's default
-# branch, which targets the released Store API — the opposite of what this
-# worktree is for. Say so rather than let 6.0 changes look broken.
+# An older clone may still sit on the retired 6-0-dev branch, which no longer
+# follows the Store API. Say so rather than let current changes look broken.
storefront_head=$(git -C storefront rev-parse --abbrev-ref HEAD)
if [ "$storefront_head" != "$STOREFRONT_BRANCH" ]; then
- echo " ! storefront/ is on '$storefront_head', not '$STOREFRONT_BRANCH' — it targets the released Store API." >&2
+ echo " ! storefront/ is on '$storefront_head', not '$STOREFRONT_BRANCH'." >&2
echo " git -C storefront fetch origin && git -C storefront checkout $STOREFRONT_BRANCH" >&2
fi
diff --git a/scripts/worktree/lib.sh b/scripts/worktree/lib.sh
index 2aa5cb3842..072d36dd29 100755
--- a/scripts/worktree/lib.sh
+++ b/scripts/worktree/lib.sh
@@ -7,10 +7,8 @@
set -euo pipefail
TEMPLATE_DB="spree_worktree_template"
-# The storefront's 6.0 line. Its main branch stays on the released Store API for
-# people forking or deploying it; 6-0-dev tracks the unreleased one we build here.
STOREFRONT_REPO="https://github.com/spree/storefront.git"
-STOREFRONT_BRANCH="6-0-dev"
+STOREFRONT_BRANCH="main"
# Same defaults as the starter's config/database.yml, so the psql tools and
# Rails always agree on which server they are talking to. teardown runs after
# the worktree (and its bundled Rails) is gone, so these cannot come from Rails.