Skip to content
folkways

StreamKVSignal

Realtime Experiences at Scale

Folkways empowers building fast, secure, scalable, & reliable realtime experiences across web, mobile, microservices, AI Agents, IoT, & more.

Ultra low latency & high throughput

Demo: one AI chat stream on a laptop and a phone, resuming after a reload and a dropped network

topicchat/7f3astream
live · WebSocket

Write release notes for v2.4

laptop · cursor #0
phonelive · long-poll

Write release notes for v2.4

cursor #0

Simulated in your browser to show how cursor resume works. Amber marks events held in the stream while a device was away.

Building blocks

Three blocks. Every real-time feature.

Every event has a delivery type: an ordered log, the latest value, or a short-lived signal. One topic can carry all three, so a whole chat room is a single topic.

Stream

stream

An ordered log with replay. Clients that fall behind get every event they missed, in order.

  • chat messages
  • AI token streams
  • feeds
  • orders

KV

kv

The latest value for each key. Someone who joins late sees current values without paging through history.

  • locations
  • read receipts
  • status
  • scores

Signal

signal

Short-lived events for whoever is connected right now. Each sender’s latest signal lasts five seconds.

  • typing indicators
  • live cursors

Implementation

From install to live in minutes.

Sign a token on your server, connect from your app, publish. The SDK handles reconnects, ordering, resume and fallbacks for you.

  • TypeScript types for every event
  • Browsers, React Native, Node.js, Deno and Bun
  • JSON, Protobuf, FlatBuffers, MessagePack and CBOR payloads
1 · Install
npm install @folkwaysio/realtime
2 · On your server: sign a short-lived token for each user
import { Folkways } from '@folkwaysio/realtime/server';

const rte = new Folkways.Rest({ segment, signingKey });

const { token } = await rte.createToken({
  identity: `user:${user.id}`,
  capabilities: [
    { topics: 'chat/>', ops: ['subscribe', 'publish'] },
  ],
});
3 · In your app: connect, subscribe and publish
import { Folkways } from '@folkwaysio/realtime';

const client = await Folkways.connect({
  authUrl: '/api/realtime-token', // your endpoint from step 2
});

const room = client.topic('chat/lobby');
room.subscribe((msg) => render(msg.data)); // resumes on reconnect
await room.publish('message', { text: 'Hi' });

Why Folkways

Skip the real‑time plumbing.

Real-time looks simple until you need ordering, resume, presence and access control on unreliable networks. That’s the part we run for you.

Building real-time yourself compared with Folkways
AreaBuilding it yourselfFolkways
InfrastructureSocket servers, a message store, a pub/sub layer, scaling and failoverFully hosted. Nothing to run
Ordering and replayBuild sequencing and a history storeOrdered log with replay, built in
Reconnects and reloadsWrite resume logic for every clientThe SDK resumes from the last cursor
Presence and online statusTrack connections across serversTurn it on per topic rule
Access controlAuth checks on every channelScoped tokens, private rooms, instant revocation
Unreliable networksHandle blocked WebSockets and offline writesHTTP fallback and an offline publish queue
VisibilityWire up your own metricsDashboard with built-in analytics

Security

End-to-end encryption ready.

Folkways delivers your payloads without needing to read them. Encrypt on the sender’s device, decrypt on the receiver’s, and only your users ever see the message.

  • Encrypt on the device

    Encrypt payloads before you publish, with Web Crypto, libsodium or the library you already trust.

  • Your keys stay yours

    When you encrypt first, your keys never reach Folkways. We relay and store ciphertext we can’t read.

  • Encrypted at rest on the device

    The SDK can encrypt its local message store too, so cached history is protected.

  • Encrypted in transit

    Every connection runs over TLS, on WebSocket and HTTP alike.

Sender’s device

key · 7f3a

Hi, the contract is signed.

Encrypted before it leaves the device

Folkways

no key
  • Ordered
  • Stored for replay
  • Delivered

Receiver’s device

key · 7f3a

Hi, the contract is signed.

Decrypted with the same key

Only the two devices hold the key. Folkways relays what it can’t read.

Platform

One dashboard for every real-time app.

Folkways is organised in three levels, and you manage all of them from the dashboard.

  1. 1

    Workspace

    Your organisation: members, roles, plan and billing.

    acme

  2. 2

    Segment

    One real-time app, isolated from the rest. Use one per app or environment.

    chat-production · chat-staging

  3. 3

    Topics

    Where events flow. One topic can carry Stream, KV and Signal events; topic rules set the types, event names, who can do what, and limits.

    rooms/{room}: message · read · typing

Workspace overview in the Folkways dashboard: 1,846 connections now, 20.9 million of 60 million messages this period, 1,252 active topics, two segments and their API keys.
The Folkways dashboard, shown with sample data.
  • Create a segment for each app and environment
  • Write topic rules: the types and event names each topic carries, allowed operations and limits
  • Add signing keys for your backend and publishable keys for public pages
  • Choose who can connect, including anonymous read-only visitors
  • See basic usage analytics for connections and messages
  • Invite your team and manage your plan and billing

Pricing

Published prices. No sales call.

Five plans, priced by connections, messages, data and topic slots. Annual billing: save 15%. Prices in USD, excluding VAT and sales tax. Folkways is for business and professional use only.

Compare plans
Monthly plan prices and allowances
PlanConnectionsMessages / moData / moMonthlyYearly, per month (save 15%)
Free3003M10 GB$0–
Starter1,00020M50 GB$25$21.25
Growth3,00060M150 GB$45$38.25
Scale5,000100M250 GB$65$55.25
Pro10,000200M500 GB$115$97.75

Need a different mix?

These plans are a starting point. Tell us your connections, topics, messages and data transfer, and we’ll put together a curated package that fits your usage.

Design partner program

Build it with us. Free for up to 12 months.

We work closely with a small group of teams shipping real-time products: free usage while you build and launch, features made for your use case, and the engineers on call.

  • Up to 12 months

    of free usage, sized to your app

  • Bespoke features

    built around your use case

  • Direct line

    to the engineers who build Folkways

  • Early access

    and a say in the roadmap