Stream
An ordered log with replay. Clients that fall behind get every event they missed, in order.
- chat messages
- AI token streams
- feeds
- orders
Built from three blocks
StreamKVSignal
Folkways empowers building fast, secure, scalable, & reliable realtime experiences across web, mobile, microservices, AI Agents, IoT, & more.
Ultra low latency & high throughput
Simulated in your browser to show how cursor resume works. Amber marks events held in the stream while a device was away.
Building blocks
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.
An ordered log with replay. Clients that fall behind get every event they missed, in order.
The latest value for each key. Someone who joins late sees current values without paging through history.
Short-lived events for whoever is connected right now. Each sender’s latest signal lasts five seconds.
Implementation
Sign a token on your server, connect from your app, publish. The SDK handles reconnects, ordering, resume and fallbacks for you.
npm install @folkwaysio/realtimeimport { 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'] },
],
});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
Real-time looks simple until you need ordering, resume, presence and access control on unreliable networks. That’s the part we run for you.
| Area | Building it yourself | Folkways |
|---|---|---|
| Infrastructure | Socket servers, a message store, a pub/sub layer, scaling and failover | Fully hosted. Nothing to run |
| Ordering and replay | Build sequencing and a history store | Ordered log with replay, built in |
| Reconnects and reloads | Write resume logic for every client | The SDK resumes from the last cursor |
| Presence and online status | Track connections across servers | Turn it on per topic rule |
| Access control | Auth checks on every channel | Scoped tokens, private rooms, instant revocation |
| Unreliable networks | Handle blocked WebSockets and offline writes | HTTP fallback and an offline publish queue |
| Visibility | Wire up your own metrics | Dashboard with built-in analytics |
Security
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 payloads before you publish, with Web Crypto, libsodium or the library you already trust.
When you encrypt first, your keys never reach Folkways. We relay and store ciphertext we can’t read.
The SDK can encrypt its local message store too, so cached history is protected.
Every connection runs over TLS, on WebSocket and HTTP alike.
Sender’s device
key · 7f3aHi, the contract is signed.
Encrypted before it leaves the device
ciphertext · over TLS
Folkways
no keyciphertext · over TLS
Receiver’s device
key · 7f3aHi, the contract is signed.
Decrypted with the same key
Platform
Folkways is organised in three levels, and you manage all of them from the dashboard.
Your organisation: members, roles, plan and billing.
acme
One real-time app, isolated from the rest. Use one per app or environment.
chat-production · chat-staging
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



Products
Each product is a pattern for a common job, built from Stream, KV and Signal. Use one, or mix them.
Publish events to a topic. Every subscriber gets them in order and catches up after a disconnect or a reload.
StreamChat and in-app messagingMessages on a stream, read receipts as KV values and typing as signals, with sending status in the UI.
StreamKVSignalIn-app notificationsYour backend publishes to each user’s topic. The in-app inbox catches up when the app comes back online.
StreamSee who’s onlineShow who is online in your app and who is in a room, alongside typing and live cursors.
SignalPresenceLive locationThe latest position of every courier or vehicle as a KV value that expires on its own, with trip events on a stream.
KVStreamEvents between your servicesBackends publish over HTTP. Node.js, Deno and Bun services subscribe and resume from their last cursor.
StreamUse cases
AI streaming, live dashboards and multiplayer are where most teams start. The same three blocks power chat, notifications, live location, auctions, IoT telemetry and service events.
Stream model output token by token. Answers keep going through reloads, sleeping laptops and dropped networks.
Push metrics, prices and statuses to every open screen. Late joiners see current values at once, with no polling.
Live cursors, presence and shared state for whiteboards, editors and games, without running socket servers.
Pricing
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.
| Plan | Connections | Messages / mo | Data / mo | Monthly | Yearly, per month (save 15%) |
|---|---|---|---|---|---|
| Free | 300 | 3M | 10 GB | $0 | – |
| Starter | 1,000 | 20M | 50 GB | $25 | $21.25 |
| Growth | 3,000 | 60M | 150 GB | $45 | $38.25 |
| Scale | 5,000 | 100M | 250 GB | $65 | $55.25 |
| Pro | 10,000 | 200M | 500 GB | $115 | $97.75 |
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
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