Ecosystem

Three packages, one stack. Most users only touch the first one.

+-------------------------------------------+
|                                           |
|  * svelte-realtime      RPC + streams     |
|      | built on         zero boilerplate  |
|  svelte-adapter-uws     uWebSockets.js    |
|      | scaled by                          |
|  extensions             Redis / Postgres  |
|                                           |
+-------------------------------------------+
PackageWhen you need it
svelte-realtimeAlways. This is what you import and use.
svelte-adapter-uwsAlways. It’s the SvelteKit adapter that runs your app on uWebSockets.js.
svelte-adapter-uws-extensionsWhen you scale beyond a single instance and need Redis/Postgres for shared state.

The stack

Most users only interact with svelte-realtime. The adapter is an install step. Extensions don’t exist until you need to scale.

svelte-adapter-uws

Replaces SvelteKit’s default adapter. Runs your app on uWebSockets.js - a C++ HTTP/WebSocket server that handles hundreds of thousands of connections on a single thread.

  • Native TLS (no Nginx/Caddy needed)
  • Built-in pub/sub with a reactive Svelte client store
  • 9 plugins for common patterns (replay, presence, throttle, rate limiting, etc.)
  • In-memory static file cache
  • Backpressure handling, graceful shutdown, health checks

Adapter docs →

svelte-adapter-uws-extensions

Drop-in replacements for the core adapter’s in-memory plugins, backed by Redis and Postgres. Same API, distributed state.

  • Distributed pub/sub (cross-instance platform.publish())
  • Persistent replay buffers (survive restarts)
  • Cross-instance presence
  • Distributed rate limiting
  • Postgres LISTEN/NOTIFY bridge
  • Prometheus metrics

Extensions docs →


Standing on giants

Svelte

Compiler-driven reactivity with zero runtime overhead. Svelte’s $-prefix stores and fine-grained updates mean svelte-realtime streams are just Svelte stores - nothing new to learn, nothing wasted. The compiler strips unused code at build time, so the cost of subscribing to a stream is exactly the cost of subscribing to a store: a single function call.

svelte.dev | GitHub

SvelteKit

Server-side rendering, file-based routing, and the adapter system that makes this all pluggable. SvelteKit’s hooks give us upgrade() for WebSocket auth. Its Vite integration gives us $live/* virtual imports. The load() function enables SSR hydration. The framework did the hard work - we just connected it to WebSocket.

SvelteKit docs | GitHub

uWebSockets.js

A WebSocket server written in C++ that handles hundreds of thousands of connections on a single thread. The reason svelte-realtime can publish to 10,000 subscribers in under a millisecond isn’t clever code - it’s uWebSockets.js being absurdly fast. Topic-based pub/sub, per-socket backpressure, cork/uncork batching - all at the C++ level, exposed through a clean JS API.

GitHub

We wrote the glue. They built the rocket engines.

Was this page helpful?