SQLite as a networked service.

Give SQLite what a service needs: reach it over HTTP or WebSocket, replicate it across nodes, and subscribe to row changes as they commit. The same embedded database scales from a file on your laptop to a replicated cluster with automatic failover.

pnpm add -E @delali/sirannon-db

The same database runs embedded in Node.js, Bun, the browser, and React Native, then speaks HTTP and WebSocket to your clients and gRPC between nodes. One driver API covers every one of them.

Pick a driver, open a database, and run SQL

Parameterised queries and typed results work the same on an embedded file as on a replicated cluster, so the code you start with is the code you deploy.

Read the getting started guide
database.ts
import { Sirannon } from '@delali/sirannon-db'
import { betterSqlite3 } from '@delali/sirannon-db/driver/better-sqlite3'
 
const driver = betterSqlite3()
const sirannon = new Sirannon({ driver })
const db = await sirannon.open('app', './data/app.db')
 
await db.execute(
  'CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT, email TEXT)'
)
await db.execute('INSERT INTO users (name, email) VALUES (?, ?)', [
  'Ada',
  'ada@example.com',
])
 
const users = await db.query<{ id: number; name: string }>('SELECT * FROM users')

Your data, live as it changes

Change data capture tracks every insert, update, and delete as it commits, and clients subscribe to table changes over WebSocket. Real-time features come from the database itself.

Subscriptions survive reconnects: the client SDK restores them automatically.

See what you can build
Change feedorders, cartsLive
4194deletecarts#92212:04:07
4193updateorders#1837 → paid12:04:05
4192insertorders#1841 → pending12:04:04
WebSocketSubscriptions restore on reconnect

One dependency runs the whole service

Drivers, migrations, backups, change capture, the network server, and replication install together as one npm package.

Pluggable drivers
One API across better-sqlite3, the Node.js built-in driver, wa-sqlite in the browser, Bun, and Expo on React Native.
Change data capture
Subscribe to row-level changes as they commit, with hooks for auditing, caching, and sync.
Migrations and backups
Versioned up and down migrations load from SQL files, and scheduled backups protect every database Sirannon owns.
Networked access
The bundled server exposes databases over HTTP and WebSocket, and the client SDK proxies queries with topology-aware routing.
Replication and failover
Primary-owned changes replicate over gRPC with hybrid logical clocks, and coordinator mode fails over automatically through etcd.
Hardened by default
Parameterised queries, identifier validation, path traversal prevention, and request limits come built into the core.

Start building with Sirannon

The documentation walks you from installation to production configuration.