Shopify Node App Starter
This is a starter template for embedded shopify apps based on the shopify cli node app.
Contributions to create the perfect shopify app boilerplate are very welcome!
Changes to the default Shopify node app starter
- Updated dependencies (@apollo/client instead of react-apollo, react 17, next.js 12, polaris 7)
- MongoDB session storage already set up (full credit goes to Harshdeep Singh Hura)
- Ready to use online and offline accesstokens simultaneously
- App context set up. Can be used to store data, that only needs to be fetched once, but is needed in multiple places
- Link component to convert
<a>tags to Next Links for relative paths
- Routepropagation set up
- Example API with
verifyRequest()is set up
- Webhook registration and persistance after server restart
- Examples for creating, displaying and canceling of app subscriptions
- Loading screen while the app context is loading
- GDPR webhooks
- Fork and clone repo
- Create an app in the shopify partner dashboard
shopify app connectto connect the app to shopify
npm installto install dependencies
.envfile (.env example is in the root directory)
shopify app serveto start dev enviroment
- If you don’t have one, create a Shopify partner account.
- If you don’t have one, create a Development store where you can install and test your app.
- In the Partner dashboard, create a new app. You’ll need this app’s API credentials during the setup process.
Same usage as apps created with the Shopify CLI
API routes have to start with
/api/. All relative paths starting with
/api/ will be converted to absolute paths by a next.js rewrite
This respository is available as open source under the terms of the MIT License.