Skip to content
boomboompower
← Projects

TECG

Live 31 May 2022 · React · TypeScript · Vite · Node.js


Overview

TECG generates and manages cookies that override Twitch’s internal experiment flags, letting a user opt in or out of A/B-tested UI features Twitch has not rolled out publicly yet. The tool carries an explicit disclaimer, since misusing experiment overrides can carry account risk on Twitch’s side.

Architecture

The frontend is a React single-page app, with cookie encode/decode logic isolated from the UI so the actual browser cookie manipulation stays in one place. A separate script fetches Twitch’s live experiment manifest from its CDN, diffs it against the previously stored data, and writes both the updated experiment list and a commit message summarizing the diff (added, removed, activated, and deactivated experiments) for automated commits to use.

Design Decisions

The diffing step deliberately avoids committing when only timestamps or build identifiers changed but the underlying experiment data was identical, to keep the commit history meaningful rather than noisy. A daily scheduled job runs the fetch-and-diff step and commits any real changes automatically, so the tool stays current without manual upkeep.

Challenges

The manifest and experiment-data endpoints are undocumented, so the fetch step is built against observed behavior rather than a published API, and the dedup logic used to filter out no-op changes has needed rework as edge cases in Twitch’s data format have surfaced over time.

What’s Next

The dedup heuristic used to detect no-op manifest changes is a known candidate for rework, since it currently relies on comparing specific fields rather than a more general diffing approach.

Visit TECG · Source