TypeScript · 2026

Codebam Stream

Browser-first multistreaming in early access: OBS pushes one signal in over WHIP, your own watch page is the program output, and the same signal leaves again as RTMPS to YouTube, Twitch, X, Kick and Telegram. Cloudflare Workers, Durable Objects, D1 and LiveKit underneath, prepaid hours on top.

Open the dashboard

Codebam Stream control room with one program feed and five relay destinations

The problem

Relay one live broadcast to five providers that each have their own stream key, rate limit and way of failing — while taking money for it in advance, and never letting a customer watch or push frames they have not paid for.

Architecture

  • WHIP ingest from OBS lands in LiveKit, which serves the browser watch page.
  • Provider relays are auxiliary outputs, each held by a Durable Object that owns its lifecycle.
  • Two channels of prepaid credit — destination-hours and browser viewer-hours — are allocated FIFO in D1 and reconciled per customer as usage accrues.

Highlights

  • Publisher epochs and relay generations fence every path, so a stale relay can never attach to a replacement broadcast
  • Resource-bound capabilities rather than ambient authority inside the Worker
  • Fail-closed relays and durable refund handling across 18k lines of tested TypeScript

Technology

TypeScript · durable-objects · livekit · rtmps

All selected work