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

api-visualizer

v2.0.7

Published

A tunnel-based API inspector for visualizing requests and responses in real time.

Readme

api-visualizer

NPM Version License Node Version JavaScript TypeScript Dashboard Made With ❤️

api-visualizer is a lightweight middleware that captures live API traffic from your local JavaScript or TypeScript server and streams it to a real-time WebSocket-based dashboard for inspection, debugging, and monitoring.

🔗 Live Dashboard: API Visualizer App


📚 Table of Contents


Installation

Install the middleware using npm:

npm install api-visualizer

Usage (Express Example)

  1. Register at the dashboard:
    👉 api-visualizer.vercel.app

  2. Generate an API Key after logging in.

  3. Add the middleware to your Express server:

import express from "express";

//-------- IMPORT API COMPONENTS --------
import { connectToTunnel, tunnelMiddleware } from "api-visualizer";

// ------- CONNECT TO THE TUNNEL WITH YOUR API KEY ---------
(async () => {
  try {
    connectToTunnel("YOUR_API_KEY"); // 🔑 REPLACE WITH YOU API KEY -------
  } catch (err) {
    console.error("[Tunnel] Failed to connect:", err);
  }
})();

const app = express();

// -------- ATTACH THE MIDDLEWARE -------
app.use(tunnelMiddleware);

app.use(express.json());
app.use(express.urlencoded({ extended: true }));

app.post("/api", (req, res) => {
  res.json({ message: "Received", body: req.body });
});

app.listen(3000, () => {
  console.log("Server running at http://localhost:3000");
});

Real-Time Dashboard

Visualize API traffic from your local server in real time:
👉 API Visualizer App


Captured Data Format

Sample structure of the captured API request and response data:

{
  "method": "PATCH",
  "fullUrl": "http://localhost:3000/?key=value%2312",
  "route": "/",
  "queryParams": { "key": "value#12" },
  "duration": 7,
  "timestamp": 1751218377927,
  "size": { "request": 53, "response": 100, "total": 153 },
  "status": 200,
  "request": {
    "headers": {
      "authorization": "Basic a3JpOnNobmE=",
      "content-type": "application/javascript"
    },
    "body": "const a = 4, b = 3;\nconst c = a + b;\nconsole.log(c); ",
    "contentType": "javascript"
  },
  "response": {
    "statusCode": 200,
    "body": {
      "message": "Test PATCH successful",
      "data": "const a = 4, b = 3;\nconst c = a + b;\nconsole.log(c); "
    },
    "contentType": "json"
  },
  "authorization": {
    "hasAuthHeader": true,
    "authType": "basic",
    "parsed": { "username": "kri", "password": "shna" },
  },
  "meta": {
    "ip": "127.0.0.1",
    "protocol": "http",
    "httpVersion": "1.1",
    "deviceType": "desktop"
  }
}

Use Cases

  • Inspect and debug API requests/responses live
  • Monitor local backend traffic during development

License

MIT © 2025 Krishna Singha


Author

Krishna Singha ([email protected])