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

apideck-express

v1.0.1

Published

Lightweight, beautiful, zero-config API playground and explorer for Express.js APIs

Downloads

140

Readme

apideck-express

Lightweight, beautiful, zero-config API playground and explorer for Express.js APIs.

ApiDeck automatically inspects your Express routing stack to generate a beautiful UI allowing you to browse, test, and document your API without writing manual OpenAPI YAML files.

Features

  • Zero Config: Just plug the middleware into your Express app and you're done.
  • Dynamic Schema Reflection: Attach classes or schemas to your route handlers, and ApiDeck will automatically infer the structure and generate mock JSON examples.
  • Modern UI: Sleek, fully responsive, dark-mode ready interface.
  • Automatic Grouping: Endpoints are automatically grouped by root path (e.g., /api/users).

Installation

npm install apideck-express

Quick Start

Register the middleware by passing your Express app instance:

const express = require('express');
const apideck = require('apideck-express');

const app = express();
app.use(express.json());

// ... define your routes ...
app.get('/api/users', (req, res) => {
    res.json([{ id: 1, name: 'John Doe' }]);
});

// Enable ApiDeck
app.use('/apideck', apideck({
    app: app, // Pass your express instance!
    title: 'My Express API',
    version: '1.0.0',
    description: 'Explore my Node.js Express API dynamically'
}));

app.listen(3000, () => {
    console.log('Server is running on http://localhost:3000');
    console.log('Explore your API at http://localhost:3000/apideck');
});

Now open http://localhost:3000/apideck in your browser!

Advanced: Dynamic Schema Reflection (Auto-Example Generation)

Unlike strongly typed languages, standard Node.js routing doesn't provide types for request/response bodies natively. However, ApiDeck includes a powerful introspection engine.

To have ApiDeck auto-generate Example JSON payloads and schema properties in the UI, you can simply attach a Class or Object to the .schema (or .model, .DTO) property of your route handler!

Using a Class (DTO)

If you define a class with default properties, ApiDeck will instantiate it and extract the types automatically:

// Define a DTO class with default values so ApiDeck can read the types
class CreateUserDTO {
    constructor() {
        this.name = "John Doe";
        this.email = "[email protected]";
        this.isActive = true;
        this.age = 30;
    }
}

// Your route handler
const createUser = (req, res) => {
    res.status(201).json({ success: true });
};

// Attach the class to the handler!
createUser.schema = CreateUserDTO; 

app.post('/api/users', createUser);

Using a Raw Object

Alternatively, you can just pass a raw object describing the OpenAPI properties directly:

const updateUser = (req, res) => res.json({ success: true });

updateUser.schema = {
    properties: {
        role: { type: 'string' },
        permissions: { type: 'array' }
    },
    example: {
        role: "admin",
        permissions: ["read", "write"]
    }
};

app.patch('/api/users/:id', updateUser);

When you open the ApiDeck UI, the POST/PUT/PATCH routes will now automatically display interactive JSON examples!