August 10, 2026
Streaming Assistant.
Frontend · BackendA YouTube Live bot that reads live chat, awards points to commenters, and turns them into Saweria-style OBS alerts.

Description
Streaming Assistant is a bot for YouTube Live that reads the live chat of any public channel, awards a point to each viewer who comments, and lets viewers spend those points on Saweria-style alerts shown in OBS via a !alert <message> command. It reads chat without any login or OAuth by using masterchat, so it only needs the live video URL or ID.
General reply commands and chat moderation are intentionally left to Nightbot, keeping the bot itself focused on reading chat, tracking points, and driving overlays.
Background
Point-and-alert engagement is popular on live streams, but most tooling either requires a paid service or full API access to the channel. I wanted a self-hosted alternative that could read chat from any public live stream without API keys or quota, and that could be run 24/7 on a small server.
Goal
Build a self-hostable engagement system that reads YouTube live chat without OAuth, maintains a configurable point economy, and renders donation-style alerts and overlays in OBS, all controllable from a single password-protected dashboard.
Features
- Reads the live chat of any public channel with no API key and no quota.
- Point system that awards points per comment (with a cooldown), command bonuses, and a leaderboard.
!alert <message>command that deducts points and shows an alert in OBS with custom image, sound, and TTS.- Neobrutalist OBS overlay with a one-at-a-time alert queue to prevent alerts from stacking.
- Additional OBS overlays for live chat, a compact live leaderboard, and a running ticker of recent alerts.
- Dashboard for monitoring, viewing the leaderboard, editing all rules, and editing alert templates with a Test Alert button.
- Nightbot integration exposing
!point/!rankreplies through$(urlfetch)endpoints, since the bot does not post to chat. - Optional Google login for viewers that matches their YouTube channel to their accumulated points, letting them view their balance and history and optionally redeem rewards from the web.
- Password-protected admin with session tokens persisted across restarts, and a separate HttpOnly cookie session for viewers.
Technologies
- Fastify backend on Node.js 22+ (uses the built-in
node:sqlitemodule) written in TypeScript masterchatfor reading live chat without login- SQLite for persistence, plus WebSocket for pushing alerts and updates to overlays
- React + Vite + Tailwind CSS dashboard (neobrutalist style)
- Zod for validation; Docker Compose and PM2 for deployment
How to Run
In development, run two processes: cd server && npm install && npm run dev starts the backend at http://localhost:4300, and cd dashboard && npm install && npm run dev starts the dashboard at http://localhost:4301. For production, everything runs on a single port (4300): build the dashboard, and the server serves the built assets directly. This can be deployed with Docker Compose (docker compose up -d --build) or with PM2 (pm2 start ecosystem.config.cjs). A tunnel such as cloudflared or ngrok can expose the local server publicly for Nightbot and remote viewers.
Technical Decisions
The chat reader sits behind a ChatReader interface so the unofficial masterchat backend can be swapped for the official YouTube Data API (with a key and quota) if needed. Persistence uses Node’s built-in node:sqlite, avoiding a native SQLite dependency at the cost of requiring a recent Node version. Because the bot deliberately does not post to chat, reply commands are delegated to Nightbot via simple $(urlfetch) endpoints. Admin and viewer authentication are kept completely separate: admin endpoints require a session token, while viewer identity is always derived from a server-side HttpOnly session and never from client-supplied data.
What I Learned
Working with an unofficial chat reader taught me to design around fragility, isolating it behind an interface so a single upstream change would not require rewriting the app. I also learned practical details of running a self-hosted service 24/7, from persisting session tokens across restarts to serving a built SPA from the same port as the API, and the real-world constraints of Google’s sensitive OAuth scopes when adding viewer login.
Notes
The repository is public. A screenshot or live preview may be added here later. A key caveat is that masterchat is unofficial and may break if YouTube changes its internal chat format, though the reader can be swapped to the official API. Additionally, viewer Google login relies on the youtube.readonly sensitive scope, so while the OAuth consent screen is in Testing it is limited to registered test users whose access expires weekly until Google verification is completed.

Hey! I’m Fanny, the software engineer tending to this digital garden. You can read more about me, or subscribe by email.