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

sietch

v0.4.1

Published

Offline-first database with CRDT sync, post-quantum encryption, and per-subtree ACL

Readme

sietch

An offline-first database library with CRDT-based sync, post-quantum encryption, and a PostgreSQL/AGE/pgvector server backend. Inspired by GunJS and TopGun.

Features

  • Offline-first — full CRUD without network, automatic sync when online
  • CRDT sync — Yjs-powered conflict-free replication across peers and servers
  • Persistent sync streams — one long-lived bidirectional channel per peer with automatic reconnection
  • P2P networking — libp2p transport with NAT traversal (Circuit Relay v2)
  • Post-quantum encryption — hybrid Ed25519+ML-DSA-44 signing, X25519+ML-KEM-768 key exchange
  • Per-subtree ACL — server-signed reference nodes with three tiers (open / policy / crypto)
  • Reactive cursorsobserve() returns deep proxies, observeSubtree() tracks entry lifecycle
  • Graph + vector — local full-text search + graph traversal, server-side AGE graph + pgvector
  • Transparent eviction — two-tier (memory → disk → network), with pinning support
  • Zero-config — sensible defaults, createStore() works out of the box

Install

pnpm add sietch

Quick Start

import { createStore } from 'sietch';

// Create an offline-first store
const db = await createStore();

// Write data
await db.put('greeting.msg', 'hello world');

// Read data
const result = await db.get('greeting.msg');
console.log(result.value); // 'hello world'

// Subscribe to changes
db.subscribe('greeting', (entries) => {
  console.log('greeting subtree changed:', entries);
});

// Connect to a server for sync
await db.connectServer('/ip4/127.0.0.1/tcp/9090/ws');

Reactive Cursors

// Deep reactive proxy — reads and writes
const cursor = db.observe<{ title: string; done: boolean }>('todos.item1');
console.log(cursor.data.title);  // reads from CRDT
cursor.data.done = true;         // writes to CRDT, syncs automatically
cursor.dispose();

// Subtree cursor — tracks entries
const todos = db.observeSubtree<{ title: string }>('todos');
todos.onAdd((key, entry) => console.log('added:', key, entry.data.title));
todos.onRemove((key) => console.log('removed:', key));
todos.dispose();

Server Mode

import { createStore } from 'sietch';

const server = await createStore();
await server.listen({ port: 9090 });

Architecture

| Client Module | Purpose | |---|---| | Store | Public API facade | | Yjs Engine | CRDT engine (subdocument per subtree) | | ACL Module | Per-subtree access control | | Crypto Module | PQ hybrid signing, KEX, symmetric encryption | | Identity Module | Keypair lifecycle, device linking | | Sync Engine | libp2p transport, persistent sync streams | | Storage Backend | OPFS/IndexedDB/memory abstraction | | Eviction Manager | Two-tier eviction with LRU | | Query/Index Engine | Full-text search + graph traversal | | Observability | Structured logging (pino), event channels |

| Server Module | Purpose | |---|---| | Sync Service | Yjs relay with selective replication | | ACL Authority | Sign/validate ACL reference nodes | | Auth Service | Email-based device linking | | Query Bridge | Yjs → PostgreSQL/AGE/pgvector pipeline |

Project Status

394 tests across 22 test files, 83/83 requirements covered.

License

MIT