Building a Shopify App with React & Node

Rate this content
Bookmark

Shopify merchants have a diverse set of needs, and developers have a unique opportunity to meet those needs building apps. Building an app can be tough work but Shopify has created a set of tools and resources to help you build out a seamless app experience as quickly as possible. Get hands on experience building an embedded Shopify app using the Shopify App CLI, Polaris and Shopify App Bridge.

We’ll show you how to create an app that accesses information from a development store and can run in your local environment.


This workshop has been presented at React Summit Remote Edition 2021, check out the latest edition of this React Conference.

FAQ

The hosts of the React pre-conference workshop on building a Shopify app with React and Node are Jennifer Grey and Hanna Chen, both frontend developers at Shopify.

The main goal of the React pre-conference workshop is to teach participants how to create a basic app in Shopify using React components and Node.js, access store data, and integrate these components into their own app projects.

Participants can ask questions during the workshop using the Q&A function. The hosts will try to troubleshoot any issues participants may have while following along with the workshop.

Yes, the workshop will be recorded and the recording will be available later on the same day. All attendees and registrants will receive a link to access the recording.

A Shopify app extends the functionality of what a merchant receives out of the box when they set up a store with Shopify. It allows merchants to customize and add features to their store to help their unique businesses thrive.

You can find inspiration for building a Shopify app by focusing on an industry that solves a pain point for merchants, exploring international markets to fill product gaps, and gathering insights and feedback from Shopify communities such as forums, Facebook groups, and meetups.

Shopify provides several tools to help developers build apps, including the Shopify app CLI for creating, authenticating, and installing apps, Polaris for an integrated UI experience, and AppBridge for facilitating communication between the Shopify admin frame and the app.

Polaris is Shopify's design system that provides a cohesive user experience with consistent patterns across the interface. It includes React-based components that are built with accessibility, performance standards, and internationalization in mind, helping developers create a familiar and predictable user experience for merchants.

AppBridge is a client that helps embedded apps interact with Shopify by managing the state between the app and Shopify admin. It provides actions to respond to certain functionalities, enabling communication and seamless integration within the Shopify ecosystem.

Participants need to have a free Shopify partner account and a development store set up. Additionally, they should have Ruby version 2.5.1 or higher installed on their computer.

Jennifer Gray
Jennifer Gray
Hanna Chen
Hanna Chen
87 min
10 Jun, 2021

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Jennifer Grey and Hanna Chen, front-end developers at Shopify, hosted a React pre-conference workshop on building a Shopify app with React and Node. The workshop covered creating a basic app in Shopify, using React components designed by Shopify, and accessing store data. They also discussed using the Shopify app CLI, harnessing the power of Polaris for an integrated UI experience, and using AppBridge for communication. Overall, participants learned how to build a Shopify app and enhance it with functionalities using AppBridge and Polaris.

1. Introduction to the Workshop

Short description:

Great to see so many people in attendance from all over the world. Jennifer Grey and Hanna Chen, front-end developers at Shopify, will be hosting a React pre-conference workshop on building a Shopify app with React and Node. They have years of experience and will provide valuable insights and advice. The workshop will cover creating a basic app in Shopify, using React components designed by Shopify, and accessing store data. Questions can be asked through the Q&A function, and there will be time for a Q&A session at the end. The workshop will be recorded and the recording will be available to all attendees.

♪​♪ I think we will kick things off. Great to see so many people in attendance from all over the world. Shout-out to Copenhagen, Berlin, India, Poland, Portugal, US, Germany, Belgium, UK. Czech, Poland again, Belarus. Amazing to see so many people. Good morning, good afternoon, wherever you are. Thanks so much for joining us today. And welcome to today's React pre-conference workshop, building a Shopify app with React and Node, hosted by Jennifer Grey and Hanna Chen. Both are front-end developers here at Shopify.

Jennifer and Hanna both have years of experience working on developer tools and resources at Shopify, so they'll have so many insights and valuable advice to share with the developer community here. So during the next 90 minutes, we'll be looking at how to create a basic app in Shopify, how to use React components that Shopify have designed for you to use in your own app projects, as well as create functionality so these components can access store data.

So just a few housekeeping notes before we get started. If you do have questions during the workshop, if you get stuck on anything please use the Q&A function and we'll be able to try and troubleshoot any issues you're having while following along with the workshop. I'll be monitoring these questions as well as the chat in here and the Discord channel. And we should hopefully have some time as well at the end of the workshop for a quick Q&A session. Also, this workshop will be recorded and the recording will be available later today. All attendees and registrants should get a link and that'll allow them to access the recording. With that, let me pass you over to Jennifer and Hana to show us how to build the Shopify app with React and Node. Thank you so much, Liam. And welcome, everyone.

