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

keeperhub-pricing-ui

v0.1.2

Published

Shared KeeperHub pricing cards and comparison table. Single source of truth for the app and the marketing landing.

Readme

keeperhub-pricing-ui

Shared pricing cards and comparison table for the KeeperHub app and the marketing landing. One source of truth for both the look and the pricing data.

  • Components ship as a versioned React package (SSR-safe, bundled at build time).
  • Data lives in pricing-data.json and is published to a static URL, so both apps fetch it at runtime and a data change reflects on both with no app redeploy.

What it exports

import {
  PricingCards,
  PricingComparisonTable,
  defaultPricingData,
  defaultPricingCards,
  defaultComparisonColumns,
  defaultComparisonRows,
} from "keeperhub-pricing-ui";
import "keeperhub-pricing-ui/styles.css"; // import once, near your root

Both components are controlled and presentational: they render from data props and delegate every interaction to handlers you pass in. Pass nothing and they render the bundled defaults.

Usage

Zero-config (uses the bundled defaults, good for a quick render or offline fallback):

<PricingCards />
<PricingComparisonTable />

Landing (link CTAs, data fetched at runtime so edits need no redeploy):

// server component: fetch with ISR
const data = await fetch(PRICING_DATA_URL, { next: { revalidate: 300 } })
  .then((r) => r.json())
  .catch(() => defaultPricingData); // fall back to the bundled copy

<PricingCards cards={data.cards} />
<PricingComparisonTable columns={data.comparison.columns} rows={data.comparison.rows} />

App (override the free card with the live PAYG price, wire CTAs to checkout, highlight the current plan):

const cards = data.cards.map((c) =>
  c.id === "free" ? { ...c, fixedPrice: `$${livePaygPrice}` } : c
);

<PricingCards
  cards={cards.map((c) => ({
    ...c,
    cta: { ...c.cta, href: undefined, onClick: (ctx) => startCheckout(ctx) },
  }))}
  onTierChange={(cardId, tierKey) => trackTier(cardId, tierKey)}
/>
<PricingComparisonTable currentColumnKey={currentPlan} />

Data model

pricing-data.json holds cards and comparison. See src/types.ts for the full shapes. Cards support either a fixedPrice (free / enterprise) or tiers (the card renders a selector and derives price + metrics from the selected tier and the billing interval). CTAs are serializable in the JSON (label + href); consumers attach onClick at render time.

How updates propagate

| Change | What to do | Redeploy apps? | | --- | --- | --- | | Prices, tiers, rows, copy | edit pricing-data.json, push to main | No. Pages republishes the JSON; both apps pick it up within the ISR window. | | Component layout / styling / behavior | change src/**, bump version, publish | Yes. Bump the dependency in each app and redeploy. |

Publishing (manual steps)

The package publishes to GitHub Packages; the data publishes to GitHub Pages. Both run in CI, but the repo and Pages have to be set up once:

  1. Create the KeeperHub/pricing-ui repo and push this folder to main.
  2. In the repo settings, enable Pages with source "GitHub Actions". The deploy-data.yml workflow then serves pricing-data.json at https://keeperhub.github.io/pricing-ui/pricing-data.json.
  3. Add an NPM_TOKEN secret to this repo (an npm automation token for the account or org that owns the package name).
  4. To publish a version: bump version in package.json, tag it (git tag v0.1.0 && git push --tags). The publish-package.yml workflow builds and publishes to the public npm registry.
  5. Consumer repos (app, landing) install it like any public npm package (pnpm add keeperhub-pricing-ui). No auth token, no .npmrc, and it installs unchanged inside Docker builds and CI.

Local development

npm install
npm run build      # tsup -> dist (esm + cjs + d.ts)
npm run typecheck