Realtime and WebRTC

Compose authenticated realtime channels, resumable client state, WebRTC session control, and ICE or relay infrastructure without conflating events, signalling, and media.

Supported approaches

Authenticated realtime channels

planned

Subscribe through single-use session tickets, authorize every channel server-side, and reconnect with bounded cursor replay.

Packages

@playstack/realtime

@playstack/realtime-react

@playstack/nest-realtime

@playstack/auth

WebRTC sessions and signalling

planned

Normalize session creation, signalling, participants, and provider capabilities while leaving media tracks in provider-native APIs.

Packages

@playstack/webrtc

@playstack/webrtc-react

@playstack/nest-webrtc

Frameworks and integrations

ICE and relay coordination

planned

Issue bounded relay credentials and select compatible connectivity profiles without embedding one media provider's room model.

Packages

@playstack/webrtc

@playstack/nest-webrtc

Frameworks and integrations

Frameworks and integrations

framework

React

Headless domain bindings plus optional Chakra application and admin compositions, with server authority kept outside the client.

framework

Next.js

Compose Playstack server contracts, React bindings, SSR handoff, and route adapters at the Next.js application edge.

framework

NestJS

Connect portable Playstack capabilities to dependency injection, guards, decorators, request context, workers, and lifecycle hooks.

integration

Redis

Use Redis for distributed caches, rate-limit counters, and BullMQ-backed jobs while keeping application policy portable.

framework

Cloudflare Workers

Run portable contracts in Web-standard runtimes with explicit Workers KV, R2, Queues and Durable Object adapters.

Package reference

@playstack/realtime

@playstack/realtime-react

@playstack/nest-realtime

@playstack/webrtc

@playstack/webrtc-react

@playstack/nest-webrtc

@playstack/auth

Keep three boundaries visible

Realtime channels carry application events and commands over persistent sockets. WebRTC signalling coordinates peer or SFU sessions. Media tracks, codecs, simulcast, and recording remain provider-native concerns. Combining all three produces an abstraction that is either too weak or quietly shaped like one vendor.

Authenticate sockets without credential URLs

ts
import { createRealtimeClient } from '@playstack/realtime'

const realtime = createRealtimeClient({
  url,
  getTicket: () => api.createRealtimeTicket(),
  protocolVersion: 1,
})

const unsubscribe = realtime.subscribe(
  `account:${accountId}`,
  handleAccountEvent,
)

The HTTP session mints a short-lived, single-use ticket. The socket presents it in the protocol handshake rather than a query string, and the server revalidates session expiry while the connection remains open.

Resume, then refetch

Channel events carry bounded cursors. A reconnect resumes from the last cursor while it remains in the server window; a larger gap tells the client to refetch over HTTP. Realtime never turns itself into an unbounded event store.

Declare media capabilities

ts
const session = await webrtc.createSession({
  topology: 'sfu',
  require: {
    simulcast: true,
    serverRecording: false,
    dataChannels: true,
  },
})

Unsupported requirements fail before provider calls. The planned packages will expose native clients for media operations while standardizing the session, signalling, and relay surfaces that genuinely repeat across providers.

Go

Playstack Pro tag
OriginsPricingBlogNewsletterChangelogStatusRoadmap
ContributorsCommunityIn Use ShowcaseCase StudiesPartnersSponsors
FAQsSupportContact

© 2026 Playstack. All rights reserved.

With OSS
Terms of ServicePrivacy PolicyCookie PolicyImprint

By

Commune Software