Port of the Shopify App Template to TanStack Start + Cloudflare Workers + Effect v4.
Prerequisites: Shopify account, CLI, and dev store — see https://shopify.dev/docs/apps/build/scaffold-app
# first time
pnpm i
cp .env.example .env
# set client_id = "" in shopify.app.toml
pnpm d1:reset
shopify app dev
# every time
shopify app dev# first time
# set client_id = "" in shopify.app.staging.toml
# creates tcesa-staging in Shopify Partners
shopify app config link --config staging
# fix shopify.app.staging.toml: set application_url and redirect_urls to your Workers URL,
# set automatically_update_urls_on_dev = false
# set SHOPIFY_APP_URL in wrangler.jsonc env.staging.vars to your Workers URL
# creates D1 database (skip if already exists)
pnpm d1:reset:staging
# copy API key/secret, then set as wrangler secrets
shopify app env show --config staging
pnpm exec wrangler secret put SHOPIFY_API_KEY --env staging
pnpm exec wrangler secret put SHOPIFY_API_SECRET --env staging
pnpm deploy:stagingConnect GitHub for automatic deploys on push:
- Cloudflare Dashboard → Workers & Pages →
tcesa-staging→ Settings- Git repository: connect to repo
- Build configuration
- Build command:
CLOUDFLARE_ENV=staging pnpm build - Deploy command:
pnpm exec wrangler deploy --env staging
- Build command:
# every time (worker deploys automatically on push via Cloudflare Git integration)
shopify app deploy --config stagingInstall on dev store: Shopify Dev Dashboard → Apps → tcesa-staging → Test on development store.