RaidBridge

Twitch moves the audience. RaidBridge makes the arrival feel human.

A Twitch raid moves viewers instantly, but it does not introduce two communities. One room suddenly becomes two groups finding their footing. RaidBridge owns that transition: it turns the first 90 seconds after a raid into a streamer-approved welcome that helps raiders and regulars connect without taking control away from the host.

The experience

  1. Twitch EventSub reports an incoming channel.raid event.
  2. RaidBridge validates the event, recipient, timestamp, provenance, and duplicate state.
  3. A private proposal appears in the streamer control deck.
  4. The streamer can review or edit the context and shared prompt, then approve, skip, or abort.
  5. Nothing appears publicly before approval.
  6. After approval, the OBS Browser Source runs a bounded four-stage ritual:
    • Arrival — 15s: who raided and how many viewers arrived
    • Context — 20s: host-approved receiving-stream context
    • Bridge — 40s: one lightweight shared action for raiders and regulars
    • Welcome — 15s: clean completion and return to the stream

The sequence ends after exactly 90 seconds or immediately on abort.

Why it matters

Most Twitch interaction tools try to create more activity. RaidBridge solves a narrower social problem: how two communities become one room after a raid.

The host stays in control, the public overlay stays quiet until approved, and the experience gets out of the way when the introduction is complete.

A raid should feel like two communities meeting, not one audience interrupting another.

Twitch integration and evidence

RaidBridge uses:

  • Twitch OAuth authorization-code flow
  • Twitch EventSub WebSocket transport
  • channel.raid v1
  • selective Twitch Helix metadata
  • OBS Browser Source for the public experience

Verified during the hackathon:

  • Genuine Twitch OAuth identity validation for @mikehunter77: PASS
  • Genuine production EventSub WebSocket connection: PASS
  • Genuine production channel.raid subscription creation: PASS
  • Official Twitch CLI WebSocket channel.raid simulation through the full RaidBridge path — private proposal → host approval → read-only overlay: PASS
  • The official CLI event is visibly and persistently labeled simulated and is never presented as a genuine viewer raid
  • TypeScript build: PASS
  • Automated tests: 40/40 PASS
  • npm audit vulnerabilities: 0
  • Private pre-approval overlay invisibility: PASS
  • Live-mode synthetic injection rejection: PASS

A genuine account-to-account viewer raid is not claimed unless separately observed. RaidBridge deliberately distinguishes production provider connectivity, official Twitch test simulation, and local rehearsal.

Trust and reliability

Anything that appears on a live broadcast needs to be predictable. RaidBridge therefore treats public output as a privileged side effect:

  • no public render before host approval
  • no raw Twitch chat ingestion or automatic rendering
  • idempotent duplicate EventSub handling
  • fail-closed malformed, stale, future-dated, and wrong-recipient events
  • bounded overlapping-raid behavior instead of an unlimited queue
  • expiring host approval
  • immediate abort
  • server-side Twitch credentials and tokens
  • separate live / official-test / rehearsal provenance
  • no silent live → synthetic fallback

Built with OpenAI Codex

OpenAI Codex was the primary implementation agent. I used it to research Twitch OAuth and EventSub behavior, implement the TypeScript raid engine and deterministic state machine, build the WebSocket lifecycle, harden trust boundaries, create the host control deck and OBS overlay, reconcile conflicting interfaces under a one-writer rule, remediate dependencies, and build the test/documentation loop.

Primary Codex session ID: 01a18985-46db-7cd3-9564-24c9d10ec4ad

Repository

The public repository contains the source code, setup instructions, architecture, tests, and public-safe evidence screenshots:

https://github.com/michaelhuntertv7-ops/raidbridge

Current scope

The hackathon build is intentionally local and optimized for a single receiving streamer/session. It does not require a persistent database. The project stays small by design: one Twitch-native moment, handled well.

Built With

  • node.js
  • obs-browser-source
  • openai-codex
  • playwright
  • twitch-eventsub
  • twitch-helix
  • twitch-oauth
  • typescript
  • vitest
  • websocket
Share this project:

Updates

Submission history