Inspiration
Cybersecurity concepts are often presented as dry lectures, static quizzes, or one-way tutorials. Live streaming offers an exciting opportunity to make security defensive decisions social, fast-paced, and intuitive. We built Chat vs. The Vault to turn Twitch chat into a collaborative incident response team where the streamer hosts, an active cyber incident unfolds, and chat votes in real time to protect the vault.
What it does
Chat vs. The Vault is an interactive live-stream challenge where Twitch audience members collectively defend a critical vault against cybersecurity threats:
- Streamer Dashboard & Live Controls: The streamer controls sessions, difficulty tiers, scenario cadence, and emergency controls.
- OBS Browser Overlay: A dedicated browser source HUD dynamically displays Vault Integrity, active incident evidence, live vote tallies, and round timers directly to the stream.
- Audience Participation: Viewers join via Twitch chat with
!joinand cast votes on defensive actions (!vote A,!vote B,!vote C). - Deterministic Resolution & AI Generation: Uses a built-in library of practical security scenarios (covering phishing, token leaks, ransomware, DDoS, and credential stuffing) with optional OpenAI structured generation via the Responses API.
How we built it
- Full Build with OpenAI Codex: Every core component—from the dependency-free Node.js backend to the EventSub listeners, SSE pub/sub engine, and frontend HUD—was generated and orchestrated using OpenAI Codex.
- Dependency-Free Node.js Core: Built with zero external npm runtime dependencies, leveraging native Node.js HTTP, SSE (Server-Sent Events), and crypto APIs for maximum resilience and auditability.
- Twitch Integration: Leverages Twitch OAuth Authorization Code flow for streamer verification and Twitch EventSub WebSockets for real-time chat command ingestion.
- Automated Verification: Comprehensive end-to-end integration test suite verifying session lifecycles, duplicate-vote prevention, answer secrecy, and deterministic terminal states.
Challenges we ran into
Handling high-volume chat messages while guaranteeing zero race conditions and preventing duplicate votes within rapid 30-to-60 second voting windows required a strictly server-authoritative state machine. We ensured the ground truth resides entirely on the Node.js server.
Accomplishments that we're proud of
- Zero-dependency runtime architecture that starts instantly and runs anywhere.
- Seamless dual-mode support: operates with live Twitch EventSub chat or with an integrated labeled local simulator for offline rehearsals.
- 100% code coverage on core game flow tests generated via Codex.
What we learned
Building interactive stream games with OpenAI Codex highlighted how structured schema generation and strict validation create rock-solid stream experiences that won't crash mid-broadcast.
What's next for Chat vs. The Vault
- Twitch Extension panel for inline one-click voting without chat spam.
- Dynamic threat branches where previous decisions influence subsequent rounds.
- Community leaderboards and Twitch Channel Points integration.
Built With
- css3
- html5
- javascript
- node.js
- openai-codex
- server-sent-events
- twitch
- twitch-eventsub