Real-Time PostgreSQL Subscriptions for Next.js & React via Server-Sent Events (SSE). Zero external SaaS dependencies. Zero vendor lock-in.
This repository is organized as a pnpm monorepo workspace:
packages/pg-sse: The core standalone library providing React Server Component boundaries (pg-sse/server,pg-sse/client), browser tab multiplexing viaBroadcastChannel, keep-alive proxy headers, and automated leader election.examples/nextjs: A complete, real-time live monitoring dashboard built with Next.js (App Router), Tailwind CSS, and Docker Compose.
# 1. Install dependencies pnpm install # 2. Build all packages and examples pnpm build # 3. Run all test suites pnpm test # 4. Spin up the example application pnpm --filter nextjs-example dev
Deployment to npm is fully automated via GitHub Actions with SLSA Provenance.
To release a new version:
# 1. Bump version locally (creates commit and tag automatically) pnpm version patch # (or minor / major / specific version) # 2. Push both commit and tag to GitHub git push --follow-tags
- Go to GitHub Releases > Draft a new release.
- Select your newly pushed tag (e.g.,
v0.1.2), fill in release notes using the prefilled template, and click Publish release.
MIT