2. Building a Shopify App

Short description:

Jennifer and Hannah, both frontend developers at Shopify, will guide you through building a Shopify app using the latest tools and technologies. They will cover topics such as using the Shopify app CLI, harnessing the power of Polaris for an integrated UI experience, and using AppBridge for communication. Shopify apps extend the functionality of a merchant's store, allowing for customization and added features. Before building an app, developers can find inspiration by focusing on specific industries, exploring international markets, or gathering insights from the Shopify community. Shopify provides libraries and patterns to help partners create apps, and the workshop will result in an embedded app starting with an empty state component.

As Liam mentioned, my name is Jennifer. I'm a friend and developer at Shopify. I work on the docs and API libraries team out of Toronto, Canada. And our goal is to make it easier for developers to build on Shopify's platform by creating and curating resources like documentation, software tools and different libraries.

Specifically, my main focus on the team is the user experience on Shopify.dev, which is our home for developer documentation across the Shopify platform. And hello, everyone. My name is Hannah. And I'm also a frontend developer at Shopify. I work on a team dedicated to providing embedded apps with the capabilities that will enable great merchant experience. I've spent my time at Shopify on AppBridge, which is the JavaScript client powering embedded apps.

So Liam briefly went over what we'll be covering or what we'll be doing today, but here's just a little bit more in-depth workshop agenda. So today, we're going to be covering how to build an app using Shopify's latest tools and technologies that's going to embed seamlessly into the Shopify store admin. So this will include what it looks like to build an app for Shopify ecosystem, using the Shopify app CLI to create, authenticate and install your app in the partner dashboard, harnessing the power of Polaris for an integrated UI experience and using AppBridge for communicating between the admin frame and your app.

So what exactly is a Shopify app? A Shopify app extends the functionality of what a merchant receives right out of the box when they set up a store with Shopify. So imagine when someone purchases a new phone, it should already come with the basic capabilities that the majority of users would already need, like messaging, calling, calendars, et cetera. From there, each device owner can customize and extend these capabilities of their phones to meet their specific needs by installing additional apps. So Shopify has taken a pretty similar approach in regards to what a merchant will automatically receive right out of the box. So we've included all of the baseline features that are required for the majority of merchants to set up an online store, but we do know that every store is unique and we want merchants to be able to extend and add the features to their store that will help their unique businesses thrive. And that's exactly where Shopify apps come in. So Shopify has both first-party and third-party apps and as the company grows, it has built a robust platform to build apps as it's found that apps provide a way to scale quickly and provide this needed customization to the merchant's experience.

All right, so I'm going to dive into what we should do before building an app. Sometimes we forget that there's one more step. So before building an app, you'll need to figure out what you want to build. Whether that's directly from merchants or from an emerging retail trend that you're noticing. We have a variety of places from where app developers can find inspiration for their Shopify app. So I'm going to share three ways that app developers can find inspiration for the next project. First one is to find an industry that solves a pain point for them. Our Shopify merchants sell across a number of industries. So this could be a home and garden, food and beverages, and each industry faces its own set of regulations, practices and pain points. As a developer, you can focus on an industry and learn about the frustrations that these merchants deal with, thus finding a problem to solve. Second way is if you were to explore international markets and fill in product gaps. With merchants rapidly joining Shopify and making sales in countries like Japan, Mexico and Germany, Shopify is growing internationally. These international markets come with their own variables that Shopify sometimes just can not solve out of box. So some examples here are, let's say buyer preferences, shipping options, tax calculators, there are a lot of tax laws around the world that is just not possible for Shopify to cover out of box. And this is where you as an app developer can play a huge role. By doing market research on these growing markets, developers can see what regional issues exist and solve them through apps. Finally, merchant insights and feedback from Shopify communities. So Shopify communities, such as our forums, Facebook groups, meetups, they all provide direct insights into what merchants are experiencing and looking for. So throughout these online and offline communities, merchants they openly discuss business, their business, and what they seek to accomplish, as well as features that they wish to provide. And also, the tools that they wish to see. So great resources if you are looking for inspiration.

