MomentMint
Inspiration
Great Twitch moments are often recognized by the community before the streamer notices them. Viewers react in chat, but after a stream, creators still have to search through long VODs, remember timestamps, create clips, and write captions manually.
We built MomentMint around a simple idea: the community should help discover memorable moments, while the creator remains in control of what becomes a clip and what gets shared.
What it does
MomentMint turns Twitch chat reactions into an organized highlight inbox.
During a stream, viewers type !moment to nominate something memorable. MomentMint receives those nominations through Twitch EventSub, groups nearby nominations into one candidate, and counts distinct viewers so repeated messages from one person cannot artificially inflate the signal.
From the dashboard, the streamer can:
- Review moments grouped by broadcast
- See nomination counts and clip status
- Confirm or retry Twitch clip creation
- Wait for Twitch to verify that a clip is ready
- Generate AI-assisted titles, summaries, categories, and social captions
- Edit the AI suggestions before sharing
- Mark moments as reviewed or dismissed
MomentMint never automatically publishes to social media. The community provides the signal, AI helps with packaging, and the creator makes the final decision.
How we built it
MomentMint is built as a React and TypeScript application backed by Cloudflare Workers and Hono.
The main technology stack includes:
- React, Vite, TypeScript, TanStack Query, and Tailwind CSS
- Cloudflare Workers for the API and application runtime
- Cloudflare D1 as the durable database
- Cloudflare Queues for asynchronous processing and retries
- Twitch OAuth, EventSub, and Helix APIs
- Cloudflare Workers AI using GPT-OSS
- Vitest for unit and integration testing
The workflow begins with Twitch OAuth. Once connected, MomentMint registers an EventSub subscription for chat messages. Incoming webhooks are verified using Twitch signatures, protected against replayed or duplicate events, and placed into a durable queue.
The queue consumer groups nominations by broadcast and time window, counts unique viewers, and creates a candidate moment. Clip creation is intentionally creator-confirmed and asynchronous. MomentMint does not mark a clip as ready until Twitch confirms it through the Get Clips API.
For AI metadata, we provide only limited, explicitly available context such as the stream title, category, approximate timestamp, nomination count, optional creator notes, and opt-in community context. The model is clearly instructed that it has not watched the video. Generated metadata is validated, editable, and replaced with safe fallback content if AI is unavailable or produces unsupported claims.
We also used OpenAI Codex throughout development to help plan the architecture, implement the workflow, test edge cases, and strengthen the reliability and security boundaries.
Challenges we ran into
One of the biggest challenges was Twitch’s asynchronous clip lifecycle. Creating a clip does not immediately mean that a verified clip is available. The live VOD may still be catching up, and Twitch may take time to return the final clip details. We solved this with explicit clip states, bounded retries, queue-based processing, and verification through Twitch’s API.
Another challenge was timestamp accuracy. Twitch chat events provide an approximate event time rather than an exact video playhead position. Instead of pretending to know the precise frame, MomentMint treats the timestamp as an approximate anchor and gives the creator access to Twitch’s editing flow.
We also had to carefully handle duplicate messages, webhook retries, replay protection, and distinct-viewer counting. These details are important because a highlight signal should reflect independent community interest rather than message spam.
Finally, AI required strong guardrails. A language model should not invent what happened in footage it never saw. We added grounded prompting, schema validation, unsupported-claim checks, evidence notices, editable fields, privacy limits, and deterministic fallback metadata.
Accomplishments that we're proud of
We are proud to have built a complete Twitch-to-dashboard workflow rather than a standalone mockup.
Some highlights include:
- Real Twitch OAuth and EventSub integration
- Secure server-side handling of Twitch tokens
- Verified webhook signatures and replay protection
- Broadcast-aware grouping of community nominations
- Distinct-viewer counting and duplicate protection
- Durable asynchronous processing with Cloudflare Queues
- Retryable Twitch clip creation and verification
- Creator-controlled review and sharing
- AI-generated metadata that remains editable and transparent
- Safe fallback behavior when Twitch or AI fails
- Short-lived, creator-scoped community context
- A dashboard that exposes truthful processing states instead of hiding failures
Most importantly, a failure in clip creation or AI generation does not erase the original community nomination. The creator’s workflow and data remain intact.
What we learned
We learned that building a reliable integration is about much more than calling an API. External services have asynchronous states, retries, permission boundaries, rate limits, and partial failures that must be represented clearly in the product.
We also learned that AI is most useful when it is given a well-defined role. MomentMint does not ask AI to decide whether a moment is good or pretend to understand video it has not seen. Instead, it uses AI for a narrower task: helping the creator turn known evidence into editable metadata.
Most importantly, we learned that automation should support creator judgment rather than replace it. The community can surface what deserves attention, but the streamer should remain the final editor and publisher.
What’s next for MomentMint
Next, we want to make MomentMint more useful throughout the entire creator workflow.
Planned improvements include:
- More accurate clip positioning and richer Twitch clip controls
- Stronger live validation across different channel sizes and chat patterns
- Better community-reaction summaries and evidence explanations
- Optional integrations for publishing approved clips to social platforms
- Clip collections, tags, search, and post-stream analytics
- Collaboration features for streamers who work with editors
- Smarter personalization based on each creator’s review history
- Additional safeguards against spam, prompt injection, and misleading metadata
The long-term vision is for MomentMint to become a trusted post-stream workspace where a creator can quickly see what their community valued, turn those moments into polished clips, and stay in control of every step.
Built With
- api
- cloudflare
- codex
- hono
- react
- twitch
- typescript
- vite