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

reqlytics

v1.0.4

Published

Express middleware to track API usage and performance metrics

Downloads

15

Readme

📊 Reqlytics – Real-Time API Analytics Middleware for API backend

Reqlytics is a plug-and-play API analytics middleware for backend API.
It automatically tracks incoming API requests and logs them to your personal Reqlytics dashboard in real-time — without changing your existing routes.


🚀 Features

  • ✅ Easy integration with Express
  • 📈 Tracks endpoint, method, response time & status
  • 🛠️ Works with both ESM and CommonJS
  • 🔐 Secured with your unique API Key
  • 📊 Visual analytics dashboard
  • ⚡ Lightweight & production ready

📦 Installation

Install via npm:

npm install reqlytics

📌 Basic Usage

1. Import the middleware

For ESM (e.g., index.js, server.js):

import { apiAnalytics } from "reqlytics";

For CommonJS (e.g., app.js, older Node.js versions):

const apiAnalytics = require("reqlytics");

2. Use it in your Express app

const express = require("express");
const app = express();

const apiAnalytics = require("reqlytics"); // or import { apiAnalytics } from "reqlytics"
const API_KEY = "your_api_key_here"; // Replace with your Reqlytics API key

// Add the middleware
app.use(apiAnalytics(API_KEY, { debug: true }));

// Define routes
app.get("/api/hello", (req, res) => {
  res.json({ message: "Hello from Reqlytics!" });
});

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

⚙️ Middleware Options

The apiAnalytics function accepts a second argument (optional config):

| Option | Type | Default | Description | |-------------|----------|------------------------------------------------------|--------------------------------------------| | endpoint | string | https://reqlytics-api.onrender.com/api/v1/track | Tracking API endpoint | | timeout | number | 2000 (ms) | Request timeout when sending analytics | | debug | boolean| false | Enable console logs for debugging |

Example:

app.use(apiAnalytics("your_api_key", {debug: true,}));

🔐 How to Get Your API Key

  1. Visit 👉 https://reqlytics-insight-dash.vercel.app
  2. Sign up for free
  3. After logging in, go to your dashboard
  4. Click "Show API Key" to copy your unique key
  5. Use this key in your backend as shown above

📊 Dashboard Preview

Once integrated, you'll be able to:

  • View requests by endpoint
  • Track error rates
  • Analyze daily usage trends
  • Monitor server/client error distribution
  • Get average response time stats

📌 Example Middleware Code (Under the Hood)

Here’s a look at how the middleware works internally:

const axios = require("axios");

const url = 'https://reqlytics-api.onrender.com';

function apiAnalytics(apiKey, options = {}) {
  const {
    endpoint = `${url}/api/v1/track`,
  ...
        if (debug) console.error("[Reqlytics] Error:", error.message);
      }
    });

    next();
  };
}

module.exports = apiAnalytics;

You don’t need to copy this — it’s already bundled in the package!


💬 Support

Need help or want to report an issue?
Reach out at: [email protected] or open an issue on GitHub.


📝 License

MIT License © 2025 – Reqlytics Team


Build with ❤️ for developers who care about insights.