The JavaScript SDK is in pre-release and not on npm yet. Install it from source.
FolkwaysDocs

Set up the dashboard

Create a Folkways account, a workspace and a segment, then add a signing key and topic rules so your app can connect.

Everything your app needs from Folkways is set up in the Folkways dashboard: an account, a segment for your app, a signing key for your backend and topic rules that say which topics exist. It takes about five minutes.

Create an account

Open the Folkways dashboard and choose Sign up. Enter your name, email and a password.

We email you a 6-digit code. Enter it on the Verify your email screen, then sign in with your email and password. If you forget your password later, use Forgot password on the sign-in screen.

Create a workspace

A workspace holds your team, your plan and your segments. Give it a name (your company or project) and pick a plan.

You can invite teammates later under Team.

Create a segment

A segment is one realtime app, isolated from every other. Go to Segments → New segment and fill in:

  • Name, for example Chat (production).
  • Environment: Development, Staging or Production. Use a separate segment per environment.
  • Transports: keep WebSocket (apps and browsers) and HTTP publish and long-poll (backends, and browsers where WebSockets are blocked) both on.

Add a signing key

Your backend signs a short-lived token for each user with this key, and Folkways checks the signature. Open the segment's Signing keys tab and choose Add key:

  • Generate a key pair: the dashboard creates the pair and shows you the private key once. Save it in your backend's secrets right away; Folkways keeps only the public half.
  • Use my own public key: create the pair yourself (with OpenSSL or your cloud's key service) and paste only the public key.
  • Shared secret (HS256): one secret that both signs and checks. Fine for trying things out; production plans need a key pair.

Pick Ed25519 unless your tools need P-256. Note the Key ID (kid): your backend sends it with every token. How authentication works explains why there is no "secret API key".

Add topic rules

Folkways refuses every topic until a rule allows it. Open the Topic rules tab, choose Add rule and enter:

  • Pattern: which topics the rule covers. * matches one level and a trailing > matches one or more, so chat/> covers chat/lobby and chat/team/42.
  • Class: how events on those topics are delivered. Durable keeps an ordered history (chat, feeds), Last value keeps the latest value per key (locations, status) and Ephemeral carries short-lived signals (typing indicators). In the SDK these are called stream, kv and signal; see Topics and events.
  • Operations the rule allows, such as subscribe and publish.

For the quick start, add one rule: pattern chat/>, class Durable, operations subscribe and publish.

Copy your connection details

The segment's Connect tab shows a checklist and the values your code needs:

ValueUsed byExample
Segment IDYour backend, to sign tokens5faeecf0-db6e-41a3-9448-afe1b096a6d2
Key ID (kid) and private keyYour backend, to sign tokensbackend-2026-10
Node URLYour app and your backendhttps://rte.example.com

When the checklist says Ready for clients, continue with Installation.

Optional: anonymous, read-only access

Pages that only show live data to visitors who are not signed in, such as a public scoreboard or a delivery tracking link, can use a publishable key instead of a backend:

  1. In the segment's Settings, under Who can connect, turn on Allow anonymous connections.
  2. On the Publishable keys tab, choose Add key, give it a name and the topics it may read.
  3. Copy the key (rte_pk_…) when it is shown.

See Publishable keys for how to use it.

Not the same as workspace API keys

The API Keys page of your workspace is for automating the dashboard itself. Realtime connections never use those keys: they use tokens signed with a segment's signing key, or a segment's publishable key.

On this page