Now, so let's say you've browsed the forums for issues that merchants are having, or you've identified a need in the larger community. And you want to build an app to put in the Shopify App Store. That was great. You're actually ready to dive in. Next, I'm gonna hand this back to Jen to walk you through the tools that you can use to help you build this workshop.

Perfect. So Shopify has taken a lot of the libraries and patterns that we use internally, and we've made them public and open source to help partners like yourselves make apps. So today we'll show you how to build a public embedded app and showcase these specific tools that we've made available to you in the hopes that it will make it easier for you to get shit done. So at the end of the workshop, we'll have an embedded app that starts off with what we call an empty state component.

QnA

Watch more workshops on topic

Build Modern Applications Using GraphQL and Javascript
Node Congress 2024Node Congress 2024
152 min
Build Modern Applications Using GraphQL and Javascript
Featured Workshop
Emanuel Scirlet
Miguel Henriques
2 authors
Come and learn how you can supercharge your modern and secure applications using GraphQL and Javascript. In this workshop we will build a GraphQL API and we will demonstrate the benefits of the query language for APIs and what use cases that are fit for it. Basic Javascript knowledge required.
Create a Visually Editable Next.js Website Using React Bricks, With Blog and E-commerce
React Summit 2023React Summit 2023
139 min
Create a Visually Editable Next.js Website Using React Bricks, With Blog and E-commerce
Top Content
WorkshopFree
Matteo Frana
Matteo Frana
- React Bricks: why we built it, what it is and how it works- Create a free account- Create a new project with Next.js and Tailwind- Explore the directory structure- Anatomy of a Brick- Create a new Brick (Text-Image)- Add a title and description with RichText visual editing- Add an Image with visual editing- Add Sidebar controls to edit props (padding and image side)- Nesting Bricks using the Repeater component- Create an Image gallery brick- Publish on Netlify or Vercel- Page Types and Custom fields- Access Page meta values- Internationalization- How to reuse content across pages: Stories and Embeds- How to create an E-commerce with Products’ data from an external database and landing pages created visually in React Bricks- Advanced enterprise features: flexible permissions, locked structure, custom visual components
Build a chat room with Appwrite and React
JSNation 2022JSNation 2022
41 min
Build a chat room with Appwrite and React
WorkshopFree
Wess Cope
Wess Cope
API's/Backends are difficult and we need websockets. You will be using VS Code as your editor, Parcel.js, Chakra-ui, React, React Icons, and Appwrite. By the end of this workshop, you will have the knowledge to build a real-time app using Appwrite and zero API development. Follow along and you'll have an awesome chat app to show off!
Building High-Performance Online Stores with Shopify Hydrogen and Remix
React Advanced 2023React Advanced 2023
104 min
Building High-Performance Online Stores with Shopify Hydrogen and Remix
WorkshopFree
Alexandra Spalato
Alexandra Spalato
I. Introduction- Overview of Shopify Hydrogen and Remix- Importance of headless e-commerce and its impact on the industry
II. Setting up Shopify Hydrogen- Installing and setting up Hydrogen with Remix- Setting up the project structure and components
III. Creating Collections and Products- Creating collections and products using Hydrogen’s React components- Implementing a Shopping Cart- Building a shopping cart using Hydrogen’s built-in components
VI. Building the home page with Storyblok- Cloning the space and explaining how it works- Implementing Storyblok in the repo- Creating the Blok components- Creating the Shopify components- Implementing personalisation
Hard GraphQL Problems at Shopify
GraphQL Galaxy 2021GraphQL Galaxy 2021
164 min
Hard GraphQL Problems at Shopify
WorkshopFree
Rebecca Friedman
Jonathan Baker
Alex Ackerman
Théo Ben Hassen
 Greg MacWilliam
5 authors
At Shopify scale, we solve some pretty hard problems. In this workshop, five different speakers will outline some of the challenges we’ve faced, and how we’ve overcome them.

