Inspiration

Twitch is most engaging when a livestream feels like a genuine conversation. This is especially true in Just Chatting, where the conversation itself is part of the content.

As a channel grows, meaningful questions can disappear within seconds between reactions, greetings, emotes, and repeated comments. Meanwhile, the streamer must speak, manage the broadcast, monitor technical issues, and follow a fast-moving chat simultaneously.

We created ChatPulse to solve these two problems:

  1. Valuable questions move too quickly to be noticed.
  2. Streamers cannot give full attention to both the broadcast and audience interaction.

ChatPulse turns chronological chat into a focused interaction workspace. It preserves important questions, summarizes current topics, and lets the streamer decide what to answer and when.

What it does

ChatPulse is a real-time audience-intelligence dashboard for Twitch streamers.

After connecting a Twitch account, ChatPulse:

  1. Authenticates the streamer through Twitch OAuth.
  2. Retrieves the authorized channel.
  3. Confirms that the channel is live.
  4. Receives real channel.chat.message events through EventSub.
  5. Analyzes recent messages in periodic batches.
  6. Identifies meaningful audience questions.
  7. Summarizes up to three prominent topics.
  8. Prioritizes questions using validity, priority, and recency.
  9. Lets the streamer pin, answer, skip, or filter messages.
  10. Displays the broadcast through the Twitch Embedded Player.

Viewers participate normally through Twitch chat. They do not need to install anything or learn special commands.

The dashboard contains three coordinated views:

  • Topic Radar shows what the community is discussing.
  • Question Queue captures meaningful questions before they disappear.
  • Live Stream displays the current broadcast beside the interaction tools.

When the streamer is ready to respond, they pin a question to Spotlight, keep it visible while answering, and then mark it as Answered or Skipped.

Non-question messages are hidden by default to reduce distraction, but the streamer can reveal them using the Show non-questions filter.

This gives the streamer one focused workspace for monitoring the broadcast, understanding the community, and managing audience questions.

How we built it

We began with a product requirements document defining the user journey, system boundaries, Twitch integration, data model, reliability requirements, and human-in-the-loop principles.

With OpenAI Codex, we organized ChatPulse into three layers.

Twitch integration

The FastAPI backend uses:

  • Twitch OAuth to authorize the streamer securely.
  • Twitch Helix Users API to retrieve the authorized channel.
  • Twitch Helix Streams API to confirm that the channel is live and retrieve stream information.
  • Twitch EventSub WebSocket to receive real chat messages.
  • Twitch Embedded Player to display the broadcast inside ChatPulse.

The EventSub service handles reconnect instructions, token refresh, subscription revocation, network interruptions, and automatic reconnection with exponential backoff.

Every message preserves its Twitch message ID, viewer identity, text, and timestamp. Duplicate events are ignored, and messages are stored in a bounded in-memory buffer.

OAuth credentials remain on the backend and are never exposed to the React application.

Audience analysis

ChatPulse analyzes messages in batches instead of making one model request per message.

Qwen has two responsibilities:

  1. Classify whether a message is a meaningful, answerable question.
  2. Summarize up to three prominent discussion topics.

The model does not answer viewers, post to Twitch, or control what appears publicly.

Questions are ordered using:

Validity → Priority → Recency

Chat messages are treated as untrusted data. Every ID returned by the model is validated against the input batch, and unsupported references are rejected. This ensures that all displayed topics and questions remain grounded in messages ChatPulse actually received.

The model determines meaning, while deterministic backend logic handles authentication, deduplication, ordering, validation, state transitions, and failure recovery.

Streamer dashboard

The React and TypeScript dashboard lets the streamer:

  • Track the active broadcast.
  • Review current discussion topics.
  • Pin a question to Spotlight.
  • Mark a question as answered.
  • Skip an unsuitable question.
  • Show or hide non-question messages.
  • Disconnect Twitch.

Stable question identifiers preserve Pin, Answered, and Skip states across analysis refreshes.

Real and demo modes

ChatPulse has two explicitly separated modes.

Real Twitch mode is the default:

Twitch OAuth
→ Helix APIs
→ EventSub
→ Real chat messages
→ Audience analysis
→ Streamer dashboard

An opt-in Demo Mode provides simulated authorization, scripted messages, deterministic stream selection, and a local video for repeatable recordings.

Demo Mode does not replace or modify the real Twitch backend, and simulated messages are clearly identified as simulated.

How we used Codex

We used OpenAI Codex throughout development to:

  • Structure the product requirements.
  • Design the system architecture.
  • Implement the FastAPI and React applications.
  • Build Twitch OAuth and EventSub integration.
  • Diagnose WebSocket and reconnection issues.
  • Design grounded prompts and typed model schemas.
  • Preserve streamer actions across analysis refreshes.
  • Create automated tests.
  • Improve error handling, documentation, and the demo workflow.

Codex helped us move quickly across product design, backend networking, frontend interaction, testing, and documentation while keeping responsibilities clearly separated.

Challenges we faced

Reliable Twitch authentication

Twitch authentication involves OAuth state validation, token exchange, token validation, user lookup, live-stream lookup, EventSub session creation, and subscription registration.

Each step has different failure conditions and must fail safely without exposing credentials.

Resilient EventSub connections

EventSub connections can be interrupted, redirected to a new reconnect URL, or revoked. We implemented explicit connection states, token refresh, visible error reporting, and automatic reconnection with exponential backoff.

Grounding model output

Chat may contain spam, prompt-injection attempts, or malformed content. We treat chat strictly as data and validate every model-returned message ID against the original input.

Grounding is therefore enforced by application logic, not only requested in the prompt.

Preserving streamer decisions

A new analysis cycle must not erase questions the streamer has pinned, answered, or skipped. Stable identifiers allow updated analysis to be applied while preserving those states.

Building a repeatable demo

Live chat is unpredictable, but a Hackathon demonstration must be reproducible. We added an explicit Demo Mode while keeping real Twitch integration as the default and fully testable path.

What we learned

We learned that the most valuable AI feature is not always generation. In a livestream, AI is most useful when it reduces noise without taking control away from the creator.

A trustworthy system must:

  • Stay grounded in real Twitch events.
  • Preserve viewer attribution.
  • Handle network and model failures gracefully.
  • Make classifications understandable.
  • Let the streamer override every recommendation.
  • Never speak publicly on the streamer’s behalf.

Most importantly, chronological order is not the same as human importance. A thoughtful question should not lose its value simply because newer messages arrived.

ChatPulse gives streamers enough time to notice, consider, and respond—helping fast-moving chat become a more meaningful conversation.

Built With

Share this project:

Updates

Submission history