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.

src/live/counter.ts
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)
+page.svelte
<script>
  import { increment, counter }
    from '$live/counter'
</script>

<p>{$counter}</p>
<button onclick={increment}>
  +1
</button>
localhost:5173

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 Tutorial
Step 1

Write

src/live/*.js

live() and live.stream()

Step 2

Import

$live/module

Virtual imports, auto-generated

Step 3

Call

async fn()

Functions and Svelte stores

Step 4

React

all clients

Everyone updates in real time

0

realtime messages delivered

1000

concurrent users, 60 FPS

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.