Open source • No API keys required • One-command deploy

Track TikTok Live
Gifts & Chat in Real Time

A self-hosted dashboard that captures every gift and chat message during a TikTok livestream — plus optional Whisper live transcription, audience snapshots, and engagement history. Persistent SQLite storage, auto-reconnect, multi-streamer support, and full historical data.

Screenshots

Illustrative captures with synthetic data only — no real TikTok usernames or live profile URLs.

Empty state: no tracked channels yet
Before you add a channel
Dashboard with gift feed, stream history, and top gifters
Gift feed, chat log, history, and leaderboard

Everything you need

Real-Time Tracking

Captures every gift the moment it's sent during a live stream via public TikTok WebSockets. No API keys or login required.

Permanent History

All data saved to SQLite with WAL mode. Browse every past stream, view gift breakdowns, and track all-time earnings. Survives container restarts.

Auto-Reconnect

When a stream ends, automatically reconnects with exponential backoff. Tracked users persist in the database and resume on container restart.

Multi-Streamer

Track multiple TikTok users simultaneously. Each streamer gets their own independent data with separate stream IDs and earnings.

Top Gifters

All-time leaderboard showing who donated the most, with gift counts, diamond totals, and visual progress bars.

Live Chat Logging

Captures all chat messages and emotes during a stream. Browse full chat logs for any past stream, with deduplication and clear controls.

Chat Translation

Auto-translate chat messages via LibreTranslate. Supports 49+ languages with auto-detection and a user-selectable target language dropdown.

AI Chat Analysis

Periodic AI-powered chat overviews during live streams via Ollama. Full stream summaries generated automatically when a stream ends.

Live Transcription

Optional Whisper-based transcriber (second Docker service, GPU-friendly). Per-stream transcripts in the dashboard; lines can be translated with the same LibreTranslate instance as chat.

Audience & Engagement

Live viewer counts, top viewers, recent joiners, and a participants panel (comments, gifts, shares). Viewer-count history is stored for charts and API access.

One-Command Deploy

Docker Compose with persistent volume mapping. Clone, run, done. Your data stays safe on your local drive.

Get started in 30 seconds

Requires Docker. No TikTok account or API keys needed.

1

Clone the repository

git clone https://github.com/chartmann1590/tiktok-live-gift-tracker.git
cd tiktok-live-gift-tracker
2

Optional: Configure chat translation

cp .env.template .env
# Edit .env and set LIBRETRANSLATE_URL to your LibreTranslate instance

Requires a self-hosted LibreTranslate instance. Skip this step if you don't need translation.

3

Optional: Configure AI chat analysis

# Add to .env
OLLAMA_BASE_URL=http://YOUR_OLLAMA_HOST:11434
OLLAMA_MODEL=llama3.2

Requires a running Ollama instance. Provides periodic AI chat overviews during live streams and full summaries when streams end. Skip if you don't need AI analysis.

4

Optional: Live transcription (Whisper)

# In .env (defaults are fine for many setups)
WHISPER_MODEL=medium
# TRANSCRIBER_URL is set for you in docker-compose when the transcriber runs

Full docker compose up -d starts the tiktok-transcriber service (Whisper) alongside the dashboard; it targets an NVIDIA GPU in the default compose file. For dashboard-only (no Whisper), run docker compose up -d tiktok-monitor. Transcript lines can use the same LibreTranslate settings as chat when configured.

5

Start the app

# Full stack (dashboard + GPU transcriber)
docker compose up -d

# Dashboard only (no Whisper)
docker compose up -d tiktok-monitor
6

Open the dashboard and start tracking

Open http://localhost:5000

Enter a TikTok @username who is currently live. The dashboard will begin tracking gifts immediately.

REST API

All data accessible via simple REST endpoints.

POST /api/listen Start tracking a user
DELETE /api/listen/<user> Stop tracking
GET /api/tracked All tracked users + stats
PUT /api/tracked/<user>/auto_transcribe Toggle auto-start transcription when live
GET /api/status/<user> Live/offline + stream id + watch link
GET /api/audience/<user> Live viewer count, top viewers, joiners
GET /api/audience/<user>/participants Engaged participants for a stream
GET /api/audience/<user>/viewers Viewer-count time series
GET /api/earnings/<user> Stream + historical + all-time
GET /api/gifts/<user> Gift feed (all or per-stream)
GET /api/streams/<user> All recorded streams
GET /api/top-gifters/<user> Top gifters leaderboard
GET /api/chat/<user> Chat messages (all or per-stream)
GET /api/chat/<user>/streams Streams with chat counts
DELETE /api/chat/<user> Clear chat logs
POST /api/translate Translate text (auto-detect)
GET /api/translate/languages Supported languages
POST /api/transcribe/<user> Start live transcription
DELETE /api/transcribe/<user> Stop transcription
GET /api/transcribe/status Active transcription (if any)
GET /api/transcripts/<user> Transcript lines (per stream)
GET /api/transcripts/<user>/streams Streams with transcripts
GET /api/summary/<user> AI live overview (current stream)
GET /api/summary/<user>/<stream> AI summary for a past stream

How it works

The app uses the TikTokLive library to connect to TikTok's public WebSockets. No authentication, API keys, or webhooks needed.

# Architecture overview

Flask (web server, main thread)
├── Serves the single-page dashboard
├── REST API endpoints for data queries
│
├── Background Thread #1 (asyncio event loop)
│   └── TikTokLiveClient("@user1") → GiftEvent + CommentEvent → SQLite INSERT
│
├── Background Thread #2 (asyncio event loop)
│   └── TikTokLiveClient("@user2") → GiftEvent + CommentEvent → SQLite INSERT
│
├── tiktok-transcriber (optional, Whisper HTTP service)
│   └── Transcript chunks → Flask → SQLite
│
└── SQLite (WAL mode) — gifts, chat, transcripts, audience samples