Inspiration

Twitch chat is loud but rarely cooperative. Most chat games are one viewer vs. the bot. We wanted a tiny overlay that turns the whole chat into a party: everyone pitches in toward one shared goal, and the stream sees it happen live.

What it does

ChatQuest Overlay lets Twitch chat spawn short co-op quests that show up on stream as a transparent OBS browser-source HUD.

  • Start a quest: !quest starts a random quest; !quest combat|escort|puzzle|rescue|hack|raid|survival picks a type; !quest list shows the types in chat.
  • Join the party: !join adds the viewer to the party. Party members appear as chips on the overlay.
  • Roll toward the goal: !roll rolls a d6 that adds to a shared progress bar (a 6 is a crit with a dice flash). !progress reports status in chat; !quest stop ends it; !help lists commands.
  • Quest complete: when the bar fills, the bot announces the clear in chat and the overlay plays a celebration (confetti).
  • Twitch events boost quests: follows, subs and raids arrive over EventSub and start or boost the active quest (raid size is capped so one raid can't end every quest instantly). Missing scopes fail gracefully instead of crashing the bot.
  • Streamer-friendly: optional sound cues with a mute toggle, themed accents per quest type, and a /control/ deck so judges or streamers can click through a full quest offline with no Twitch account.

How we built it

  • Node.js + Express server that serves the overlay and broadcasts quest state over WebSockets.
  • tmi.js chat bot for Twitch IRC commands, plus a Twitch EventSub WebSocket client (wss://eventsub.wss.twitch.tv/ws) for channel.follow, channel.subscribe and channel.raid, with Helix lookups for broadcaster/moderator IDs.
  • A small quest engine (src/bot.js) that tracks the active quest, progress, party and recent rolls.
  • A plain HTML/CSS/JS overlay (public/overlay/) sized for a 1920×1080 transparent OBS Browser Source.
  • Mock mode (CHATQUEST_MOCK=1) and npm run smoke, which boots the server and runs a full quest lifecycle, also used in GitHub Actions CI.
  • The demo video shows it running on the real satrtools Twitch channel: chat sends !quest, !join and !roll, and the overlay updates in step until the quest completes.

How we used Codex

We used the OpenAI Codex CLI, signed in with a ChatGPT account (Session ID 01a179aa-98df-73c1-8ea9-9d7e68d89005, shown in the video).

  • In that session Codex explored the repo itself: it listed the files, read the README, src/bot.js, src/server.js, package.json and the overlay HTML/JS/CSS, then wrote an architecture summary of the server, quest engine, tmi.js bot and overlay.
  • It flagged that EventSub was missing and proposed the next step: an authenticated EventSub WebSocket listener for follow, subscribe and raid, each mapped to a quest-engine action and broadcast to the overlay, starting with one event type and adding reconnect handling first.
  • We built exactly that plan as the next commit ("Add EventSub WebSocket for follow, subscribe, and raid"), then followed with typed quests, the cinematic HUD, the control deck and CI.
  • Codex acted as a reviewer and planner inside the repo: reading real code, explaining it back, and setting the build order, which kept a weekend project focused on the features that matter on stream.

Challenges we ran into

  • EventSub follow and subscribe need extra token scopes (moderator:read:followers, channel:read:subscriptions); without them Twitch returns 403, so we made those subscriptions non-fatal and documented the scopes.
  • Recording a real on-Twitch demo from a headless box meant driving chat from a second IRC client so the bot sees the messages as real viewers.

Accomplishments we're proud of

  • A full chat-to-overlay quest loop working live on a real Twitch channel.
  • Judges can test it without Twitch at all through mock mode and the control deck.

What we learned

EventSub over WebSockets is a great fit for overlays (no public webhook server needed), and small, readable quest state makes a stream overlay easy to theme.

What's next

Channel-point redemptions as quest starters, per-viewer streak stats, and a streamer settings panel for goal sizes and boost caps.

Repo: https://github.com/barood-labs/chatquest · Demo: https://youtu.be/4KVKrxAF93o

Built With

Share this project:

Updates

Submission history