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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@thewanionly327/medusa-plugin-shopify

v0.0.1

Published

A starter for Medusa plugins.

Readme

Shopify Plugin for Medusa

This plugin uses the public product feeds from Shopify.

Get Started

To get started, install the project dependencies:

pnpm install

Then, publish the plugin locally:

npx medusa plugin:publish

In your Medusa application, add the Shopify plugin to your project:

npx medusa plugin:add medusa-plugin-shopify

Next, register the plugin in your Medusa application's medusa-config.ts:

module.exports = defineConfig({
  // ...
  plugins: [
    {
      resolve: 'medusa-plugin-shopify',
      options: {
        baseUrl: process.env.SHOPIFY_BASE_URL,
      },
    },
  ],
});

where SHOPIFY_BASE_URL should point to the website domain of the Shopify storefront, e.g.

SHOPIFY_BASE_URL=https://www.my-store.com

How it Works

This plugin exposes an API route (/store/migrate-shopify) to migrate Shopify products and collections from the provided base URL. The full flow is as follows:

  1. Migrate products from Shopify
    • Fetches 250 products at a time, paginated
    • Stops when the retrieved products in the request is less than 250 (assume it is on the last page)
    • Check if any of the Shopify products already exist in the Medusa database, if not then create
    • If product already exists in Medusa database, then update the product
  2. Migrate collections from Shopify
    • Fetches 250 collections at a time, paginated
    • Stops when the retrieved collections in the request is less than 250 (assume it is on the last page)
    • Check if any of the Shopify collections already exist in the Medusa database, if not then create
    • If collection already exists in Medusa database, then update the collection
  3. Link products to collections
    • Traverse through existing collections in the Medusa database
      • For each collection, retrieve list of products from Shopify
      • Retrieve the Medusa product equivalent to each Shopify product
      • Build the list of product IDs
      • Link the products to the collection using the IDs
    • Stops after 250 collections (hard limit)

How to use the API

Send a POST request to http://localhost:9000/auth/user/emailpass to get the authorization tokens, sample request body should be the admin credentials you use for your Medusa admin dashboard:

{
  "email": "[email protected]",
  "password": "1pass2word3"
}
curl --location 'http://localhost:9000/admin/auth/token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "[email protected]",
    "password": "1pass2word3"
}'

Send a GET request to http://localhost:9000/admin/migrate-shopify with headers:

Authorization: Bearer ${token}
X-Publishable-API-Key: ${apiKey}
curl --location 'http://localhost:9000/admin/migrate-shopify' \
--header 'X-Publishable-API-Key: YOUR_PUBLISHABLE_API_KEY' \
--header 'Authorization: Bearer YOUR_BEARER_TOKEN' \
--data ''

Development Mode

When in development, republish the plugin every time new changes are saved:

npx medusa plugin:develop