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

@savchukoleksii/plugin-storage-shopify-files

v1.0.0

Published

Payload CMS storage adapter for Shopify Files

Readme

Shopify Storage Adapter for Payload CMS

A Payload CMS storage adapter that stores uploaded files in Shopify Files using the Shopify Admin GraphQL API.

Installation

pnpm add @savchukoleksii/plugin-storage-shopify-files
# or
npm install @savchukoleksii/plugin-storage-shopify-files
# or
yarn add @savchukoleksii/plugin-storage-shopify-files

Requirements

  • Payload CMS ^3.37.0
  • A Shopify store with a custom app that has the following Admin API access scopes:
    • read_files
    • write_files

Usage

import { buildConfig } from 'payload'
import { shopifyStorage } from '@savchukoleksii/plugin-storage-shopify-files'

export default buildConfig({
  // ... your config
  plugins: [
    shopifyStorage({
      collections: {
        media: true,
      },
      options: {
        accessToken: process.env.SHOPIFY_ACCESS_TOKEN,
        shop: 'my-store.myshopify.com',
      },
    }),
  ],
})

Configuration

Plugin Options

| Option | Type | Required | Description | | --- | --- | --- | --- | | collections | Record<string, true \| CollectionOptions> | Yes | Upload collections to store in Shopify Files. | | options | object | Yes | Shopify Admin API connection options. | | enabled | boolean | No | Enable or disable the plugin. Defaults to true. |

options

| Option | Type | Required | Description | | --- | --- | --- | --- | | shop | string | Yes | Your Shopify store domain (e.g. my-store.myshopify.com). | | accessToken | string | Yes | Your Shopify Admin API access token. | | apiVersion | string | No | Shopify Admin API version. Defaults to 2026-01. |

Collection Options

Pass true to use defaults, or an object with additional options from @payloadcms/plugin-cloud-storage:

shopifyStorage({
  collections: {
    // Simple — use defaults
    media: true,
    // Advanced — with prefix and custom file URL generation
    documents: {
      prefix: 'docs',
      generateFileURL: ({ filename, prefix }) => {
        return `https://cdn.example.com/${prefix}/${filename}`
      },
    },
  },
  options: {
    accessToken: process.env.SHOPIFY_ACCESS_TOKEN,
    shop: 'my-store.myshopify.com',
  },
})

How It Works

This adapter uses the Shopify Admin GraphQL API to manage files through a three-step upload flow:

  1. Staged Upload — Requests a temporary upload URL via the stagedUploadsCreate mutation.
  2. File Upload — Uploads the file binary to the staged URL.
  3. File Create — Registers the uploaded file in Shopify via the fileCreate mutation.

File deletion uses the fileDelete mutation. File retrieval queries the files endpoint by filename and proxies the Shopify CDN response.

Local storage is automatically disabled for collections managed by this adapter.

Development

# Install dependencies
pnpm install

# Create .env with your Shopify credentials
cp .env.example .env

# Start the dev server
pnpm dev

# Run tests
pnpm test

# Lint
pnpm lint

# Build
pnpm build

Environment Variables

| Variable | Description | | --- | --- | | SHOPIFY_ACCESS_TOKEN | Shopify Admin API access token | | SHOPIFY_SHOP | Shopify store domain | | PAYLOAD_SECRET | Payload secret key | | DATABASE_URL | Database connection URL (defaults to local SQLite) |

License

MIT