I have followed your tutorial on building an app with Node and react. This is a nice tutorial thank you for it! If I understand correctly, this embedded app code seems to provide code for a store-owner facing application, but leaves the storefront front-end to be handled by shopify.
I also want to implement a custom storefront using your react-js-buy-sdk, but I'm uncertain if the two sets of code can be integrated under one unified server.
Is there a way that by using the existing "app with node and react" back-end infrastructure we can plug in the custom storefront front-end code from the react-js-buy? I want to roll these two projects into one single repository, but I'm uncertain as to what gets rendered by shopify vs us, and who handles the serving of the storefront files.
Solved! Go to the solution
This is an accepted solution.
The embedded app SDK (EASDK) is only applicable to building applications for the Shopify Admin and in general it is not recommended to expose a private application or embedded application to the storefront due to the exposure of sensitive information that is only available via the Shopify Admin API. Embedded applications do not inherently have an impact on the rendering of your Shopify storefront pages.
If there are pieces of your application that you would like customers to interact with directly, (such as a custom form) you are able to embed pages of your application to the storefront using an Application Proxy.
If you were to build a custom storefront using the JS Buy SDK, the rendering of all pages and data is done by you. This would be a self hosted website in which Shopify's JS Buy SDK acts as a data layer enabling you to pull products, collections, and create carts, and checkouts without having to use a Shopify storefront (which also means that Shopify is not rendering any of these pages for you). Since this would be a self hosted web app, you also have complete control over the backend of your application and can implement any functionality that you see fit.
In general EASDK and JS Buy SDK are not meant or designed to be used within the same application and it would make most sense to separate these out into separate projects.