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.4

Published

The high-performance binary backbone for real-time apps

Downloads

541

Readme

@painda/core

Binary Speed. Typed Power. Plugin Ecosystem.

The high-performance, protocol-first backbone for real-time applications. A modern, production-ready alternative to Socket.io — combining raw WebSocket speed with a zero-copy binary frame architecture.

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);
});

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