Skip to main content
An embedded Shopify app on floo: it opens inside Shopify admin, signs merchants in with Shopify, keeps their sessions in managed Postgres, and receives webhooks at https://<app>.getfloo.app. Start from getfloo/shopify-app-template. It is Shopify’s React Router app template with Postgres in place of SQLite and a floo.app.toml. You also need a Shopify Partner account, a development store, and the Shopify CLI.

Set up your agent

For Claude Code, also run floo skills install --path .claude/skills/floo. Cursor, Codex, and other agents: Agent setup.

Agent prompt

Click Use this template on the template’s GitHub page, clone your copy, then paste this into your agent. Replace storefront-app with your app name.

floo.app.toml

floo.app.toml
  • access_mode = "public": Shopify authenticates every request itself. The embedded admin sends a session token, and webhooks carry an HMAC signature that authenticate.webhook checks. floo’s sign-in would block both, so leave the app public and let Shopify’s checks gate it.
  • migrate_command creates Prisma’s Session table once per deploy, before traffic moves. A failed migration stops the deploy and the previous revision keeps serving.
  • required stops a deploy that is missing a Shopify variable and names it, instead of starting an app that fails at its first request.
  • The app reads its public URL from FLOO_APP_URL, which floo sets for each environment. You do not set SHOPIFY_APP_URL on floo.

Point Shopify at floo

Shopify sends merchants and webhooks to the URLs in shopify.app.toml:
shopify.app.toml
shopify app deploy releases the configuration, including webhook subscriptions, to Shopify. Run it after every change to shopify.app.toml.

Embedding in Shopify admin

floo’s gateway sends X-Frame-Options: SAMEORIGIN on every response. The template also sends Content-Security-Policy: frame-ancestors for the merchant’s shop and https://admin.shopify.com, through addDocumentResponseHeaders in app/entry.server.tsx. Browsers apply frame-ancestors in place of X-Frame-Options, so Shopify admin can frame the app and other sites cannot. Remove that call and the app shows a blank frame in Shopify admin.

Webhooks

Declare subscriptions in shopify.app.toml and handle each in a route under app/routes/webhooks.*. Every handler calls authenticate.webhook(request) first, which rejects a request without a valid Shopify signature. Shopify retries a delivery that takes longer than five seconds to answer. Answer first, and move slow work to a cron job. A cold start can use most of those five seconds: the floo starter app took 4.4 s after an hour idle. Keep prod ready with one warm instance, which bills while it idles:
An app listed on the Shopify App Store must also handle the three compliance webhooks (customers/data_request, customers/redact, shop/redact). They are commented out in the template’s shopify.app.toml.

Production

Create a second Shopify app for production stores, so development installs never touch merchants. Set its keys on floo’s prod environment and release dev’s version to prod:
Point the production Shopify app’s application_url and redirect_urls at the prod URL. shopify app config link creates a second config file, such as shopify.app.production.toml, and shopify app deploy --config production releases it. See Environments for how dev and prod differ.

Local development

shopify app dev runs the app behind a Shopify tunnel and needs DATABASE_URL. floo run injects your dev database’s credentials into a command:
If shopify app dev changes your app’s URLs to its tunnel, run shopify app deploy afterwards to point them back at floo.

Troubleshooting