What type of app should I develop for secure code hosting?

I have a lot of experience with Shopify when it comes to liquid api and the theme environment. However I have some code that can not be securely run in js on the page as it includes and api key and some GraphQL requests.

So I was looking into creating a simple Shopify app that could run this code and inject the results of the queries onto a page in the theme. This is where I am very inexperienced.

I have looked into some of the app dev tutorials from Shopify and I keep running into errors when trying to get through the steps. But besides that, I am not even sure I am doing the right tutorial.

Does anyone have any experience on the kind of app I should be looking to develop to host some basic js code that can manipulate the page? Also, does Shopify now host app code or is that still something we would need to host elsewhere?

Please excuse my ignorance, as mentioned, I am quite inexperienced when it comes to app development.

Hi Lesterdefreitas

You can inject inline content on a page using app blocks. Your app block can call your app backend to execute GraphQL requests and return the data which can then be displayed on the page.

Shopify does not host your app code so you have to do that yourself.

Using the Shopify CLI is probably the easiest way to start building apps. Here is a good starting point: https://shopify.dev/apps/getting-started/create

Here a complete guide to building apps: https://www.shopify.com/partners/blog/how-to-build-a-shopify-app

All the best!