Shopify embedded admin app for CLEVER. The delivery backend now lives in the separate clever-route-server repository; this repo keeps only the Shopify app and its app-server/BFF loader/action code.
apps/shopify-app— React Router Shopify embedded app.
The Shopify app calls the operating delivery API through CLEVER_DELIVERY_API_URL.
On EC2 compose, Shopify app containers join the external route-server Docker network and call http://delivery-api:3000.
Production/App Store runtime:
- App URL:
https://clever-admin.cleversystem.ai - Redirect URL:
https://clever-admin.cleversystem.ai/auth/callback - Delivery API:
https://clever-route.cleversystem.ai - App scope:
CLEVER_APP_ID=clever
Dev preview/runtime:
- App URL:
https://clever-route-app.cleversystem.ai - Redirect URL:
https://clever-route-app.cleversystem.ai/auth/callback - Delivery API:
https://clever-route.cleversystem.ai - App scope:
CLEVER_APP_ID=clever-route-dev
KFood custom/runtime:
- App URL:
https://clever-kfood-app.cleversystem.ai - Redirect URL:
https://clever-kfood-app.cleversystem.ai/auth/callback - Delivery API:
https://clever-route.cleversystem.ai - App scope:
CLEVER_APP_ID=clever-route-kfood
Public URL hostnames must not contain shopify or example.
npm run setup
npm run build
npm run typecheck
npm test
npm run check:public-urlsCompose validation:
docker compose -f infra/compose/docker-compose.shopify-main.yml config --quiet
docker compose -f infra/compose/docker-compose.shopify-dev.yml config --quiet
docker compose -f infra/compose/docker-compose.shopify-kfood.yml config --quietSee NAMING.md for the canonical distinction between brand/display name, Shopify handle, Admin path, and hosted app URLs.
The repo contains three Shopify app config files:
apps/shopify-app/shopify.app.toml— production/public app config (CLEVER, handleclever-route).apps/shopify-app/shopify.app.dev.toml— dev/custom-store app config (CleverRoute Dev, handleclever-route-dev).apps/shopify-app/shopify.app.kfood.toml— KFood custom-store app config (CLEVER K-Food, handleclever-route-kfood).
Use explicit Shopify CLI config selection:
npm --prefix apps/shopify-app run dev→shopify app dev -c devnpm --prefix apps/shopify-app run deploy:prod→ production confignpm --prefix apps/shopify-app run deploy:dev→ dev/custom confignpm --prefix apps/shopify-app run deploy:kfood→ KFood custom config
Do not run Shopify Dashboard mutations, shopify app deploy, shopify app config link/use, or shopify app dev --reset against a live app without an explicit release decision.
The runtime distribution is selected with SHOPIFY_APP_DISTRIBUTION:
app_storefor the public runtime.single_merchantfor the dev/custom and KFood custom runtimes.
The repository is intended to stay private under the EVNSolution GitHub Free organization. Private GitHub-hosted workflow runs consume the org Actions quota, so the workflow is intentionally split:
- PR and
mainpushes run lightweight CI: install, build, typecheck, tests, public URL hostname guard, Shopify submission readiness, and compose config validation. - Production deploy is manual only: run the
CI/CDworkflow onmainwithdeploy_production=true. - Dev app deploy is manual only: run the same workflow on
mainwithdeploy_clever_route=true. - KFood app deploy is manual only: run the same workflow on
mainwithdeploy_kfood=true. - Production image builds happen on the EC2 host during deploy instead of on a GitHub-hosted runner.
Shopify app containers run on the existing route server EC2 and attach to the route-server Docker network:
docker-compose.shopify-main.yml→shopify-clever-main-shopify-app-1docker-compose.shopify-dev.yml→shopify-clever-dev-shopify-app-clever-route-1docker-compose.shopify-kfood.yml→shopify-clever-kfood-shopify-app-kfood-1
Runtime env files are intentionally not committed:
infra/env/shopify-app.envinfra/env/shopify-app-clever-route.envinfra/env/shopify-app-kfood.env
Required GitHub repository variables for deployment:
EC2_HOSTEC2_USERDEPLOY_PATH
Optional variables for temporary GitHub-hosted runner SSH ingress:
EC2_SSH_SECURITY_GROUP_IDAWS_REGION— defaults toap-northeast-2if omitted
Required GitHub repository secret:
EC2_SSH_KEY
Optional secrets for temporary GitHub-hosted runner SSH ingress:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEY