~/projects/twick

Twick - Audience Simulator 🚀

An AI chat for practicing streaming before going live.

Astro 5 ★ — — commits updated —

Twick is a full-stack platform I am building from scratch. The idea is simple: configure an AI-generated simulated chat so new streamers can practice responding, improvising, and keeping a conversation moving while they play.

I started it after realizing that live streaming is not as easy as simply turning on a camera and playing. Games are a major source of inspiration for me, so Twick became a way to explore that world through my own tool while understanding the commitment involved in serving an audience.

The project generates contextual messages for the selected game and streams them in real time to simulate an active audience. It can be tested by signing in with Google, Twitch, or GitHub through Clerk authentication.

## Stack & decisions

  • Server-Sent Events (SSE) — I implemented real-time streaming with ReadableStream and TextEncoder to send messages to the client every few seconds without constant polling.
  • Strategy pattern + failover — I designed a layer that switches between AI providers such as Groq and Cerebras without changing consumer code. If one fails, the system can try the next.
  • Clerk Authentication — I integrated authentication with a dark theme, route-protection middleware, and a dynamic CSP for development and production.
  • In-memory cache — I added a Map-based cache to reuse game phrases and reduce unnecessary calls to AI providers.

## What I built

  • I built SSE message streaming and added AbortSignal cleanup when the client closes the connection.
  • I organized AI-provider connections to avoid unnecessary clients and detect missing API keys early.
  • I adjusted application security so Clerk and external resources work correctly in development and production.
  • Twick is helping me practice complete product development: backend, authentication, UX/AI, and turning a personal need into a tool.

## Keep exploring

view all ↗
🎮

A Twitch clone built to practice React, Astro, and real API integrations.

Astro
React
Tailwind
🚨

A recreation of the scroll effect from Rockstar Games' official website.

Astro
Tailwind