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

@flink-app/api-docs-plugin

v0.12.1-alpha.45

Published

Flink plugin that generates API documentation based on JSON schemas

Readme

Flink API Docs Plugin

A FLINK plugin that automatically generates beautiful API documentation based on your app's registered routes and schemas. This plugin provides a modern, Swagger-like interface for exploring and understanding your API endpoints.

Features

  • 🚀 Automatic API documentation generation
  • 🔍 Detailed request/response schema documentation

Installation

Install the plugin to your Flink app project:

npm i -S @flink-app/api-docs-plugin

Usage

Add and configure the plugin in your app startup (typically in your root index.ts):

import { apiDocPlugin } from "@flink-app/api-docs-plugin";

function start() {
    new FlinkApp<AppContext>({
        name: "My app",
        plugins: [
            // Register plugin with custom options
            apiDocPlugin({
                title: "API Docs: My app",
                path: "/docs", // Optional: defaults to "/docs"
                apiPath: "/docs/api", // Optional: defaults to "/docs/api"
            }),
        ],
    }).start();
}

Configuration Options

The plugin accepts the following configuration options:

| Option | Type | Default | Description | | ------------- | ------- | ----------- | ---------------------------------------------- | | path | string | /docs | The URL path where the documentation is served | | apiPath | string | /docs/api | The URL path where the API data is served | | name | string | - | Custom name for the plugin instance | | title | string | API Docs | The title displayed in the documentation UI |

How It Works

The plugin automatically:

  1. Sets up a static file server at the specified path (defaults to /docs)
  2. Creates an API endpoint at /docs/api that exposes route information
  3. Serves a React application that fetches and displays your API documentation
  4. Groups endpoints by resource for better organization
  5. Displays detailed request/response schemas with proper TypeScript types

Development

For local development of the API documentation UI:

  1. Start the mock API server:

    npm run dev:mock-api
  2. In another terminal, start the React development server:

    npm run dev:react
  3. Open http://localhost:5173 in your browser

The development setup includes hot-reloading for the React application, allowing you to see changes instantly as you modify the UI components.

Architecture

The plugin consists of two main parts:

  1. Express Plugin: Integrates with your Flink application to serve the documentation
  2. React Application: Modern UI that displays the API documentation

The React app uses:

  • Tailwind CSS for styling
  • TypeScript for type safety
  • Vite for fast development and building

Requirements

  • Node.js v20.17.0 or higher (as specified in root .nvmrc)
  • A Flink application with Express initialized

UI Features

  • Method Badges: Color-coded HTTP method indicators (GET, POST, PUT, DELETE, etc.)
  • Expandable Sections: Click on endpoints to view detailed information
  • Schema Tables: Well-formatted tables showing request/response properties
  • Type Information: Clear display of property types and requirements
  • Description Support: Built-in support for endpoint and property descriptions
  • Mock Endpoint Indicators: Visual indicators for mocked endpoints
  • Responsive Design: Works seamlessly on desktop and mobile devices
  • TypeScript Interface Generation: Copy TypeScript interfaces for request/response bodies

Building

To build the complete plugin:

npm run prepare

This will:

  1. Build the React application
  2. Compile TypeScript files
  3. Copy all necessary assets to the dist directory

The built plugin can then be published to npm and used in any Flink application.