Skip to content

SX1: the storefront on Workers - #2

Merged
pullely merged 1 commit into
mainfrom
orun/SX-2-the-storefront-on-workers
Oct 28, 2026
Merged

pullely merged 1 commit into
mainfrom
orun/SX-2-the-storefront-on-workers

Conversation

@pullely

@pullely pullely commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

vercel-partner-solutions/nextjs-salesforce-commerce-cloud (a474b5e, MIT in license.md) in apps/web, built by next build --webpack and @opennextjs/cloudflare 1.20.11 into one Worker with Static Assets: the R2 incremental cache (infra/terraform/cloudflare-r2), the sharded Durable Object tag cache and the Durable Object revalidation queue, as the commerce baselines have them. Cache Components are off and experimental.useCache keeps every "use cache" read with its cacheLife("days") and its collections/products tags — a Cache Components page answers 500 then hangs on workerd (opennextjs-cloudflare#1450); Next is 16.3.8, the lowest 16.x the adapter accepts. commerce-sdk-isomorphic 3.5.0 runs on workerd, and the SLAS guest login is upstream's: a public client's PKCE flow, or a private client's secret. next.config.ts env inlines SFCC_CLIENT_ID, SFCC_ORGANIZATIONID, SFCC_SHORTCODE, SFCC_SITEID, the origin and the company name at build; SFCC_SECRET and SFCC_REVALIDATION_SECRET are Worker secrets the deploy sets after the build, never inlined. With no coordinates (lib/sfcc/connection.ts) every reader answers empty, the guest login and every cart or checkout write refuse before a request, every page carries the connect note and / says "Connect your Salesforce Commerce Cloud store". getCart and getCheckoutOrder check their cookie before minting a guest token (upstream logged a guest in on every cart-less page view). /api/revalidate answers 503 with no secret, 401 to a missing or wrong ?secret= (constant time; upstream answered 200), and revalidates products or collections by x-sfcc-topic. SITE_NAME (app/site.ts) is the one store-name seam; the Open Graph images draw on workerd; /api/health. Upstream's check (prettier --check, formatted once because it failed upstream) is the app's test; ESLint added for the workspace's lint. typecheck, lint, test (upstream's check and tests/web's 23, including both guest logins against the stand-in) and build are green; the Worker is 2.53 MiB gzipped (Workers Free).

🤖 Generated with Claude Code

vercel-partner-solutions/nextjs-salesforce-commerce-cloud (a474b5e, MIT in license.md) in apps/web, built by next build --webpack and @opennextjs/cloudflare 1.20.11 into one Worker with Static Assets: the R2 incremental cache (infra/terraform/cloudflare-r2), the sharded Durable Object tag cache and the Durable Object revalidation queue, as the commerce baselines have them. Cache Components are off and experimental.useCache keeps every "use cache" read with its cacheLife("days") and its collections/products tags — a Cache Components page answers 500 then hangs on workerd (opennextjs-cloudflare#1450); Next is 16.3.8, the lowest 16.x the adapter accepts. commerce-sdk-isomorphic 3.5.0 runs on workerd, and the SLAS guest login is upstream's: a public client's PKCE flow, or a private client's secret. next.config.ts env inlines SFCC_CLIENT_ID, SFCC_ORGANIZATIONID, SFCC_SHORTCODE, SFCC_SITEID, the origin and the company name at build; SFCC_SECRET and SFCC_REVALIDATION_SECRET are Worker secrets the deploy sets after the build, never inlined. With no coordinates (lib/sfcc/connection.ts) every reader answers empty, the guest login and every cart or checkout write refuse before a request, every page carries the connect note and / says "Connect your Salesforce Commerce Cloud store". getCart and getCheckoutOrder check their cookie before minting a guest token (upstream logged a guest in on every cart-less page view). /api/revalidate answers 503 with no secret, 401 to a missing or wrong ?secret= (constant time; upstream answered 200), and revalidates products or collections by x-sfcc-topic. SITE_NAME (app/site.ts) is the one store-name seam; the Open Graph images draw on workerd; /api/health. Upstream's check (prettier --check, formatted once because it failed upstream) is the app's test; ESLint added for the workspace's lint. typecheck, lint, test (upstream's check and tests/web's 23, including both guest logins against the stand-in) and build are green; the Worker is 2.53 MiB gzipped (Workers Free).

Co-Authored-By: Claude <noreply@anthropic.com>
Orun-Task: SX-2
@pullely
pullely merged commit ab392be into main Oct 28, 2026
2 checks passed
@pullely
pullely deleted the orun/SX-2-the-storefront-on-workers branch October 28, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants