Inspiration
Every Twitch channel has inside jokes, nicknames, and lore that new viewers miss and longtime viewers forget. Those moments make a community feel like a community, but their context often disappears into chat history.
We built Canon to give that shared memory a home—a collection viewers can contribute to, streamers can manage, and everyone can revisit across streams. What it does Canon is a persistent lore keeper for a Twitch channel.
- Propose lore: !canon add term: definition submits an entry for review.
- Look up history: !canon term returns a saved definition.
- Rediscover a moment: !lore shares a random canonical entry.
- Make it official: redeem Canonize this with Channel Points to promote the latest proposal or submit new lore directly.
- Celebrate on stream: a transparent OBS overlay displays an animated CANONIZED reveal and a rotating lore ticker.
- Keep streamer control: a panel provides approval, rejection, searchable canon, and Twitch connection status. SQLite preserves entries across restarts. A clearly labeled offline rehearsal lets someone try the core workflow without Twitch credentials or an AI key. How we built it Canon uses Node.js, TypeScript, Fastify, better-sqlite3, and vanilla HTML/CSS/JavaScript. Local WebSocket connections push updates to the streamer panel and OBS overlay.
Twurple powers authenticated Twitch chat and EventSub over WebSocket for Channel Point redemptions, subscriptions, and incoming raids. The Canonize this integration receives actual Twitch redemption events and turns them into persistent lore and an on-screen reveal. Redemption receipts and lore changes commit together, preventing duplicate deliveries from canonizing another proposal.
We used OpenAI Codex as our pair programmer. Starting from our brief, Codex proposed the architecture and implemented the SQLite store, OAuth flows, EventSub engine, overlay, panel, and tests through small, step-labeled commits. We handled account setup, authorizations, and live testing, then worked with Codex to diagnose failures and refine the implementation.
We originally planned optional AI voice rewriting but chose to skip it. The persona editor is built; current replies remain plain text and make no OpenAI API calls. Challenges we ran into Twitch setup required careful coordination: Channel Points activation followed creator onboarding, OAuth callbacks needed an exact hostname and port match, and chat and broadcaster events required separate permissions.
Live testing also exposed a same-account bug: the bot ignored commands from its own account, which blocked testing when the broadcaster and bot shared a login. We corrected that behavior and added regression coverage.
Reliability brought its own challenges. We addressed temporary API failures, dropped EventSub connections, malformed messages, and database errors while keeping the local studio usable. When persistent storage cannot open, Canon clearly labels its temporary memory fallback rather than pretending changes are durable. Accomplishments that we're proud of We verified the central flow on a real Twitch channel: chat proposal → Channel Points redemption → saved canon → successful chat lookup.
We also verified streamer approval and persistence across restarts. Chat, the panel, and the overlay all use the same lore store.
Our 19-test suite includes forced EventSub disconnection and re-subscription, duplicate redemption handling, malformed commands, storage recovery, and a complete offline workflow. A fresh GitHub clone was installed and tested using .env.example without API credentials. What we learned Building the visible demo moment first gave us a concrete target for every integration. Once the overlay could celebrate a local entry, we could connect Twitch to that same flow.
We learned to distinguish a connected socket from a fully restored set of EventSub subscriptions, and to treat duplicate events as a product concern: one redemption should canonize one entry, once.
Working with Codex was most effective when we supplied precise behavior, tested it against a real channel, and used each failure to guide the next fix. What's next for Canon — Your channel remembers We want to add optional voice rewriting from the saved persona, richer moderation, and more ways to introduce newcomers to channel history.
Subscription and raid listeners are enabled, and their handlers have automated coverage, but their reactions still need real live-event testing.
Our next immediate step is recording the demo and preparing the submission. The core experience is already working: viewers can help write channel history, and Canon keeps it for the next stream.
Log in or sign up for Devpost to join the conversation.