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

ux-events-inspector

v1.0.5

Published

SDK to track UX/browser events like clicks, navigation, input, etc.

Readme

ux-events-inspector

npm version License: MIT

Real-time UX tracking SDK and WebSocket backend for developers, capture user actions in the browser and stream them to a live server. Lightweight, open-source, and perfect for debugging and UX insights.


🚀 What is ux-events-inspector?

ux-events-inspector is a plug-and-play JavaScript SDK and backend combo that helps developers track user interactions (like clicks, navigation, etc) in real time.

📦 Install from npm

You can install the SDK via npm:

npm install ux-events-inspector

Import and initialize it in your project like this:

import { initInspector } from 'ux-events-inspector';

initInspector({
  serverUrl: 'ws://localhost:3000', //websocket sever url
  userId: 'your-user-id',
  capture: ['click']
});

🎯 Project Goals

  • ✅ Capture real-time user events (clicks, navigation, etc.)
  • ✅ Stream those events to a backend via WebSocket
  • ✅ Enable live debugging and insight into real user behavior
  • 🚧 Visual session replay
  • 🚧 NPM package + CDN support (npm package published!)

🧩 Architecture

[ Browser (SDK) ]
     |
     | WebSocket
     v
[ Server (Node.js/ws) ]
     |
     | (future: DB / File storage)
     v
[ Viewer UI / Replay Tool]

📦 Tech Stack

  • SDK: TypeScript +WebScoket
  • A Simple Server: Node.js + WebSocket (ws)

✅ Features Implemented

  • [x] Capture click, navigation, scroll, input, resize, keydown, visibilitychange, mousemove, and network events in browser
  • [x] WebSocket connection to server
  • [x] Event batching and throttling
  • [x] Real-time event logging on server
  • [x] TypeScript build/watch with esbuild
  • [x] Published SDK as npm package (ux-events-inspector)

🛠️ Running

1. Start the WebSocket Server

First, start your WebSocket server to receive socket events: A simple example server: https://github.com/Shahidullah-Muffakir/uxlivetrace/blob/main/server.ts

2. Use the SDK Package in Your Project

Install the published SDK package

npm install ux-events-inspector

3. Import and Initialize the SDK

In your web app, import the SDK from the npm package and initialize it using your WebSocket server URL:

import { initInspector } from 'ux-events-inspector';

initInspector({
  serverUrl: 'ws://localhost:3000',  // Use your WebSocket server URL here
  userId: 'your-user-id',
  capture: ['click, navigation'] // add all the events you want to track
});

4. Dashboard for visual session replay

Your web page that includes the SDK will connect to the WebSocket server and stream real-time UX events.

Now, your dashboard or any viewer UI should subscribe to the same WebSocket server URL to receive the user interaction events live. This setup enables the dashboard to listen for and display incoming events from users as they happen A simple dashboard example:https://github.com/Shahidullah-Muffakir/uxlivetrace/blob/main/dashboard.html

🔍 Example Server Output

Client connected
Received event batch: [{ type: 'click', ... }]
[click] from test-user at (x, y)

🧠 Why This Project?

  • Developers need fast, plug-and-play tools to debug UX issues.
  • Existing tools are often bloated, expensive, or closed-source.
  • ux-events-inspector aims to give you full control and minimal friction.

📬 Contributing & Ideas

Have ideas? Want to build the visual replay tool, dashboard, or improve packaging/CDN support? PRs welcome — open an issue or submit a pull request!


📜 License

MIT — use it freely, improve it, fork it, share it.


🗣️ Elevator Pitch

A real-time, open-source UX inspector for devs. Capture user clicks, stream via WebSocket, and see what your users are doing — live.