01 // real-time systems
TikTok Live Listener
- Python
- WebSockets
- Reverse Engineering
→ The Problem
I wanted stream interactions to do something — likes, gifts, follows — but every existing solution relied on paid third-party APIs or closed services. I wanted full control, zero cost, and no dependencies.
→ The Approach
Reverse-engineer TikTok's live WebSocket protocol directly. That meant understanding the handshake, the binary packet format, and the event payloads — by studying the network traffic, not the docs.
→ Architecture
A listener daemon captures events and normalizes them into a clean event bus. A WebSocket server then broadcasts those events to any connected client — including HTML5 games.
→ The Build
Hardest parts: parsing binary packets, keeping the connection alive with heartbeats, and reconnecting gracefully when the stream drops. Each challenge became a reusable pattern.
→ The Result
Likes spawn monsters · gifts trigger boss waves · follows and shares broadcast live to any game via WebSocket. It runs in real time with no API costs.







