npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

strapi-plugin-shopify

v0.3.0

Published

Build a Shopify application with Strapi.

Downloads

8

Readme

Strapi Plugin Shopify

Build a Shopify application with Strapi.

Table Of Content

Requirements

Strapi v4 is required.

Installation

npm install --save strapi-plugin-shopify

Middlewares configuration

Webhooks are authenticated with HMAC calculated on the raw body, strapi::body middleware should be configured to pass the unparsed body as following:

{
  name: 'strapi::body',
  config: {
    includeUnparsed: true,
  },
},

If you want to serve an embedded app directly from Strapi you will find that default CSP policies will not allow to do that, strapi::security middleware should be configured as following (this configuration should be used only if you have problem with the embedded app iframe):

{
  name: 'strapi::security',
  config: {
    contentSecurityPolicy: {
      useDefaults: true,
      directives: {
        'frame-ancestors': null,
      },
    },
    frameguard: false,
  },
},

Shopify Configuration

The Shopify application should be configured as follow:

  • App URL should be set as https://your-domain.com/api/shopify
  • Allowed redirection URL(s) should have both
    • https://your-domain.com/api/shopify/install/callback
    • https://your-domain.com/api/shopify/auth/callback

Screenshot illustrating how to configure the Shopify application

Environment Variables

This plugin needs the following environment variables to work:

| Variable | Example | Description | | -------- | ------- | ----------- | | HOST_NAME | shop3.app | the host name of your app without the protocol (http or https) | | SHOPIFY_API_KEY | 553536bf79ee112525f63aaf25df59f8 | the API key generated by Shopify | | SHOPIFY_API_SECRET | 687b73300b570bdbe53220d84a18e23d | the API secret generated by Shopify | | SHOPIFY_SCOPES | read_locales,read_products | the API scopes used by the application | | SHOPIFY_APP_EMBEDDED | true | whether the app is an embedded app or not | | SHOPIFY_REDIRECT_URL | https://shop3.app/home | the url where the user is redirect after authentication |

Endpoints

This are the endpoints exposed by this plugin:

| Method | Path | Description | | ------ | ---- | ----------- | | GET | /api/shopify | the entry point of the application, it handles installation and authentication | | POST | /api/shopify/webhooks | the default webhooks endpoint called by Shopify | | GET | /api/shopify/install | the installation endpoint, should not be called directly, use /api/shopify instead | | GET | /api/shopify/install/callback | the installation callback endpoint, should be called only by Shopify | | GET | /api/shopify/auth | the authentication endpoint, should not be called directly, use /api/shopify instead | | GET | /api/shopify/auth/callback | the authentication callback endpoint, should be called only by Shopify | | POST | /api/shopify/auth/logout | the logout endpoint, should be called to delete the Shopify session | | GET | /api/shopify/shop | this endpoint should be called to get the authenticated shop data | | GET | /api/shopify/plans | this endpoint should be called to get available subscription plans | | GET | /api/shopify/subscription | this endpoint should be called to get the shop subscription | | POST | /api/shopify/subscription | this endpoint should be called to create a shop subscription |