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

apidock

v1.0.3

Published

Next-generation OpenAPI / Swagger documentation studio & interactive API testing playground with modern Scalar & macOS inspired aesthetics.

Readme

ApiDock


✨ Features

  • 📑 OpenAPI 3.0 & 3.1 Compatible: Instant parsing of raw JSON or YAML specifications with schema models, nested objects, and response samples.
  • 🎨 Scalar-Inspired 3-Column Studio: Left sidebar navigation, central interactive documentation, and right-side testing playground.
  • 🧪 Live API Testing Playground: Execute requests right from the browser. Supports query parameters, headers, authorization tokens, and JSON request bodies with live metrics (Status, Latency, Size).
  • 📐 Cursor-Resizable Panels: Drag-to-resize testing console so you can comfortably view deep nested payloads and raw response outputs.
  • 🍏 Styled Code Windows: Syntax highlighting, line numbers, and single-click copy buttons.
  • ⚡ Multi-Language Snippet Generator: Instantly generate production-ready code snippets in cURL, JavaScript (Fetch), Python (Requests), Dart / Flutter (http), and Go.
  • 🌓 Dark & Light Modes: Pre-built themes with smooth transitions designed for long documentation reading sessions.
  • 🪶 Zero Config Setup: Drop in a single <ApiDock /> component into any React, Next.js, or Vite application.

📦 Installation

Install apidock via your preferred package manager:

# npm
npm install apidock

# yarn
yarn add apidock

# pnpm
pnpm add apidock

# bun
bun add apidock

Peer Dependency Notice: Ensure your project has react and react-dom (v18 or v19) installed.


🚀 Quick Start

Import the <ApiDock /> component and its CSS stylesheet into your application:

import React from 'react';
import { ApiDock } from 'apidock';
import 'apidock/dist/style.css';

// Your OpenAPI 3.0 / 3.1 specification (JS Object, JSON string, or YAML string)
const spec = {
  openapi: '3.0.3',
  info: {
    title: 'Storefront REST API',
    version: '1.0.0',
    description: 'Interactive API reference and developer testing sandbox.'
  },
  paths: {
    '/api/v1/products': {
      get: {
        tags: ['Products'],
        summary: 'List products with pagination',
        parameters: [
          {
            name: 'limit',
            in: 'query',
            schema: { type: 'integer', default: 20 },
            description: 'Number of results to return'
          }
        ],
        responses: {
          '200': {
            description: 'Successful response',
            content: {
              'application/json': {
                schema: {
                  type: 'array',
                  items: {
                    type: 'object',
                    properties: {
                      id: { type: 'string' },
                      name: { type: 'string' },
                      price: { type: 'number' }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
};

export default function ApiReference() {
  return (
    <div style={{ width: '100vw', height: '100vh' }}>
      <ApiDock 
        spec={spec} 
        title="Storefront API" 
        defaultTheme="dark" 
      />
    </div>
  );
}

🛠️ Props Reference

| Prop | Type | Default | Description | | :--------------- | :----------------------- | :--------------------- | :----------------------------------------------------------- | | spec | OpenAPISpec \| string | Default Petstore | Raw OpenAPI 3.0/3.1 object, JSON string, or YAML string. | | title | string | spec.info.title | Custom header branding title. | | defaultTheme | 'dark' \| 'light' | 'dark' | Initial UI theme mode. | | environments | Environment[] | Pre-configured sandbox | Custom target environments (baseUrl, variables). | | initialAuth | AuthConfig | undefined | Pre-populate Bearer token, API Key, or Basic authentication. | | className | string | "" | Additional CSS class names for the root container. |


🌐 Next.js Integration (App Router & Pages Router)

Because apidock contains interactive DOM and playground handlers, mark the consuming component as a Client Component:

// app/docs/page.tsx
'use client';

import { ApiDock } from 'apidock';
import 'apidock/dist/style.css';

// Or import your spec directly from a JSON file
import openApiSpec from './spec.json';

export default function DocsPage() {
  return (
    <main className="w-screen h-screen">
      <ApiDock 
        spec={openApiSpec} 
        title="Acme Cloud API" 
        defaultTheme="dark" 
      />
    </main>
  );
}

🧰 Exported Types & Utilities

apidock ships full TypeScript definitions and parser utilities:

import { 
  ApiDock, 
  parseOpenAPISpec, 
  extractEndpoints,
  type OpenAPISpec,
  type ParsedEndpoint,
  type AuthConfig,
  type Environment
} from 'apidock';

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check out the issues page if you want to contribute.


📄 License

This project is licensed under the MIT License.