This repository is now organized as an npm workspace to support a reusable storefront foundation package for multi-tenant deployments.
packages/storefront-base: shared storefront foundation package (@alphasquad/storefront-base)packages/storefront-config: typed tenant config contract (@alphasquad/storefront-config)packages/create-storefront: CLI scaffolder (@alphasquad/create-storefront)apps/example-tenant: reference tenant app that consumes the shared packages
@alphasquad/storefront-base uses:
peerDependencies:next,react,react-domdependencies: package-owned runtime dependencies
This keeps framework runtime ownership in each tenant app and avoids duplicate React/Next runtime issues.
From repo root:
npm install
npm run devThis starts apps/example-tenant.
From repo root:
npm run build
npm run lint
npm run typecheckThis workspace uses Changesets for versioning and npm publishing.
npm run changeset
npm run version-packages
npm run releaseAutomation:
.github/workflows/release.yml: creates release PRs and publishes on merge tomain..github/workflows/ci.yml: validates build/typecheck/lint and runs a package install smoke test.
Required GitHub secret:
NPM_TOKEN: npm token with publish permission for@alphasquad/*.
After publishing:
npx @alphasquad/create-storefront my-tenantPatch dependency updates can auto-merge using:
templates/tenant/.github/dependabot.ymltemplates/tenant/.github/workflows/dependabot-automerge.yml
Copy these into each tenant repository to enforce automatic patch adoption.
Shared metadata defaults are defined in @alphasquad/storefront-base and consumed by tenant layouts. Tenants can override all head fields through metadata overrides while still inheriting package defaults.