Repository navigation
SX1: the storefront on Workers - #2
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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