@byronwade/realtime
v0.1.0
Published
Realtime engine for Fakebase — broadcast, presence, postgres changes
Maintainers
Readme
@byronwade/realtime
Part of Fakebase — a Supabase-shaped, local/dev-only development platform for Next.js prototypes. Not for production use.
The realtime engine — broadcast, presence, and postgres-changes channels, plus an optional local WebSocket bridge. It mirrors supabase.channel(...) semantics for local dev.
Installation
pnpm add @byronwade/realtimeWhen you use fakebase, realtime is also reachable through the client as db.channel(...). Install this package directly to use the engine standalone.
Usage
import { EventBus } from "@byronwade/core";
import { RealtimeService } from "@byronwade/realtime";
const realtime = new RealtimeService(new EventBus());
const channel = realtime.channel("room-1");What's inside
RealtimeService— manages channels over anEventBus.RealtimeChannel,PresenceManager,BroadcastRegistry— the building blocks for broadcast/presence/changes.createWsBridge(port?)— an optional local WebSocket server (+ typeWsBridgeServer).
The WebSocket bridge needs the optional ws dependency. Dev-only.
Documentation
License
MIT
