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

@ez-kits/sync-client-storage-sqljs

v0.1.1

Published

SQLite storage for EzSync in the browser, saved to IndexedDB

Readme

EzSync

EzSync is a modular, local-first sync library for TypeScript applications. Your app reads and writes a real SQL database in the browser, so it works offline and responds instantly. EzSync records every local change, pushes it to your backend when it can, and pulls remote changes back in, across every open tab.

You pick each piece separately: the local database engine, the ORM you query it with, and the backend you sync to. The core depends on none of them.

Why EzSync

  • Local-first. Collections live in SQLite (sql.js, the official SQLite WASM build or wa-sqlite) or Postgres (PGlite), persisted in the browser. Reads and live queries never wait for the network.
  • Writes are never lost. Each local write commits together with its outbox entry in one transaction. Nothing leaves the outbox until the backend has accepted it, or until your app explicitly discards a write the backend refused.
  • Many tabs, one database. Tabs elect a leader that holds the database and runs sync; the other tabs forward their queries to it. Live queries refresh in every tab.
  • Resumable pulls. Pull checkpoints are stored in the same database as the rows and saved in the same transaction, so a failed or interrupted pull resumes without skipping changes.
  • Explicit conflict handling. When a remote change meets a record with unpushed local writes, a resolver you choose decides the outcome, and the outbox is updated to match.
  • Refused writes don't block sync. A write the backend refuses (for example under security rules) is set aside and retried later, while every other write keeps syncing.

How it fits together

your app ── collections, live queries
   │
sync client ─────────────► sync adapter ──► your backend (Firestore, Realtime Database, Durable Objects, ...)
   │
DB adapter (Drizzle, TypeORM)
   │
DB storage ── leader election across tabs
   │
engine (sql.js, SQLite WASM, wa-sqlite, PGlite)
const dbStorage = createSqlJsDBStorage({ key: "todos", worker: () => new Worker(workerUrl) });
const dbAdapter = createDrizzleSqliteDBAdapter({ dbStorage, collections });
const client = createSyncClient({ collections, dbAdapter, syncAdapter });

client.startSync();

Packages

| Package | Role | | ------------------------------------------ | ------------------------------------------------------------------------- | | @ez-kits/sync-client-core | Sync client runtime and the contracts every other package implements | | @ez-kits/sync-client-drizzle-adapter | DB adapter for Drizzle ORM (SQLite and Postgres entry points) | | @ez-kits/sync-client-typeorm-adapter | DB adapter for TypeORM (SQLite and Postgres entry points) | | @ez-kits/sync-client-react | React bindings: provider, useSyncClient, useLiveQuery | | @ez-kits/sync-client-storage-sqljs | SQLite (sql.js) in a worker, snapshotted to IndexedDB | | @ez-kits/sync-client-storage-sqlite-wasm | Official SQLite WASM in a worker, persisted to OPFS (no COOP/COEP needed) | | @ez-kits/sync-client-storage-wa-sqlite | wa-sqlite in a worker, persisted to OPFS or IndexedDB, your choice | | @ez-kits/sync-client-storage-pglite | Postgres (PGlite) in a worker, persisted to IndexedDB | | @ez-kits/sync-client-firebase | Sync adapters for Cloud Firestore and the Firebase Realtime Database | | @ez-kits/sync-durable-object | Your own sync server on Cloudflare Durable Objects, and its adapter | | @ez-kits/sync-client-conflict-resolution | Ready-made conflict policies: last write wins, field merge, and others |

A typical app installs the core, one DB adapter, one storage engine and one sync adapter. Your app configures authentication and security rules for its backend; EzSync does not manage them.

Learn more

  • Documentation: installation, a step-by-step quick start, guides, the API reference of every package, and how to write your own DB storage, DB adapter or sync adapter.
  • Architecture decisions: why EzSync works the way it does, and its guarantees and trade-offs.
  • Examples: todo apps with React, Drizzle or TypeORM, and Firestore.

Status

EzSync is approaching a stable API but is not there yet; expect breaking changes between releases.

Development

This repository uses Vite+ (vp) with pnpm workspaces.

vp install         # install dependencies
vp check           # format, lint and type check
vp test            # run the tests
vp run build -r    # build every package

License

MIT