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

@zachariaz/strapi-plugin-medusa-picker

v1.0.2

Published

Strapi plugin for selecting Medusa products, categories, and collections via a modal picker

Readme

@zachariaz/strapi-plugin-medusa-picker

A Strapi v5 custom field plugin for browsing and selecting products, categories, and collections from a Medusa eCommerce backend.

Features

  • Custom Field: Adds a "Medusa Picker" field type to Content-Type Builder (CUSTOM tab)
  • Modal Picker UI: Browse and search Medusa entities with grid/list views
  • Multi-select: Select multiple products, categories, or collections
  • Type Filtering: Switch between Products, Categories, and Collections
  • Search: Real-time search with debouncing
  • Pagination: Configurable page size (15, 30, 50 items)
  • Admin Settings: Configure Medusa API connection via Settings page

Requirements

  • Strapi v5
  • Node.js 18+
  • A running Medusa v2 backend with a Publishable API Key

Installation

npm install @zachariaz/strapi-plugin-medusa-picker

Configuration

Enable the plugin in config/plugins.ts:

export default () => ({
  'medusa-picker': {
    enabled: true,
  },
});

Rebuild and restart Strapi:

npm run build
npm run develop

Connect to Medusa

  1. Go to Settings → Medusa Picker in Strapi admin
  2. Enter your Medusa API URL — the base URL with no trailing slash (e.g., http://localhost:9000, not http://localhost:9000/)
  3. Enter your Publishable API Key — copy from Medusa Admin → Settings → Publishable API Keys (looks like pk_...)
  4. Click Save
  5. Click Test Connection to verify — a 200 response with {"success":true} means it's wired up

Environment Variables

These are read only when no settings have been saved yet and seed the initial values in Settings → Medusa Picker. After the first save in the admin UI, the stored values take precedence.

| Variable | Example | Maps to | |---|---|---| | MEDUSA_BACKEND_URL | http://localhost:9000 | Medusa API URL | | MEDUSA_PUBLISHABLE_API_KEY | pk_653b92fe94bafc6a174ae695... | Publishable API Key |

Example .env:

MEDUSA_BACKEND_URL=http://localhost:9000
MEDUSA_PUBLISHABLE_API_KEY=pk_653b92fe94bafc6a174ae695ecc192a63c4950498e33cc6af44c50ff67c3b562

Usage

Adding the Field

  1. Go to Content-Type Builder
  2. Select or create a content type
  3. Click Add another fieldCUSTOM tab
  4. Select Medusa Picker
  5. Configure field name and save

Using the Picker

  1. Edit a content entry
  2. Click Select from Medusa
  3. Browse/search entities, switch types, select items
  4. Click Select to confirm

Data Format

Selected items are stored as a JSON string:

[
  { "external_id": "prod_01H123ABC", "type": "product", "name": "Blue T-Shirt" },
  { "external_id": "pcol_01H456DEF", "type": "collection", "name": "Summer Sale" }
]

| Field | Description | |-------|-------------| | external_id | The entity's ID in the external commerce system (e.g. Medusa product ID) | | type | product, collection, or category | | name | Cached display name |

Storefront Usage

The storefront should use the stored external_id values to fetch full entity data directly from the commerce backend:

const references = await strapi.find('api::page.page', { populate: ['medusa_field'] });
const productIds = references
  .filter(r => r.type === 'product')
  .map(r => r.external_id);

const products = await medusa.products.list({ id: productIds });

Development

npm install
npm run build    # Build for production
npm run watch    # Watch mode for development
npm run verify   # Verify plugin structure

Local Development with Strapi

npm run watch:link
# In your Strapi project:
# yalc add @zachariaz/strapi-plugin-medusa-picker
# npm run develop

License

MIT