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

@painda/core

v0.1.8

Published

The high-performance binary backbone for real-time apps

Readme

🐼 @painda/core

The high-performance, protocol-first backbone for real-time applications.

@painda/core is a modern, production-ready alternative to Socket.io. It eliminated the "JSON-tax" of real-time apps by using a zero-copy binary frame architecture, providing up to 10x higher throughput and 70% lower overhead.

⚡ Highlights

  • Zero-Copy Performance: Native DataView encoding on the wire.
  • Protocol-First: Built around binary schemas and typed messages.
  • Virtual Clients: Headless, in-memory client injection for bots/testing (0ms latency).
  • Horizontal Scaling: Native Pub/Sub adapter support (Redis/Postgres) for multi-node deployments.
  • Plugin System: Robust lifecycle hooks for easy extensibility.
  • Standard Features: Presence, Namespaces, Middleware, and Connection Recovery included.

Installation

npm install @painda/core

Quick Start

Server

import { PPServer } from '@painda/core';

const server = new PPServer({
  port: 3000,
  recovery: true,
  presence: { syncInterval: 1000 },
});

server.on('connection', (client) => {
  client.on('message', (msg) => {
    console.log('Received:', msg);
    client.emit('hello', 'World');
  });
});

Client

import { PPClient } from '@painda/core';

const client = new PPClient({ url: 'ws://localhost:3000' });

client.once('open', () => {
  client.emit('greet', 'Hello');
});

client.on('message', (msg) => {
  console.log('Server says:', msg.payload);
});

Virtual Clients (Headless Bots)

Inject a headless client directly into the server pipeline for testing or in-process bots with zero network latency.

import { PPServer, PPVirtualClient } from '@painda/core';

const server = new PPServer({ port: 3000 });
const bot = new PPVirtualClient();

// Inject directly into server logic
server.inject(bot);

bot.on('message', (msg) => {
  console.log('Bot received:', msg.payload);
});

bot.emit('bot:ready', { data: '...' });

Features

| Feature | Description | |---------|-------------| | 🔩 Zero-Copy Binary Framing | Native DataView — no JSON overhead | | 📡 Namespaces | server.of("/admin") — multiplex on one socket | | ⚡ Middleware | server.use() — auth, validation, logging chains | | 🤝 Acknowledgements | Request-response with configurable timeouts | | 🔄 Connection Recovery | Missed messages replayed + rooms restored | | 📈 Horizontal Scaling | PPAdapter interface for Redis/Postgres | | 🧩 Plugin System | server.register(plugin) — lifecycle hooks | | 🏠 Typed Rooms | Delta-synced rooms at 60 FPS | | 👥 Presence | Built-in who's-online tracking | | 🏷️ Connection Tags | broadcastToTag("role", "admin") | | 🛡️ Security | Origin whitelist, IP rate-limiting, max payload | | 📊 Live Metrics | server.getStats() — clients, rooms, uptime |

Security Options

const server = new PPServer({
  port: 3000,
  maxPayload: 1_048_576,           // 1 MB (default)
  maxDecompressedSize: 10_485_760, // 10 MB (default)
  allowedOrigins: ['https://myapp.com'],
  maxConnectionsPerIp: 50,
  recoverySecret: 'my-hmac-secret',
});

Ecosystem

| Package | Description | |---------|-------------| | @painda/gaming | Delta Engine — binary state sync | | @painda/chat | Rooms & direct messaging | | @painda/video | WebRTC signaling | | @painda/auth | Token-based auth middleware | | @painda/persistence | Auto-persist to your DB | | @painda/testing | Test utilities |

API overview

  • Frame: encodeFrame, decodeFrame (V2 header, optional compression & schema).
  • Server: PPServer, server.of("/ns") (namespaces), server.room(id, state, options) (typed rooms), server.presence, middleware, rate limit, recovery, adapter, plugins.
  • Client: PPClient, client.emit(type, payload), client.on("message"|"roomState"|"roomDelta"|"presence"|...), reconnect & ack options.
  • Schema: PPSchemaRegistry, register(type, { id, encode, decode }), built-in serializers.

For a full public-API list and DX notes, see docs/CORE_API_ANALYSIS.md in the repo.

Links

License

MIT License — free for private projects, open-source, and community use.

  • Enterprise (Paid): Commercial projects above a certain company size or revenue threshold require a commercial license. Inquiries via pp.painda.tools/enterprise.
  • Pro Plugins: Premium modules (Dashboard, Redis Adapter, Enterprise Support) available at pp.painda.tools/plugins.