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

@affectively/dash

v5.0.0

Published

The Local-First, AI-Native Database for the Web. Featuring WASM SQLite, Vector Embeddings, and MCP support.

Readme

Dash 2.0

The Local-First, AI-Native Database for the Modern Web.

Dash 2.0 isn't just a database; it's a complete data engine for building high-performance, intelligent web applications. It brings server-grade power to the client, enabling apps that feel instant, work offline, and understand your users.

The "Real" Filesystem: OPFS

If you built your local-first app a year or two ago, you probably had to persist data by serializing the whole DB to IndexedDB or localStorage. It was slow and blocked the main thread.

The Shift

The new standard is SQLite over OPFS (Origin Private File System).

Why it’s sexy

It gives the browser direct, performant handle access to a virtual file system optimized for random access.

The Result

You can run full ACID transactions on a multi-gigabyte SQLite file in the browser with near-native desktop performance, without ever blocking the UI thread (thanks to SharedArrayBuffer).

Combined with Zero-Copy (BYOB) readers and UCAN-based Zero-Trust Auth, Dash isn't just a database—it's a local-first operating system.

Features

🚀 Production-Grade Storage

  • Stateful Serverless: Powered by Cloudflare Durable Objects and Native SQLite.
  • Zero-Copy IO (BYOB): "Bring Your Own Buffer" readers for max throughput.
  • ACID Compliant: Full transactional integrity in the browser.

🧠 Hardware-Accelerated AI

  • Vector Search: Built-in vector embeddings and search.
  • 3-Tier Acceleration:
    1. WebNN: NPU acceleration (Apple Neural Engine, etc.)
    2. WebGPU: High-performance GPU parallelization.
    3. WASM/CPU: Universal fallback.
  • Semantic Queries: Find data by meaning at native speeds.

🔄 Modern Sync

  • Hybrid Transport:
    • WebSocket: Supports Cloudflare Durable Object Hibernation ($0 idle cost).
    • WebTransport: UDP-like high-frequency streams (perfect for cursors/games).
  • Zero-Trust Auth (UCANs): Decentralized authorization via User Controlled Authorization Networks.
  • Lens: Bidirectional schema migrations for infinite backward compatibility.

🎨 Graphics Ready

  • Direct Buffers: Zero-copy bindings allow piping data directly into 3D engines like Three.js.
  • Spatial Indexing: R-Tree support for massive 3D visualizations.

Installation

npm install @affectively/dash

Quick Start

1. Store & Query (Standard SQL)

Dash provides a familiar SQL interface with Promise-based execution.

import { dash } from "@affectively/dash";

await dash.ready();

// Standard SQL execution
await dash.execute("CREATE TABLE IF NOT EXISTS todos (id TEXT, text TEXT)");
await dash.execute("INSERT INTO todos VALUES (?, ?)", ["1", "Buy milk"]);

const rows = await dash.execute("SELECT * FROM todos");
console.log(rows);

2. Semantic Search (AI)

Store content with automatic vector embeddings and query by meaning.

// Add an item (automatically generates and stores vector embedding)
await dash.addWithEmbedding("1", "Buy almond milk and eggs");

// Search by meaning - "breakfast ingredients" matches "eggs" and "milk"!
const results = await dash.search("breakfast ingredients");
// Result: [{ id: '1', content: '...', score: 0.85 }]

3. Spatial Queries (3D R-Tree)

Filter items by 3D bounds for high-performance spatial lookups.

// Query a 3D bounding box
const items = await dash.spatialQuery({
  minX: 0,
  maxX: 100,
  minY: 0,
  maxY: 100,
  minZ: 0,
  maxZ: 100,
});

4. Reactivity (Signals)

Bind query results directly to your application state.

import { liveQuery, effect } from "@affectively/dash";

// This signal automatically updates whenever the 'todos' table changes
const todos = liveQuery("SELECT * FROM todos");

effect(() => {
  console.log("Current Todos:", todos.value);
});

5. Sync & Backup (Local-First)

Enable collaboration and data safety with a single line.

import { SyncConnection, backup } from "@affectively/dash";

// 1. Peer-to-Peer Sync (WebTransport - Recommended)
// Requires a WebTransport Relay Server (Star Topology)
const connection = new SyncConnection({
  type: "webtransport",
  roomName: "my-room",
  url: "https://relay.dash.dev/sync",
  doc,
});

// OR: Peer-to-Peer Sync (WebRTC - Legacy)
// Mesh Topology (Client-to-Client)
const p2p = new SyncConnection({
  type: "webrtc",
  roomName: "my-room",
  doc,
});

// 2. Encrypted Cloud Backup
await backup("my-room", doc, mySecretKey, cloudAdapter);

Architecture

Dash uses @sqlite.org/sqlite-wasm with the OPFS backend to ensure main-thread responsiveness. Large data operations occur in the WASM heap, avoiding the serialization overhead of IndexedDB.

Vector operations utilize sqlite-vec (WASM) for high-performance similarity search.

For a deep dive into our "Stateful Serverless" Client-Relay topology using Cloudflare Durable Objects, read the Sync Architecture Guide.

Development

# Build the project
npm run build

# Run tests
npm test

License

MIT