Table of contents:
1 - The infamous "N+1" problem: Jonathan Baker - Let's talk about what it is, why it is a problem, and how Shopify handles it at scale across several GraphQL APIs.
2 - Contextualizing GraphQL APIs: Alex Ackerman - How and why we decided to use directives. I’ll share what directives are, which directives are available out of the box, and how to create custom directives.
3 - Faster GraphQL queries for mobile clients: Theo Ben Hassen - As your mobile app grows, so will your GraphQL queries. In this talk, I will go over diverse strategies to make your queries faster and more effective.
4 - Building tomorrow’s product today: Greg MacWilliam - How Shopify adopts future features in today’s code.
5 - Managing large APIs effectively: Rebecca Friedman - We have thousands of developers at Shopify. Let’s take a look at how we’re ensuring the quality and consistency of our GraphQL APIs with so many contributors.
0 To Auth In An Hour For Your JavaScript App
JSNation 2023JSNation 2023
57 min
0 To Auth In An Hour For Your JavaScript App
WorkshopFree
Asaf Shen
Asaf Shen
Passwordless authentication may seem complex, but it is simple to add it to any app using the right tool.
We will enhance a full-stack JS application (Node.js backend + Vanilla JS frontend) to authenticate users with One Time Passwords (email) and OAuth, including:
- User authentication – Managing user interactions, returning session / refresh JWTs- Session management and validation – Storing the session securely for subsequent client requests, validating / refreshing sessions
At the end of the workshop, we will also touch on another approach to code authentication using frontend Descope Flows (drag-and-drop workflows), while keeping only session validation in the backend. With this, we will also show how easy it is to enable biometrics and other passwordless authentication methods.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

A Framework for Managing Technical Debt
TechLead Conference 2023TechLead Conference 2023
35 min
A Framework for Managing Technical Debt
Top Content
Today's Talk discusses the importance of managing technical debt through refactoring practices, prioritization, and planning. Successful refactoring requires establishing guidelines, maintaining an inventory, and implementing a process. Celebrating success and ensuring resilience are key to building a strong refactoring culture. Visibility, support, and transparent communication are crucial for addressing technical debt effectively. The team's responsibilities, operating style, and availability should be transparent to product managers.
Debugging JS
React Summit 2023React Summit 2023
24 min
Debugging JS
Top Content
Watch video: Debugging JS
Debugging JavaScript is a crucial skill that is often overlooked in the industry. It is important to understand the problem, reproduce the issue, and identify the root cause. Having a variety of debugging tools and techniques, such as console methods and graphical debuggers, is beneficial. Replay is a time-traveling debugger for JavaScript that allows users to record and inspect bugs. It works with Redux, plain React, and even minified code with the help of source maps.
Building a Voice-Enabled AI Assistant With Javascript
JSNation 2023JSNation 2023
21 min
Building a Voice-Enabled AI Assistant With Javascript
Top Content
This Talk discusses building a voice-activated AI assistant using web APIs and JavaScript. It covers using the Web Speech API for speech recognition and the speech synthesis API for text to speech. The speaker demonstrates how to communicate with the Open AI API and handle the response. The Talk also explores enabling speech recognition and addressing the user. The speaker concludes by mentioning the possibility of creating a product out of the project and using Tauri for native desktop-like experiences.
A Practical Guide for Migrating to Server Components
React Advanced 2023React Advanced 2023
28 min
A Practical Guide for Migrating to Server Components
Top Content
Watch video: A Practical Guide for Migrating to Server Components
React query version five is live and we'll be discussing the migration process to server components using Next.js and React Query. The process involves planning, preparing, and setting up server components, migrating pages, adding layouts, and moving components to the server. We'll also explore the benefits of server components such as reducing JavaScript shipping, enabling powerful caching, and leveraging the features of the app router. Additionally, we'll cover topics like handling authentication, rendering in server components, and the impact on server load and costs.
Power Fixing React Performance Woes
React Advanced 2023React Advanced 2023
22 min
Power Fixing React Performance Woes
Top Content
Watch video: Power Fixing React Performance Woes
This Talk discusses various strategies to improve React performance, including lazy loading iframes, analyzing and optimizing bundles, fixing barrel exports and tree shaking, removing dead code, and caching expensive computations. The speaker shares their experience in identifying and addressing performance issues in a real-world application. They also highlight the importance of regularly auditing webpack and bundle analyzers, using tools like Knip to find unused code, and contributing improvements to open source libraries.
Monolith to Micro-Frontends
React Advanced 2022React Advanced 2022
22 min
Monolith to Micro-Frontends
Top Content
Microfrontends are considered as a solution to the problems of exponential growth, code duplication, and unclear ownership in older applications. Transitioning from a monolith to microfrontends involves decoupling the system and exploring options like a modular monolith. Microfrontends enable independent deployments and runtime composition, but there is a discussion about the alternative of keeping an integrated application composed at runtime. Choosing a composition model and a router are crucial decisions in the technical plan. The Strangler pattern and the reverse Strangler pattern are used to gradually replace parts of the monolith with the new application.