ResilientLang docsDeveloper documentation (draft, product name is a placeholder)

Shopify quick start

Status. The Shopify integration exists as a library and a theme app extension in the repository (integrations/shopify). Nothing is submitted to the Shopify App Store. The owner creates the Shopify app and developer accounts. Steps below describe the intended flow.

Two paths#

PathHowCoversSurvives our servers being down
A. NativeThe backend writes translations into your store with Shopify's translationsRegister mutationWhat Shopify lets apps translate: products, collections, pages, articles, menus, theme text, policiesYes: the translations live in your Shopify store (persistence after uninstall is verify)
B. LoaderA theme app embed loads the loader, which applies the static bundlesText path A cannot reach, such as app-rendered storefront textYes by design: bundles are static files on CDNs

Path A is the default and is the one that matters for search, because Shopify serves each published language on its own URLs. Shopify generates hreflang automatically only for markets that have their own domain, subdomain or subfolder (x-default points to the primary domain), and automatic hreflang can be turned off if you add your own (Shopify markets SEO). A market set up some other way gets no automatic hreflang.

Steps#

  1. Install the app on your store and approve the requested scopes (least privilege, the full list is in the integration spec).
  2. In the app, choose target languages. Languages are enabled in the store but not published until you opt in, because publishing makes the URLs public.
  3. Run Sync. The sync skips empty values, non-text content, and URL handles. It never overwrites a translation you edited yourself in Shopify unless you ask it to.
  4. In the theme editor open App embeds and switch on the ResilientLang embed (this is path B). Add the language switcher app block where you want it.
  5. Check the report: strings that had no translation yet are listed so you can run a translate job and sync again.

Limits you should know#

The Shopify host#

Shopify talks to a separate deployable, the Shopify host (integrations/shopify-host, an ASP.NET Core 8 app around the integration library). It was built and tested offline against a fake Shopify; it has not been run against a real store. It owns every route Shopify calls:

RoutePurpose
GET /healthz, GET /readyzLiveness (always 200), readiness (503 until configured)
GET /shopify/install?shop=Validates the shop and redirects to Shopify's authorize URL with a signed, short-lived state
GET /shopify/oauth/callbackChecks state, signature and HMAC, exchanges the code for an expiring offline token, creates the tenant for a new shop, stores the encrypted token
GET /shopify/appApp launch page: plan, theme-embed activation link and plan buttons (needs Shopify's query HMAC and a fresh timestamp)
POST /shopify/webhooksRaw-body HMAC check, deduplication, topics app/uninstalled, shop/redact, customers/data_request, customers/redact, app_subscriptions/update, shop/update, products/update
POST /shopify/billing/subscribe, GET /shopify/billing/returnShopify-billed plans (shopify_s, shopify_m, shopify_l: 12, 29 and 79 US dollars per month as proposed); charges are test charges until the owner switches them; the return route re-reads the real status from Shopify
GET/POST /shopify/proxy/...App proxy with signature verification; returns public embed settings

For the merchant: set the app URL to https://<host>/shopify/app, the redirect URL to https://<host>/shopify/oauth/callback and the webhooks to https://<host>/shopify/webhooks. Settings are names in configuration (ResilientLang:Shopify, ResilientLang:ShopifyHost); values live in the secret store only, never in the repository. A host that is missing a setting does not crash: it reports not ready and withholds the routes.

Open items (verify): how merchants sign in to the dashboard, whether the app needs App Bridge session tokens for embedding, and the exact shape of the active-subscriptions query on a real development store. Details: integrations/shopify-host/README.md.

Full spec and sources: integrations/shopify/SPEC.md and docs/work/WP-17.md in the repository.