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

@web-reel/recorder

v0.1.4

Published

Lightweight session recording SDK based on rrweb

Readme

@web-reel/recorder

Lightweight session recording SDK based on rrweb

📦 Installation

npm install @web-reel/recorder

That's it! rrweb and idb will be automatically installed as dependencies.

🚀 Quick Start

Download Mode (Default)

import { WebReelRecorder } from '@web-reel/recorder';

const recorder = new WebReelRecorder({
  env: 'test',
  appId: 1,
  projectName: 'my-app',
  deviceId: 'user-123',
});

// Export session data as ZIP file (default, smaller size)
await recorder.exportLog();

// Or export as JSON
await recorder.exportLog(true, 'json');

Upload Mode (New!)

import { WebReelRecorder } from '@web-reel/recorder';

const recorder = new WebReelRecorder({
  env: 'test',
  appId: 1,
  projectName: 'my-app',
  deviceId: 'user-123',
  // Upload configuration
  uploadEndpoint: '/api/sessions',
  platform: 'web',
  jiraId: 'ISSUE-123',
});

// Upload session directly to server
await recorder.uploadLog();

When uploadEndpoint is configured, the floating button will automatically switch to upload mode with an upload icon.

Import Session Data

// Import session data from file
const fileInput = document.querySelector('input[type="file"]');
fileInput.addEventListener('change', async (e) => {
  const file = e.target.files[0];
  await recorder.importLog(file);
});

📖 Full Documentation

See docs/usage.md for complete documentation.

🔧 Features

  • ✅ DOM events recording via rrweb
  • ✅ Network request capture (fetch & XHR)
  • ✅ Console logs recording
  • ✅ IndexedDB storage
  • ZIP export (60-80% compression)
  • Direct upload to server API
  • Import/Export sessions
  • Automatic mode switching (download/upload)
  • ✅ JSON export (legacy support)
  • ✅ SSR compatible (Next.js, Nuxt, etc.)
  • ✅ TypeScript support
  • ✅ Webpack 5 compatible
  • ✅ Zero polyfills required

📝 Configuration Options

| Option | Type | Required | Description | | ------------------ | ------------------------ | -------- | ------------------------------------------------------- | | env | 'test' \| 'online' | Yes | Environment identifier | | appId | number | Yes | Application ID | | projectName | string | Yes | Unique project identifier | | deviceId | string | No | Device identifier | | disabledDownLoad | boolean | No | Hide the floating button (default: false) | | recordInterval | number | No | Log retention in days (default: 2) | | enableStats | boolean | No | Enable statistics upload (default: false) | | uploadEndpoint | string | No | API endpoint for upload (e.g. '/api/sessions') | | uploadHeaders | Record<string, string> | No | Custom headers for upload requests | | platform | string | No | Platform identifier for metadata (e.g. 'web', 'mobile') | | jiraId | string | No | Jira ticket ID for metadata |

🌐 Server API Integration

The recorder can upload sessions directly to your server. Your server should implement the following endpoint:

POST /api/sessions

Request format: multipart/form-data

| Field | Type | Required | Description | | ----------- | ------ | -------- | -------------------------------- | | file | File | Yes | ZIP file containing session data | | platform | String | No | Platform identifier | | device_id | String | No | Device identifier | | jira_id | String | No | Jira ticket ID |

Response format:

{
  "success": true,
  "session": {
    "id": 123,
    "created_at": "2024-01-15T10:30:00.000Z"
  }
}

See the main project documentation for complete API specification.

📄 License

MIT