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

puredocs

v1.0.6

Published

Beautiful API documentation portal from any OpenAPI 3.1 spec. One-liner for Express & Fastify. Standard Web Component for everything else.

Readme


Features

  • Full OpenAPI 3.1 — paths, callbacks, webhooks, all HTTP methods, $ref resolution, oneOf/anyOf/allOf
  • Express & Fastify — add a /docs route in one function call
  • Web Component — drop <pure-docs> into React, Vue, Angular, Next.js, Nuxt, Svelte, or plain HTML
  • Live Try It Console — send real requests, configure environments, switch auth
  • Smart Search — Cmd+K to find endpoints, schemas, webhooks instantly
  • Light & Dark Theme — auto-detects system preference or set manually
  • Full Auth Support — Bearer, Basic, API Key, OAuth2, OpenID Connect
  • Multi-Language Snippets — auto-generated cURL, JavaScript, Python, Go, Rust
  • JSON & YAML — load specs in either format
  • Markdown in Descriptions — use **bold**, *italic*, `code`, and [links](url) in OpenAPI descriptions; zero deps, XSS-safe
  • Zero Config — works out of the box with sensible defaults

Install

npm install puredocs

Quick Start

Express

import express from 'express';
import { pureDocs } from 'puredocs';

const app = express();

pureDocs.express(app, {
  route: '/docs',
  specUrl: '/openapi.json',
});

app.listen(3000);

Fastify

import Fastify from 'fastify';
import { pureDocs } from 'puredocs';

const app = Fastify();

pureDocs.fastify(app, {
  route: '/docs',
  specUrl: '/openapi.json',
});

await app.listen({ port: 3000 });

HTML

<pure-docs
  spec-url="/openapi.json"
  theme="auto"
></pure-docs>

<script type="module">
  import 'puredocs/web';
  import 'puredocs/style.css';
</script>

CDN (no bundler)

<link rel="stylesheet" href="https://unpkg.com/puredocs/dist/puredocs.css" />

<pure-docs spec-url="/openapi.json" theme="auto"></pure-docs>

<script src="https://unpkg.com/puredocs/dist/puredocs.umd.js"></script>

Raw HTML Generation

const html = pureDocs.html({
  specUrl: '/openapi.json',
  title: 'My API',
  theme: 'auto',
});
// Returns a full self-contained HTML string — serve it however you want

Configuration

Web Component Attributes

| Attribute | Type | Description | |-----------|------|-------------| | spec-url | string | OpenAPI spec URL (JSON or YAML) | | spec-json | string | Inline OpenAPI object as JSON string | | theme | 'light' \| 'dark' \| 'auto' | Color theme (default: auto) | | title | string | Portal title | | primary-color | string | Accent color (hex) |

Server API Options

| Option | Type | Description | |--------|------|-------------| | specUrl | string | OpenAPI spec URL | | spec | object | Inline OpenAPI object | | title | string | Portal title | | theme | 'light' \| 'dark' \| 'auto' | Color theme | | primaryColor | string | Accent color | | route | string | Route path (default: /docs) |


Works with Any Framework

PureDocs is a standard Web Component. It works in any framework that supports custom elements:

  • React / Next.jsimport 'puredocs/web' then use <pure-docs> in JSX
  • Vue / Nuxt — add isCustomElement config, then use <pure-docs> in templates
  • Angular — add CUSTOM_ELEMENTS_SCHEMA, then use <pure-docs> in templates
  • Svelte — use <pure-docs> directly
  • Plain HTML — just add the <script> and <link> tags

Development

bun run dev          # dev server with hot reload
bun run build        # production build
bun run typecheck    # type checking

License

See LICENSE.