OrganicOPZ Logo
Build Shopify App NodeJS

How to Build a Shopify App Using Node.js

Step-by-Step Guide to Creating Embedded Shopify Apps with Node.js, OAuth, and Admin API

Shopify apps extend the capabilities of stores with custom functionality. If you're a developer looking to build a Shopify app with Node.js, this guide walks you through setting up your app using Shopify CLI, OAuth authentication, and API integrations.

Step 1: Prerequisites

  • ๐Ÿงฐ Node.js โ‰ฅ v16.x installed
  • ๐Ÿ› ๏ธ Shopify CLI: npm install -g @shopify/cli
  • ๐Ÿ’ป Partner account + development store
  • ๐Ÿ” ngrok or Cloudflare Tunnel for secure HTTPS dev link

Step 2: Scaffold a New App

shopify app create node

This generates a full Node.js + Express backend with Polaris and App Bridge for the frontend. It includes built-in OAuth, Shopify API logic, and UI templates.

Step 3: Configure App in Partner Dashboard

  • ๐Ÿ”— Set your app URL to use the ngrok domain (e.g., https://xyz.ngrok.io)
  • ๐Ÿ“ฆ Update API key, secret, and scopes in .env
  • ๐Ÿงญ Whitelist redirect URIs for OAuth flow

Step 4: Implement OAuth Authentication

Shopify requires secure OAuth2 authentication to access store data. This is auto-configured in the generated app but hereโ€™s how it works:

  • ๐Ÿ” App sends user to Shopifyโ€™s OAuth screen
  • ๐Ÿ“„ After approval, Shopify redirects with code + shop params
  • ๐Ÿ” App exchanges this for a permanent access token
  • ๐Ÿ”’ Token is used to call Shopify Admin API securely

Step 5: Make Shopify API Calls

Use the access token to fetch store data. Example using GraphQL:

const client = new shopify.api.clients.Graphql({ session: session }); const query = `{ shop { name email } }`; await client.query({ data: query });

Step 6: Deploy Your Shopify App

  • ๐Ÿš€ Use Render, Vercel, or Heroku for backend hosting
  • ๐Ÿ“„ Point Shopify App URL to your deployed domain
  • ๐Ÿ” Test embedded behavior inside a store via iframe

Conclusion

With Node.js and Shopify CLI, building embedded Shopify apps is now faster and more standardized. You can automate workflows, build dashboards, sync data, or create store-specific tools that scale. Once ready, submit your app for review or use it privately for custom clients.

OrganicOpz - Your One-Stop Solution

Offering a range of services to help your business grow

Whether you need video editing, web development, or more, we're here to help you achieve your goals. Reach out to us today!

Discover Custom Solutions

Get Personalized Assistance

At OrganicOpz, We Specialize In Crafting Tailored Strategies To Elevate Your Online Presence. Let's Collaborate To Achieve Your Digital Goals!

Get In Touch!

Share Your Idea Or Requirement โ€” Weโ€™ll Respond With A Custom Plan.

+91-9201477886

Give Us A Call On Our Phone Number For Immediate Assistance Or To Discuss Your Requirements.

contact@organicopz.com

Feel Free To Reach Out To Us Via Email For Any Inquiries Or Assistance You May Need.

Working Hours

Our Standard Operating Hours Are From 4:00 To 16:00 Coordinated Universal Time (UTC).

Chat with Us