Inspiration

When a raid lands, a wave of new people arrives in the middle of a stream with no idea what is going on, and plenty of regular viewers never type anything at all. We wanted a viewer's very first message to matter: one small, obvious action that makes them part of something the whole chat finishes together.

What it does

RAID//RELAY is a cooperative rescue mission for Twitch chat, with a streamer dashboard and an OBS browser-source overlay.

  • AI mission director. The streamer picks a theme and the AI writes an original three-act rescue with two routes and two different endings. The streamer reviews the full script and publishes it. One generation scripts the whole mission; there is no model call per chat message or vote.
  • Three acts, real roles. Scouts type !scan to find the ship. The crew votes !route beacon or !route drift. Engineers !repair, then pilots !boost to tow it home. Each act needs different people, so one person spamming can't carry it.
  • Choices with consequences. Beacon needs more engineers, drift needs more pilots. One vote per account, editable until the timer ends. The winning route changes the coordination required and the ending.
  • Your name on stream. Every contribution shows the chatter's name on the overlay, and the crew roster grows as people join.
  • Raid onboarding. An incoming raid opens a 90-second boarding window that shows newcomers the one command that helps right now. Targets never go up, and nobody can pay for an advantage: no subs, Bits or channel points.
  • Streamer control. Launch, pause, resume or end at any time, and export a flight recorder of the run. Live telemetry shows real EventSub traffic and accepted commands.

How we built it

RAID//RELAY was built with OpenAI Codex in one main build session. Codex:

  • researched the event rules, Twitch API/EventSub documentation and earlier Twitch hackathon winners, and turned the judging criteria into a focused product direction;
  • wrote the deterministic TypeScript mission engine (sequential acts, distinct-person targets, editable one-account ballots, cooldowns, deduplication, pause and snapshot recovery);
  • built the React streamer dashboard, the original SVG orbital scene and the transparent OBS overlay;
  • implemented broadcaster OAuth and an EventSub WebSocket adapter that handles keepalive timeouts, session migration, revocation and bounded reconnects;
  • added the AI mission director with structured-output validation, explicit review/publish and a local cost guard;
  • wrote 83 automated tests, a compiled-production smoke test and a GitHub Actions pipeline that publishes a reviewer build.

Architecture: a local Express server is the single source of truth. Twitch EventSub (channel.chat.message and channel.raid, read-only user:read:chat scope) feeds the engine, and Server-Sent Events keep the dashboard and overlay in sync. The AI director uses Gemini 3.8 Flash with one bounded 3.5 Flash-Lite fallback; it only receives the theme and aggregate mission state, never raw chat or usernames.

Verified live: on a real Twitch channel over EventSub, 31 of 31 chat commands and votes were accepted end to end, and both routes were completed live (drift twice, beacon once), composited in OBS Studio.

Challenges we ran into

  • Fairness. Counting people instead of message volume: distinct contributors per act, one editable vote per account, cooldowns across roles, and deduplicated deliveries.
  • Real-world transport. EventSub sessions migrate, keepalives go missing and tokens get revoked. The adapter recovers where it safely can and reports clearly when it can't.
  • Keeping AI useful but bounded. The model writes the story; the engine owns every rule. Drafts stay private until the streamer publishes them.
  • OBS on a brand-new macOS. OBS 32 crashed on launch on macOS 27.2; OBS 33 plus disabling browser-source hardware acceleration fixed it.

Accomplishments that we're proud of

  • A complete live loop on Twitch: AI script → review → chat plays all three acts → route-specific ending.
  • Names on stream and a crew roster that make every first message visible.
  • 83 automated tests plus a production smoke test, all green in CI.

What we learned

The hardest part of participation is often the first useful action. A tiny, clear role gives a newcomer a way in, and complementary roles give regulars a reason to coordinate.

What's next for RAID//RELAY

Playtests with small streamers, more scenario templates, an optional OpenAI runtime model, and a cross-channel handoff where one stream's crew passes the mission to the channel it raids.

Built With

Share this project:

Updates

Submission history