Beam SaaS Ecosystem

Accounts, permissions, public streams, private streams, and multi-source sessions.

Beam now has a SaaS control layer over the relay protocol: users register into workspaces, receive roles and API keys, create public or private streams, attach sources, and manage layout metadata for multi-user publishing.

Identity

Use `POST /v1/auth/register`, `POST /v1/auth/login`, and `GET /v1/me` to manage dashboard users and workspace identity.

Permissions

Workspace roles are `owner`, `admin`, `producer`, `streamer`, and `viewer`. Stream management requires owner, admin, producer, or a workspace API key.

Visibility

Streams are `private` by default. Public streams appear through `GET /v1/streams/public`; private streams require a workspace token or join token.

Sources

Supported source metadata includes `screen`, `window`, `camera`, `microphone`, `game`, and `external` so a stream can represent desktop, browser, camera, or app-owned media.

Layouts

Layout metadata supports `single`, `horizontal`, `vertical`, `grid`, and `focus`, with source ids for multi-user or multi-device viewing surfaces.

Companion Model

The desktop companion has a Streams tab for dashboard handoff, visibility planning, source selection, and layout planning. The browser SDK covers web games, camera streams, canvas capture, and app-owned media streams.

Core Flow

POST /v1/auth/register
POST /v1/streams                 # visibility: public | private
POST /v1/streams/{id}/sources    # screen, camera, game, external
POST /v1/streams/{id}/layout     # horizontal, vertical, grid, focus
GET  /v1/streams/public          # public stream directory
GET  /v1/streams/realtime        # WebSocket signaling for browser publishers/viewers

Production Notes

  • The current implementation stores accounts in a local JSON data file so the VPS can run without a database dependency.
  • The browser SDK is served at /sdk/beam-stream.js so websites, apps, and games can integrate Beam without repo-local assets.
  • The media path is WebRTC signaling plus publisher/viewer peer connections; a future SFU/mixer can consume the same source and layout metadata.
  • Public stream discovery intentionally exposes stream metadata, not private join tokens.
  • Private streams are designed for dashboard/API workflows and external products that mint a join token server-side.