Realtime for SvelteKit.
Write server functions.
Import them in components. Done.
RPC and reactive streams over WebSocket, with zero boilerplate. Built on uWebSockets.js for native-speed performance.
$ npx svelte-realtime my-app Or set up manually in an existing project.
import { live } from 'svelte-realtime/server'
let count = 0
export const increment = live(ctx => {
count++
ctx.publish(
'counter', 'updated', count
)
})
export const counter =
live.stream('counter', () => count)<script>
import { increment, counter }
from '$live/counter'
</script>
<p>{$counter}</p>
<button onclick={increment}>
+1
</button>Counter
0
Live for ALL visitors
Server, client, done. That's it.
Interactive Tutorial
Learn by building
12 hands-on lessons. Write real code in a live editor. It runs on a real server, in a secure sandbox. Watch two users sync through your code in real time.
Start the TutorialWrite
src/live/*.js
live() and live.stream()
Import
$live/module
Virtual imports, auto-generated
Call
async fn()
Functions and Svelte stores
React
all clients
Everyone updates in real time
RPC over WebSocket
Call server functions like local async functions
Reactive Streams
Svelte stores that sync automatically across clients
Merge Strategies
crud, patch, signal - pick how data merges
Auth Built-in
Per-module and per-function authorization via upgrade()
Cursor Pagination
loadMore() with automatic cursor tracking
Throttle & Debounce
Rate-limit publishes at the server level
Cron Jobs
Scheduled server-side tasks with live.cron()
Binary Support
Send and receive ArrayBuffers natively
Chat, dashboards, collaborative editing, multiplayer, notifications - anything that needs to stay in sync.
Built with svelte-realtime
svelte-realtime-demo
Collaborative sticky notes - real-time, multiplayer, persistent.
This docs site
You're looking at it. Presence, live counters, ghost cursors - all svelte-realtime.