Is there a way to create a Shopify storefront app that only affects one page of the store?

424 Views Asked by At

I want to create a custom Shopify app on one pages of my store that takes user input, runs it through a third part API and gives the user a response. The user input isn't sensitive data so it doesn't have to be hidden, just the API call.

The store I'm building this app for already exists and has a theme. I just want to run this theme on one page. Is there a way to specify to run the theme on one page or is there a better way to approach this problem? I feel like I've tried everything and I've hit a wall.

So far I've tried using Shopify's hydrogen template with the storefront API which works to build the app but applies the "theme" to the entire store. I expected to be able to install this on just one page or specify it in the files that it was an add-on. I also looked into embedding code but I need to run the API call server-side and it doesn't seem like this is an option with embedding code. In the documentation it seems that there is a way to use a "bridge tunnel" template in order to add new admin features but not on the storefront.

I'm new to Shopify development and this is my first app so any help would be much appreciated!

1

There are 1 best solutions below

0
On

You are looking for Shopify App Proxy. It perfectly fits your use case as

App proxies take requests to Shopify links, and redirect them to external links. This allows you to fetch and display data on a merchant's store from an external source.

Just create an app proxy. Handle the initial request to render form for user input. On form submission, receive the data on your proxy backend and do any API calls that you need.