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

genossrv

v0.1.0

Published

GenosDB Server: High-performance distributed graph database node powered by Bun + SQLite. Peer-compatible with browser GenosDB via P2P sync.

Readme

GenosSRV

High-performance distributed graph database node powered by Bun + SQLite. Peer-compatible with browser GenosDB via P2P sync (GenosRTC/WebRTC).

What it does

GenosSRV acts as a persistent superpeer for GenosDB — it joins the same P2P room as browser instances, syncs data bidirectionally via CRDT, and stores everything in SQLite with WAL mode for crash-safe durability.

Browser (GenosDB/OPFS) ←──P2P──→ GenosSRV (SQLite) ←──P2P──→ Browser (GenosDB/OPFS)
  • Full query enginemap() with 15+ operators ($eq, $gt, $in, $contains, $regex, $edge, etc.), identical to browser GenosDB
  • Realtime subscriptionsmap({ realtime: true }, callback) for reactive queries
  • CRDT sync — HybridClock + conflict resolution + delta/full sync via oplog
  • SQLite WAL — ACID-compliant, no data loss on crash
  • Zero HTTP — pure P2P, no Express, no REST

Install

pnpm install

Usage

CLI

# Join a room (matches browser GenosDB room name)
bun index.js myRoomName

# Default room name: "default"
bun index.js

# Environment variables
GDB_ROOM=myRoom GDB_DB_PATH=./mydata.sqlite bun index.js

As a module

import { gdbServer } from './index.js'

const db = await gdbServer('myRoom', {
  password: 'optional-encryption',    // P2P encryption
  relayUrls: ['wss://...'],           // Custom Nostr relays
  saveDelay: 200,                     // Debounce interval (ms)
  oplogSize: 1000                     // Max oplog entries
}, './data.sqlite')

// Write
const id = await db.put({ text: 'hello', ts: Date.now() })
const id2 = await db.put({ text: 'world' }, 'custom-id')

// Read
const { result } = await db.get(id)

// Query (full operator support)
const { results } = db.map({ query: { type: 'message', ts: { $gte: Date.now() - 86400000 } } })

// Realtime subscription
const { unsubscribe } = db.map({ query: { type: 'task' }, realtime: true }, (node) => {
  console.log(node.action, node.id, node.value) // 'added' | 'updated' | 'removed'
})

// Graph relationships
await db.link(sourceId, targetId)

// Delete
await db.remove(id)

// Middleware (intercept incoming sync messages)
db.use(async (ops, prevStates) => {
  // filter, transform, or reject ops
  return ops
})

// Lifecycle
db.on((snapshot) => console.log('graph changed'))
db.close()

Query Operators

Identical to browser GenosDB:

| Operator | Example | |----------|---------| | $eq | { status: { $eq: 'active' } } | | $ne | { type: { $ne: 'draft' } } | | $gt, $gte, $lt, $lte | { score: { $gte: 90 } } | | $in | { role: { $in: ['admin', 'mod'] } } | | $between | { ts: { $between: [start, end] } } | | $exists | { email: { $exists: true } } | | $startsWith, $endsWith | { name: { $startsWith: 'geo' } } | | $contains, $text | { bio: { $contains: 'developer' } } | | $regex | { code: { $regex: '^[A-Z]{3}' } } | | $and, $or, $not | { $or: [{ a: 1 }, { b: 2 }] } | | $edge | { $edge: { type: 'concept' } } | | $limit, $after, $before | Pagination |

Architecture

┌─────────────────────────────────────┐
│ GenosSRV                            │
│                                     │
│  index.js          → Core (CRUD, sync, graph, queries)
│  Operators.js      → Query engine (15+ operators)
│  HybridClock.js    → Causal ordering (HLC)
│  conflictResolver.js → LWW conflict resolution
│  genosrtc.min.js   → P2P networking (WebRTC + Nostr)
│  genosrtc-bun.js   → Bun runtime compatibility wrapper
│                                     │
│  SQLite (WAL)      → Persistent storage
│  GenosRTC          → Peer discovery + data channels
└─────────────────────────────────────┘

Requirements

  • Bun >= 1.0.0
  • pnpm for package management

Author

Esteban Fuster Pozzi (@estebanrfp) — Full Stack JavaScript Developer