This is a template for building a Shopify app using Node and React.
🚀 It contains the basics for building a Shopify app + Typesafety, tRPC routers redis and prisma! 🚀
[✅] - Shopify CLI, create theme-app-extensions deploy etc
[✅] - tRPC
[✅] - Express & Node
[✅] - Redis
[✅] - Prisma DB client works
[✅] - Typesafe GraphQL Codegen Generator
Typesafety over all! Plus main node shopify functionalities like theme-app-extensions are working out of the box for embedded apps. I'm using Railway for redis and prisma.
This template combines a number of third party open-source tools:
The following Shopify tools complement these third-party tools to ease app development:
Clone this repository :D
The Shopify CLI connects to an app in your Partners dashboard. It provides environment variables, runs commands in parallel, and updates application URLs for easier development.
You can develop locally using your preferred package manager. Run one of the following commands from the root of your app.
Using pnpm:
pnpm run dev
To generate Graphql, write some queries under graphql and run:
cd web/frontend &&
pnpm generate
Open the URL generated in your console. Once you grant permission to the app, you can start development.
This template uses planetscale, but you can use anything you want with your prisma file. You can change the url on the .env file.
The frontend is a single page app. It requires the SHOPIFY_API_KEY, which you can find on the page for your app in your partners dashboard. Paste your app’s key in the command for the package manager of your choice:
Using pnpm:
cd web/frontend/ && SHOPIFY_API_KEY=REPLACE_ME pnpm run build
You do not need to build the backend.
Easily add theme app extensions
Important to know you might need to go to https://partners.shopify.com/ > All apps > Your app > Browse Extensions and enable to work
npm run shopify app generate extension
I personally prefer digitalocean apps, easy to setup and cheap! You can use this link to signup with a referral :)
When you reach the step for setting up environment variables, you also need to set the variable NODE_ENV=production.
express.json middlewareIf you use the express.json() middleware in your app and if you use Shopify.Webhooks.Registry.process() to process webhooks API calls from Shopify (which we recommend), the webhook processing must occur before calling app.use(express.json()). See the API documentation for more details.
You can always find more info on the official shopify node app template https://github.com/Shopify/shopify-api-node/tree/main/docs
$ claude mcp add shopify-app-ts \
-- python -m otcore.mcp_server <graph>