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

@telestack/db-sdk

v1.1.2

Published

Fluent, real-time SDK for Telestack DB

Readme

🚀 Telestack DB SDK

Telestack DB is a production-ready, high-performance real-time database system built on Cloudflare Workers, D1, and Centrifugo. It provides a Firebase-compatible developer experience with significantly lower latency and cost.

✨ Key Features

  • 🏎️ Extreme Performance: 15ms average latency (2.8x faster than Firebase).
  • 🔄 Real-time Sync: Instant WebSocket-based broadcasts via Centrifugo.
  • 🔐 Security Rules: Built-in logic-based path guards (auth-aware).
  • 💾 Offline Persistence: Automatic IndexedDB caching and write queuing.
  • 📦 Atomic Batches: Commit multiple writes as a single transaction.
  • ⚛️ Optimistic Concurrency Control (OCC): Robust transaction retries for high-contention data.
  • 👥 Presence API: Track online status and room membership out of the box.
  • 💰 90% Cheaper: No egress fees and significantly lower storage costs.

📦 Installation

npm install @telestack/db-sdk

🚀 Quick Start

import { TelestackClient } from '@telestack/db-sdk';

// Initialize with production defaults
const db = new TelestackClient({
  userId: 'user-123',
  workspaceId: 'my-project'
});

// Write data
await db.collection('posts').doc('intro').set({
  title: 'Hello Telestack!',
  content: 'The edge is fast.'
});

// Listen for real-time updates
db.collection('posts').onSnapshot((docs) => {
  console.log('Received posts:', docs);
});

// Transactions with OCC
await db.runTransaction(async (transaction) => {
  const doc = await transaction.get(db.doc('stats/global'));
  const newCount = (doc?.count || 0) + 1;
  transaction.update(db.doc('stats/global'), { count: newCount });
});

📊 Benchmarks (Real World)

| Operation | Telestack | Firebase | Advantage | |-----------|-----------|----------|-----------| | Read | 9ms | 25ms | 2.8x Faster | | Write | 22ms | 45ms | 2.0x Faster | | Query | 9ms | 40ms | 4.4x Faster |

🛠️ Configuration

const client = new TelestackClient({
  endpoint: 'https://telestack-realtime-db.codeforgebyaravinth.workers.dev', // Defaults to prod
  centrifugoUrl: 'wss://telestack-centrifugo.onrender.com/connection/websocket', // Defaults to prod
  userId: 'current-user-id',
  workspaceId: 'your-workspace',
  enablePersistence: true // Enable IndexedDB support
});

👥 Presence API

const col = db.collection('chat-room');

// Detect join/leave events
col.onPresence((event) => {
  console.log(`${event.user} just ${event.action}ed the room!`);
});

// Get current online count
const stats = await db.getPresenceStats('collection:chat-room');
console.log(`People online: ${stats.numUsers}`);

🛡️ Security Rules

Define rules in your Worker configuration to protect paths:

{
  "path": "users/{userId}/**",
  "allow": {
    "write": "auth.uid == userId",
    "read": "auth.uid != null"
  }
}

⚖️ License

MIT © Telestack