Docs/Getting started/Introduction

Introduction

EmitWave is realtime messaging infrastructure. Subscribe to channels over WebSockets and publish signed events from your server.

Overview· 4 min read

What EmitWave is

EmitWave is realtime pub/sub infrastructure. Your frontend connects to a single WebSocket and subscribes to channels; your trusted backend publishes events to those channels; every connected subscriber receives them in milliseconds.

You interact with EmitWave through two things: a signed publish endpoint for your trusted server, and the realtime WebSocket your browser SDK connects to. Everything in between — authorization, channel scoping, and fan-out — is handled for you.

EmitWave is a transport, not a UI toolkit. You decide what to publish and how to render it. Channel names, authorization, and tenant isolation are handled for you.

How it works

A typical integration has two sides:

  • Browser — the @emitwave/js (or @emitwave/vue) client connects with your public application key and an end-user token, then subscribes to channels.
  • Server — a server SDK (@emitwave/node, Go, PHP, or the Laravel broadcaster) publishes events with an HMAC-signed request to the gateway.

Channel names are automatically scoped to your application after the connection token returns the application ID, so two tenants never share a channel.

Credentials

EmitWave uses separate credentials for browser connections and server publishing. Keep the server secret on the server — it must never appear in a browser bundle.

CredentialUsed byPurpose
ew_pk_…BrowserPublic application key — identifies the app, safe to expose
End-user Bearer tokenBrowserAuthenticates the current user to EmitWave
Connection tokenSDKShort-lived; minted automatically for every socket connection
Subscription tokenSDKShort-lived; authorizes a private or presence channel
Server key + secretTrusted serverHMAC-signs publish requests

See Authentication for the full flow.

Channel types

ExampleTypeAuthorization
newsPublicConnection token only
cache-pricesPublic cacheConnection token; replays the latest retained event
private-account.42PrivateTruthy authorization callback
presence-room.lobbyPresenceCallback returning { id, info }
private-encrypted-account.42Private encryptedPrivate callback plus a per-channel decryption key

Read the full reference in Channels.

Where to go next

← Previous
—
Next →
Quickstart