The roadmap is structured around four phases, each shipping a usable artifact. Never spend more than 4-6 weeks without something a developer can install and try. Shipping early is more valuable than shipping complete.
Goal: A working demo where a DB INSERT appears in the browser within 100ms. Use the simplest CDC mechanism (LISTEN/NOTIFY) to get a working proof of concept fast.
Success gate: A developer can clone the repo, run docker compose up + pnpm dev, and see a DB INSERT appear in the browser in under 5 minutes.
Result: Gate passed. INSERT → browser event in ~200ms via LISTEN/NOTIFY. 28 tests passing (unit + integration E2E). All packages build and typecheck clean.
-
Scaffold pnpm monorepo
pnpm-workspace.yamlwithpackages/*andapps/*- Root
package.jsonwith build/test/lint scripts - Root
tsconfig.base.json(ES2022, NodeNext, strict) - Per-package
package.jsonandtsconfig.json - eslint, prettier, husky, lint-staged configuration
-
Wire protocol types (
packages/core)ChangeType,ChangeEvent,SubscribeMessage,UnsubscribeMessageSyncMessage,ErrorMessage,ClientMessage,ServerMessageChangeProviderinterface
-
LISTEN/NOTIFY provider (
packages/server)- Simple PostgreSQL trigger that fires NOTIFY on INSERT/UPDATE/DELETE
- Provider that listens and converts to
ChangeEventformat - Temporary — will be replaced by WAL provider in Phase 1
-
Minimal WebSocket server (
packages/server)- Accept connections, parse subscribe/unsubscribe messages
- Fan-out: forward matching events to subscribed clients
- No auth, no permissions (PoC only)
-
Vanilla JS client (
packages/client)- Connect to WebSocket, send subscribe, receive events
- Basic reconnection (simple retry, not exponential backoff yet)
- Log received events, track offset
-
Demo application (
apps/demo)- Live order status dashboard
- Show orders table, auto-update when rows are inserted/updated
- Plain HTML + vanilla JS (no framework dependency for PoC)
-
Docker Compose for development
- PostgreSQL 16 with
wal_level=logical(pre-configure for Phase 1) - Health check, proper environment variables
- PostgreSQL 16 with
-
README quickstart
- Clone, install, start, insert a row, see it appear
Goal: Replace LISTEN/NOTIFY with production-grade WAL-based CDC. Add authentication, permissions, and filtering. Publish alpha packages to npm.
Success gate: Events are delivered via WAL logical replication with guaranteed delivery. Disconnected clients catch up from their last offset on reconnect.
-
PostgreSQL WAL provider (
packages/server)- Logical replication via
pgoutputplugin - Binary pgoutput message parsing (Relation, Begin, Insert, Update, Delete, Commit)
- Relation message caching by OID for column name mapping
- Offset tracking per event
- Logical replication via
-
WAL slot health monitoring (
packages/server)- Query
pg_replication_slotsforlag_bytesevery 30s - Warn at configurable threshold (default 512MB)
- Alert and emit event if slot becomes inactive
- Query
-
Offset-based reconnection
- Client stores last received offset
- On reconnect, sends offset in subscribe message
- Server replays events from that offset via
replayFrom()
-
JWT authentication
- Verify JWT on WebSocket handshake
- Extract user ID from token payload
- Reject connection if token invalid/expired
-
Table-level permission callback
opts.permissions(userId, table)evaluated on subscribe
-
Filter validation
- Parse
column operator valueformat - Validate column against
allowedFilterColumns - Validate operator against allowlist
- In-process
matchesFilter()per event
- Parse
-
Integration test suite
- Docker Compose with PostgreSQL (wal_level=logical)
- Tests: INSERT delivery, UPDATE delivery, DELETE delivery
- Tests: reconnection backfill
- Tests: permission rejection
- Tests: filter validation and matching
-
Publish to npm
@livesql/corev0.1.0-alpha@livesql/serverv0.1.0-alpha@livesql/clientv0.1.0-alpha
Goal: Ship framework integrations, row-level permissions, production-grade server features, documentation, and a polished demo. Publish beta and announce.
Success gate: A React developer can npm install @livesql/react, wrap their app in <LiveSQLProvider>, and use useLiveQuery('orders') to get live data.
-
React package (
packages/react)LiveSQLProvidercontext provideruseLiveQuery<T>(table, options?)hookuseLiveTable<T>(table, options?)Map-based hookuseLiveSQLClient()escape hatch
-
Vue composables (
packages/vue)useLiveQuerycomposable
-
Svelte stores (
packages/svelte)liveQuerystore
-
Row-level permission callback
opts.rowPermission(userId, table, row)evaluated per event
-
Update batching & backpressure
EventBatcher: coalesce events, flush at 50 or 16ms- Drop events when
ws.bufferedAmount > 1MB - Emit
client:backpressureevent
-
Docusaurus documentation site (
apps/docs)- 5-minute quickstart tutorial
- Concepts page: how sync works
- API reference for all packages
- Migration guide from Supabase Realtime
-
Polished demo application
- Collaborative dashboard with multiple data types
- React-based, showcasing useLiveQuery
-
k6 load test suite
- Target: 1,000 concurrent WebSocket connections
- Metrics: connection time, message latency (p50/p95/p99), throughput
-
Publish beta
- All packages at v0.5.0-beta
- Post to HackerNews Show HN
Goal: Make LiveSQL production-ready. Chaos testing, observability, failover handling, comprehensive TypeScript types, and stable v1.0 release.
-
Chaos test suite (
tests/chaos)- Toxiproxy for network partitions
- Network partition between CDC consumer and PostgreSQL
- Slow client (high bufferedAmount)
- PostgreSQL primary failover (pg_ctl promote)
- WAL disk approaching limit
- Mass reconnect (thundering herd — 1,000 clients)
- Invalid filter injection attempt
-
Exponential backoff with jitter
- Prevent thundering herd on server restart
- Jitter: +/-10-25% random delay
-
Observability hooks
onEvent,onError,onSlotLagonClientConnect,onClientDisconnect
-
Replication slot failover handling
- Detect missing slot on reconnect
- Recreate slot, warn user of potential gap
-
Comprehensive TypeScript types
- Full types for all configuration options
- Strict generics on all hooks
-
Performance benchmark
- Measure p50/p95/p99 end-to-end latency
- Publish results in docs
-
Migration guides
- From Supabase Realtime
- From Firebase Realtime Database
-
Publish v1.0.0 stable
- Launch blog post
- Submit to Hacker News front page
Goal: Expand database support and build monetization path. Only proceed based on actual user demand.
-
MySQL binlog provider (only if >20 GitHub issues request it)
- Implement
MySQLProviderusing@vlasky/zongjior maintained fork - MySQL binlog captures schema changes (unlike PostgreSQL WAL)
- No Row-Level Security equivalent — handle in application layer
- Implement
-
Managed cloud service (LiveSQL Cloud)
- Open-core monetization model
- Free tier: 50 connections, 2GB sync/month
- Pro: $49/month, 1,000 connections, 30GB
- Team: $599/month, SLAs, compliance
-
Enterprise features
- Audit logging
- SAML SSO
- SLA-backed uptime
- Compliance reports
PostgREST (MIT, 24k+ stars) auto-generates a REST API from Postgres tables. LiveSQL streams changes via WebSocket. Together they give the full Supabase experience (CRUD + real-time) without vendor lock-in — two open-source sidecars on any Postgres.
Deliverables:
- Docker Compose one-command demo —
docker compose upspins up Postgres + PostgREST + LiveSQL + React frontend. Zero backend code, full real-time CRUD. - "Works with PostgREST" integration guide — docs page showing the architecture, setup, and React example.
- HN launch angle — position LiveSQL as "the real-time companion to PostgREST." Targets an established community rather than competing with Supabase head-on.
Why this matters:
- PostgREST handles reads/writes, LiveSQL handles live updates — complementary, not competing
- Both are sidecars: no app code, no migration, no lock-in
- Works with any Postgres: self-hosted, RDS, Neon, Supabase, etc.
- Strong positioning for launch: piggyback on PostgREST's established trust