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

@webloomlabs/product-features

v0.1.0

Published

Medusa v2 plugin to manage a global catalog of product features (title, subtitle, icon) and assign them, ordered, to products.

Readme

Product Features (Medusa v2 plugin)

Adds a reusable product features concept to Medusa — the icon + title + subtitle list often shown on a product page (e.g. "Breathable / No AC, no sweat", "Pockets / Freedom for your hands").

  • Admins manage a global catalog of features from Settings → Product Features. Each feature has a title (required), an optional subtitle, and an optional icon image (uploaded via Medusa's File Module).
  • On each product page, a Features widget lets admins pick features from the catalog and order them per product.
  • Storefronts read a product's ordered features through a public store API route.

Architecture

  • Module productFeatures (src/modules/product-features) — a single Feature data model (title, subtitle, icon).
  • Module link src/links/product-feature.ts — many-to-many product ↔ feature with a rank extra column holding the per-product order.
  • Workflows (src/workflows) — createFeature, updateFeature, deleteFeature, and setProductFeatures (replaces a product's feature links with a new, ordered set).
  • API routes (src/api) — admin CRUD + per-product assignment, and a public store read route.
  • Admin UI (src/admin) — a Settings page for the catalog and a product-detail widget for assignment/ordering.

Install into a Medusa app

  1. Build / publish the plugin locally (e.g. npx medusa plugin:publish + yalc, or npm run dev to watch).
  2. Add it to the app's medusa-config.ts:
    module.exports = defineConfig({
      plugins: ["product-features"],
    })
  3. In the app, run migrations to create the module table and the link table:
    npx medusa db:migrate

Generating migrations (plugin development)

Migration files ship inside the plugin. Regenerate them after changing the data model — this needs a running Postgres:

npx medusa plugin:db:generate   # generates migrations for all modules in the plugin

API

| Method & path | Auth | Description | | --- | --- | --- | | GET /admin/product-features | admin | List catalog features | | POST /admin/product-features | admin | Create a feature { title, subtitle?, icon? } | | GET /admin/product-features/:id | admin | Retrieve a feature | | POST /admin/product-features/:id | admin | Update a feature | | DELETE /admin/product-features/:id | admin | Delete a feature | | GET /admin/products/:id/features | admin | A product's features, ordered | | POST /admin/products/:id/features | admin | Set a product's features { feature_ids: [] } (array order = display order) | | GET /store/products/:id/features | publishable key | A product's features, ordered — { features: [{ id, title, subtitle, icon }] } |

Icons are uploaded through the built-in admin upload endpoint (sdk.admin.upload.create); the returned URL is stored on the feature.

Development

npm install
npm run dev     # medusa plugin:develop
npm run build   # medusa plugin:build