Skip to content

Prepare Shopify on Cloudflare for open-source submission - #4

Merged
rome2o merged 4 commits into
mainfrom
ft4/cloudflare-submission-prep
Jul 23, 2026
Merged

rome2o merged 4 commits into
mainfrom
ft4/cloudflare-submission-prep

Conversation

@Uzair-Ahmed-Dahraj

Copy link
Copy Markdown
Collaborator

Summary

Prepare the Shopify on Cloudflare starter for open-source publication and its Cloudflare Templates submission.

Changes

  • migrate authenticated frontend requests to App Bridge v4 ID-token authentication
  • remove the incompatible App Bridge v3 dependency
  • add regression coverage for authenticated fetch behavior
  • add a public /preview page that works without Shopify authentication
  • keep /api/example protected
  • correct Shopify install and callback routes in the README
  • add the permanent public preview URL
  • preserve the CI workflow and coverage tooling already added to main

Verification

  • npm ci
  • npm run lint:ci
  • npm run test:coverage (20 tests passed)
  • npm run type-check
  • npm run check
  • npm run test:e2e (4 tests passed)
  • credential and binding-ID scan
  • package-lock synchronization check

Public preview: https://cloudflare-shopify-starter-template.ali-d43.workers.dev/preview

Replace the incompatible v3 authenticatedFetch utility (which calls app.subscribe(), absent on the v4 useAppBridge() global) with a typed createAuthenticatedFetch helper that attaches the App Bridge 4 ID token as a Bearer header. Drop the @shopify/app-bridge v3 dependency, add a regression test, allow devDependency imports in test files, and add Devkind author metadata.
A static, credential-free page at GET /preview so a visitor with no Shopify session (e.g. a Cloudflare Templates reviewer) can see what the template is. Emphasises the embedded-app model and shows the stack, request flow, and a live edge-status strip. Outside /api/*, so requireShop never runs against it. Includes unit + Playwright coverage.
Fix the documented OAuth routes to match the code (/shopify/install and /shopify/callback) and add the deployed public preview URL.
@rome2o
rome2o merged commit 262c207 into main Jul 23, 2026
4 checks passed
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