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

@katx-vn/katx-docskit

v1.0.0

Published

Reusable Next.js documentation and API explorer kit for KatX projects.

Readme

KatX DocsKit

Reusable Next.js documentation and API Explorer kit for KatX projects. Ships runtime components + a CLI to scaffold a docs app into any repo.

Quick Start

npx @katx-vn/katx-docskit init --target website --name "My Project"
cd website
npm install
npm run docs:dev

What You Get

  • Sidebar with docs topics + API endpoints
  • OpenAPI-driven API reference pages
  • Interactive API Explorer with cURL generation
  • Markdown/MDX guide pages with syntax highlighting and Mermaid diagrams
  • Changelog page
  • Full-text sidebar search
  • Tailwind v4 theme with shadcn-style tokens

Project Structure

After scaffolding, your docs app looks like:

website/
  katx-docs.config.ts   # Main configuration
  public/openapi.json   # Your OpenAPI spec
  src/app/              # Next.js pages (pre-wired)
  ../docs/              # Markdown docs (sibling directory)
    index.md            # Home page content
    getting-started.md  # Guide pages

Configuration

Edit katx-docs.config.ts:

import { defineKatxDocsConfig } from "@katx-vn/katx-docskit";

export default defineKatxDocsConfig({
  productName: "My API",
  description: "API documentation.",
  docsDir: "../docs",
  openapiPath: "public/openapi.json",
  environments: [
    { label: "Local", url: "http://localhost:8000" },
    { label: "Production", url: "https://api.example.com" },
  ],
  // Optional: WebSocket endpoint
  websocket: {
    path: "/ws/stream/{session_id}",
    summary: "Streaming conversation",
    parameters: [
      { name: "session_id", in: "path", required: true, schema: { type: "string" } },
    ],
  },
});

Config Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | productName | string | required | Product name in header and metadata | | description | string | "API and engineering documentation." | Meta description | | logo | string | "/images/logo.svg" | Logo image path | | favicon | string | "/images/favicon.svg" | Favicon path | | docsDir | string | "../docs" | Path to markdown docs directory | | openapiPath | string | "public/openapi.json" | Path to OpenAPI spec | | environments | array | Local only | API environments for Explorer | | nav | array | Docs, Explorer, Changelog | Top navigation items | | feedbackEmail | string | - | Shows feedback link in sidebar | | websocket | object | - | Opt-in WebSocket endpoint in API docs |

CLI

katx-docskit init [options]

Options:
  --target <dir>   Target directory (default: "website")
  --name <name>    Project name for config and package.json
  --force          Overwrite if target exists
  --version, -v    Show version
  --help, -h       Show help

Writing Docs

Place .md or .mdx files in your docsDir (default: ../docs/):

---
sidebar_label: Getting Started
sidebar_position: 2
---

# Getting Started

Your content here. Supports **GFM**, code blocks, and Mermaid diagrams.

docs/index.md is required and serves as the home page content.

Components

Import components directly for custom pages:

import { AppShell, MarkdownContent, ApiExplorer } from "@katx-vn/katx-docskit";
import "@katx-vn/katx-docskit/styles.css";

Requirements

  • Next.js >= 16
  • React >= 19
  • Tailwind CSS v4

License

MIT