# 🌟 Twitch Drops Miner (TDM)
> 🎮 **Automate Twitch Drop Farming — Effortlessly, Headlessly, and Bandwidth-Free**
A modern, AI-assisted fork of [DevilXD/TwitchDropsMiner](https://github.com/DevilXD/TwitchDropsMiner) — rebuilt for reliability, simplicity, and automation.
**Twitch Drops Miner** lets you automatically farm Twitch drops without ever opening a stream.
No more tab juggling, channel switching, or missing rewards — just set it, forget it, and collect.
---
## ✨ Features
- 🚀 **Streamless Mining** — Earn drops without streaming video by sending Twitch GraphQL watch events
- 🔍 **Automatic Campaign Discovery** — Detects new drop events automatically
- ⚙️ **Auto Channel Switching** — Always mines the best available stream
- 💾 **Persistent Login** — OAuth login saved via cookies
- 🕹️ **Simple Web UI** — Manage everything from your browser
- 🛡️ **Safe Frontend Rendering** — Dynamic UI content is rendered with DOM APIs to avoid HTML injection
- 🧩 **Docker-Ready** — One command to deploy anywhere
---
## 🧰 Quick Start (Docker Recommended)
### 🐳 Using Pre-Built Image (Docker run)
```bash
docker pull rangermix/twitch-drops-miner:latest
docker run -d -p 8080:8080 -v $(pwd)/data:/app/data rangermix/twitch-drops-miner:latest
```
### 📦 Using Docker Compose
```yaml
services:
twitch-drops-miner:
image: rangermix/twitch-drops-miner:latest
ports:
- "8080:8080"
volumes:
- ./data:/app/data
# optional, use if you want to persist logs
- ./logs:/app/logs
environment:
# Set timezone (optional, defaults to UTC)
- TZ=Australia/Sydney
restart: unless-stopped
```
### 🧑💻 From Source (for Developers)
```bash
uv sync
uv run main.py
```
Visit 👉 ****
---
## 🌈 Using the Web App
1. Open `http://localhost:8080`
2. Login with your Twitch account (OAuth device flow)
3. The miner auto-fetches available campaigns
4. Select games you want to farm, or type a custom game and click **Add Game** → click **Reload**
5. TDM starts mining drops automatically 🎉
📝 **Tip:**
Make sure your Twitch account is linked to your game accounts →
👉 [https://www.twitch.tv/drops/campaigns](https://www.twitch.tv/drops/campaigns)
---
## ⚠️ Notes & Warnings
> ⚠️ **Avoid Watching on the Same Account**
> Watching Twitch manually while the miner runs can cause progress desync.
> Use a different account if you want to watch live streams while mining.
> 💡 **Requirements**
> Python 3.12+
> Docker optional but recommended
> Persistent data stored in `/data`
---
## 🖼️ Screenshot

> A clean, modern web UI lets you control everything from your browser.
---
## 💖 Support the Project
If TwitchDropsMiner saves you time or bandwidth, please consider supporting continued development:
[](https://buymeacoffee.com/rangermix)
⭐ **Star this repo** → it really helps visibility!
💬 [Open an issue](../../issues) or [submit a PR](../../pulls) if you want to contribute.
You can also support the original author [@DevilXD](https://github.com/DevilXD):
👉 [buymeacoffee.com/DevilXD](https://www.buymeacoffee.com/DevilXD) or [Patreon](https://www.patreon.com/bePatron?u=26937862).
---
## 🎯 Project Goals
| Goal | Description |
|------|--------------|
| 🎯 **Focus** | Twitch Drops automation |
| 🧩 **Ease of Use** | Simple web UI |
| 🛡️ **Reliability** | Designed for continuous operation |
| ⚙️ **Efficiency** | Minimal API calls, Twitch-friendly |
| 🐳 **Deployment** | Docker-first, headless operation |
---
## 🙏 Acknowledgments
This project is a fork of the brilliant [TwitchDropsMiner](https://github.com/DevilXD/TwitchDropsMiner) by [@DevilXD](https://github.com/DevilXD).
Huge thanks to DevilXD and all contributors who built the foundation.
For detailed translation and contribution credits, see [Acknowledgments](#original-project-credits) below.
---
## 🧾 Disclaimer
> ⚙️ This fork is heavily maintained and developed using AI-assisted coding (Claude Code).
> While stable, the codebase reflects “vibe coding” patterns — always review changes before deployment.
> Use responsibly.
---
## 🧑💻 Original Project Credits
@guihkx - For the CI script, CI maintenance, and everything related to Linux builds.
@kWAYTV - For the implementation of the dark mode theme.
@Bamboozul - For the entirety of the Arabic (العربية) translation.
@Suz1e - For the entirety of the Chinese (简体中文) translation and revisions.
@wwj010 - For the Chinese (简体中文) translation corrections and revisions.
@zhangminghao1989 - For the Chinese (简体中文) translation corrections and revisions.
@Ricky103403 - For the entirety of the Traditional Chinese (繁體中文) translation.
@LusTerCsI - For the Traditional Chinese (繁體中文) translation corrections and revisions.
@nwvh - For the entirety of the Czech (Čeština) translation.
@Kjerne - For the entirety of the Danish (Dansk) translation.
@roobini-gamer - For the entirety of the French (Français) translation.
@Calvineries - For the French (Français) translation revisions.
@ThisIsCyreX - For the entirety of the German (Deutsch) translation.
@Eriza-Z - For the entirety of the Indonesian translation.
@casungo - For the entirety of the Italian (Italiano) translation.
@ShimadaNanaki - For the entirety of the Japanese (日本語) translation.
@Patriot99 - For the Polish (Polski) translation and revisions (co-authored with @DevilXD).
@zarigata - For the entirety of the Portuguese (Português) translation.
@Sergo1217 - For the entirety of the Russian (Русский) translation.
@kilroy98 - For the Russian (Русский) translation corrections and revisions.
@Shofuu - For the entirety of the Spanish (Español) translation and revisions.
@alikdb - For the entirety of the Turkish (Türkçe) translation.
@Nollasko - For the entirety of the Ukrainian (Українська) translation and revisions.
@kilroy98 - For the Ukrainian (Українська) translation corrections and revisions.