remix app dev- app blocks and app embed blocks

Topic summary

A developer building a photo uploader app using Shopify’s Remix template is seeking guidance on implementing customer-facing UI components. They understand Polaris handles admin UI but are unclear how to create storefront interfaces.

Key Technical Points:

  • Script Tag API is no longer viable—apps using it instead of theme app extensions may fail App Store review and won’t qualify for “Built for Shopify” badge
  • Theme app extensions (app blocks and app embed blocks) are the required approach for Online Store 2.0 themes
  • Extensions are created and deployed via CLI commands: shopify app generate extension and shopify app deploy

Implementation Challenges:

  • Unlike programmatic script injection, users must manually enable app embeds in their theme settings
  • This requires providing installation tutorials to merchants
  • However, developers can programmatically verify if embeds are active by parsing the theme’s settings_data.json file using the extension ID

Benefits:

  • Merchants maintain full control over injected code
  • Clean uninstallation—no residual code left in templates

Relevant documentation and code examples for detecting active app embeds were shared in the thread.

Summarized with AI on October 30. AI used: claude-sonnet-4-5-20250929.

Hello.

I have a little programming experience and looking into developing a photo uploader app. I am trying to understand the relationship between remix app theme app extensions and app blocks or app embed blocks.

I’m building an app using the jsx remix template. while reading through the getting started with Polaris I see that Polaris is for UI for the admin side. I am wondering how can i create UI for the customer side.

I had concluded that I could use the script tag API to inject javascript directly into themes but I saw that script tags might not pass the app store review.

https://shopify.dev/docs/api/admin-rest/2023-10/resources/scripttag

I want to create the app as well as possible and want to make sure it can have the “built for Shopify badge”

I haven’t been able to find any specifics on how a remix app using Polaris does the UI component for customers. How do the app block or app embed blocks get hosted on the remix app?

I’m probably not asking the right questions so I apologize if I am way off base in my understanding but thanks if anyone can point me in the right direction.

1 Like

I can’t answer all of your questions, but you can’t use ScriptTag to inject assets anymore. It’s obsolete. Right from the link you provided:

Your app might not pass App Store review if it uses script tags instead of theme app extensions. All new apps, and apps that integrate with Online Store 2.0 themes, should use theme app extensions, such as app blocks or app embed blocks.

The blocks are “hosted” through the CLI, they get created/picked up when you run:

shopify app generate extension
shopify app deploy

This link might help: https://shopify.dev/docs/apps/build/online-store/theme-app-extensions/build

It was an excellent move, now instead of simple programatically add a javascript, we need to force user to add the script to store theme as embedding and then to thank you page as block in checkout ui.
Instead of not bothering the user, we need to create a tutorial, how he can add those blocks and not forget to save it.
And in the end, we have no way of knowing, if he added those or not, so we can’t even show the information about necessary steps to do.
This is how you do UX.

</irony off>

  • Yes, a user has full control over what’s injected into his website.
  • Users would get used to enabling the block embeds easily as this is a common thing to do.
  • You do have a programmatic way of checking if the embed is activated or not. I can find the link to the topic with the code if you need it.
  • The bottom line here is that nothing is left in templates when the app is uninstalled.

No irony involved :slightly_smiling_face:

Please, can you find that link for me?
Thank you!

Sure, here are two topics I used as a source (they both use a similar approach):

https://community.shopify.com/c/hydrogen-headless-and-storefront/detecting-app-embed-blocks/m-p/1516195
https://community.shopify.com/c/shopify-apps/check-if-app-embed-is-active/td-p/2623270

You basically parse the settings_data.json, you just need to know the extensionId for that.