GameBot Platform
Multi-tenant Twitch + Discord bot · 2024–present
~270,000 LOC of Node.js. Cog-based architecture with 100+ live feature modules, hot-pluggable via filename extension. Runs 8+ isolated channel instances, each with its own credentials, data directory, and tenancy boundary.
- Built SIGUSR1 hot-reload for OAuth — eliminated PM2 restarts during 3-hour token-refresh cron (853 ms reload validated in prod).
- Automated rolling backups with disk-aware skip (refuses to write when disk > 90% or free < 512 MB).
- Per-tenant viewer harvesters keep each channel's data fully isolated from the main pool.
Node.jstmi.jsdiscord.js
PM2OAuth2cron
AI-Hub Masterbrain
12-model LLM router · 2026
Parallel-fanout LLM client. One call routes a prompt across Gemini, Groq, Mistral, Cerebras, Cohere, AI21, NVIDIA, Cloudflare Workers AI, HuggingFace, OpenRouter, and Anthropic — returns a synthesized best answer from the tournament.
- Auto-disables providers on auth failure with a 30-min cooldown; permanently-disabled list lives in env so bad keys don't bleed credits.
- 5 downstream engines (autopilot, idea-engine, OKR review, trend injector, competitor intel) unified through a single fallback chain.
- Runs free-tier-only by default — zero spend in baseline operation.
↗ CodeMulti-providerTournament synthesis
Prompt cachingBudget tracking
Community-Live Intelligence
Real-time presence + churn analytics · ongoing
Tracks 1,026,839 unique viewers. A 4-slice parallel scanner pages a 620k-channel pool against the Twitch Helix API in ~70 seconds using 15-account token rotation, then merges into a unified live board.
- Multi-process pipeline: presence agent → churn sampler → leaderboard builder → HTTP API on port 8700 with Server-Sent Events to a live dashboard.
- AI planner ranks engagement targets from relationship signals stored in
agent.state.json.
- Daily growth-pulse cron computes WoW/MoM deltas and writes a permanent JSONL log.
Twitch HelixSSE
JSONLParallel batching
Sovereign Loop
Autonomous 24/7 build + staging pipeline · 2026
Self-pacing loop where Masterbrain proposes code changes, a staging gate captures the diff, and a human-approval webhook ships it to live. Exposes a native MCP server (local stdio + bearer-gated HTTPS) so agents and the desktop client share one tool surface.
- Reliable-first model routing — falls through Gemini → Groq → Mistral → Cerebras → Cohere → AI21 on failure.
- OBS scene/source control and Railway log access integrated into the same agent loop.
MCPRailway
OBS WebSocketWebhooks