Done.

$ 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

That click traveled through a WebSocket, updated server state, and reached every connected browser.

0 connections right now - 0 frames transmitted
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

Remote Procedure Calls

RPC over WebSocket

Call server functions like local async functions. No REST endpoints, no serialization layer. Just call the function and get the result.

Learn more →

Call a server function. See the round-trip time.

Live Data Everywhere

Reactive Streams

Svelte stores that sync automatically across every connected client. When data changes on the server, every browser updates instantly.

Learn more →

Live poll - everyone sees the result

0 votes - updates live for everyone

Who's Here Right Now

Presence

Know who's connected, what page they're on, and where their cursor is. Build collaborative experiences with a single function call.

Learn more →

Waiting for visitors...

0 people are on this page right now

Scheduled Server Tasks

Cron Jobs

Run server-side tasks on a schedule with live.cron(). Heartbeats, cleanup, polling, data sync - all built in.

Learn more →

Waiting for first tick...

Server cron fires every 60s

Performance

Typical round-trip cost per transport, not a library vs library benchmark.

WebSocket

svelte-realtime

3ms

GraphQL Sub

subscription

28ms

REST API

polling

65ms

0

concurrent users

0 FPS

sustained

0 KB

client bundle

Open source

Free forever under the MIT license. Star us on GitHub to follow along.

Star on GitHub

Loading recent stars...

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.

Leave your mark

Move your cursor across the canvas. Everyone sees everyone's particles.

0 particles

Live Feed