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

@nghitrum/dsforge

v0.2.0

Published

AI-native design system generator — tokens → components → docs → npm

Readme

dsforge

CI

Your design tokens live in Figma. Your components drift from the spec. Your docs are six sprints out of date. dsforge fixes all three with one config file.

Before / After

Before

  • Design tokens transcribed by hand into CSS variables across three repos
  • Component variants documented in a Notion page that nobody updates
  • AI coding tools guessing at constraints because there is no machine-readable spec

After

design-system.config.json  →  dsforge generate
dist-ds/
├── src/           9 typed React components
├── tokens/        CSS custom properties, JS map, Tailwind extension
├── metadata/      AI-readable JSON contracts per component
└── showcase.html  visual docs — open directly in the browser, no server

One config. One command. Everything consistent, everything regeneratable.


Quick start

npx dsforge@latest init      # scaffold config + rules
npx dsforge@latest generate  # generate the full design system
npx dsforge@latest showcase  # open the visual docs in your browser

Output lands in dist-ds/. Regenerate it any time by running generate again.


Config

design-system.config.json is the single source of truth. A minimal example:

{
  "meta": { "name": "Acme DS", "version": "1.0.0" },
  "tokens": {
    "global": {
      "brand-600": "#2563eb",
      "neutral-900": "#0f172a",
      "neutral-0": "#ffffff"
    },
    "semantic": {
      "color-action": "{global.brand-600}",
      "color-text-primary": "{global.neutral-900}",
      "color-bg-default": "{global.neutral-0}"
    }
  },
  "typography": {
    "fontFamily": "Inter, system-ui, sans-serif",
    "roles": {
      "body": { "size": 16, "weight": 400, "lineHeight": 1.6 },
      "heading": { "size": 24, "weight": 700, "lineHeight": 1.2 }
    }
  },
  "themes": {
    "light": {},
    "dark": { "color-bg-default": "#0f172a", "color-text-primary": "#f1f5f9" }
  }
}

Tokens use a three-tier system: global → semantic → component. References use {layer.key} syntax and are resolved at generate time.


What you get

9 React components

Button · Input · Card · Badge · Checkbox · Radio · Select · Spinner · Toast

Each component is typed, themed with your actual tokens, and ships with a prop table, copyable TSX examples, WCAG accessibility notes, and an AI metadata contract.

CSS tokens

base.css — global and semantic CSS custom properties light.css / dark.css — theme overrides tokens.js — JS token map for runtime use tailwind.js — Tailwind theme extension, ready to drop into tailwind.config.js

AI metadata contracts

Each component emits dist-ds/metadata/<component>.json:

{
  "component": "Button",
  "role": "action-trigger",
  "variants": ["primary", "secondary", "danger", "ghost"],
  "destructiveVariants": ["danger"],
  "accessibilityContract": {
    "keyboard": true,
    "focusRing": "required",
    "ariaLabel": "required-for-icon-only"
  },
  "aiGuidance": [
    "Use primary for the single most important action on a surface.",
    "Never place two primary buttons side by side.",
    "Use danger only for irreversible destructive actions."
  ]
}

AI coding assistants can read these before generating UI — no more inferring constraints from source code.

Visual showcase

showcase.html is a self-contained documentation site. No build step, no server — open it directly in the browser.

Includes live component previews with all variants and states, themed with your actual tokens. Theme switching (light/dark) is built in when both themes are defined in config.

npm-ready package

dist-ds/ includes package.json, tsconfig.json, and a barrel index.ts. Run npm publish from dist-ds/ to ship the design system as a package.


Validation

dsforge validate runs nine health checks and produces a scored report:

| Check | Max score | | ------------------ | --------- | | Token architecture | 15 | | Typography | 10 | | Spacing | 10 | | Radius | 5 | | Elevation | 5 | | Motion | 5 | | Themes | 10 | | Token resolution | 14 | | Governance rules | 15 |

Scores below 70 are flagged as warnings. WCAG contrast is checked automatically for all color token pairs.

design-system.rules.json encodes your governance constraints:

{
  "governance": {
    "requireSemanticTokens": true,
    "forbidHardcodedColors": true,
    "requireAccessibilityProps": true
  }
}

Diff

dsforge diff old.config.json new.config.json classifies every change:

  • BREAKING — tokens removed or renamed that are referenced by components
  • CHANGED — existing values modified
  • ADDED — new tokens or sections

Run this before deploying a config update to understand downstream impact.


Commands

| Command | What it does | | ------------------ | -------------------------------------------------------------------- | | dsforge init | Scaffold design-system.config.json and design-system.rules.json | | dsforge generate | Run the full pipeline — tokens, components, metadata, docs, showcase | | dsforge validate | Run 9 health checks and score against governance rules | | dsforge diff | Compare two configs — BREAKING / CHANGED / ADDED | | dsforge showcase | Open dist-ds/showcase.html in your default browser |

Run dsforge with no arguments for an interactive menu.


Coming next

  • Additional components: Modal, Table, Tooltip, DatePicker
  • Figma Variables API sync
  • CI integration — fail builds on governance violations

Development

git clone https://github.com/your-org/dsforge
cd dsforge
npm install

npm run dev       # run the CLI without a build step
npm run typecheck # type-check without emitting
npm test          # run the test suite

License

MIT