How kernelpanic-studios/dropwatch works
Dropwatch is a background Twitch Drops and channel-points miner with a web dashboard. The workflow is: authenticate a Twitch account, run the mining service, refresh campaign and live-channel data, plan and watch eligible streams, claim rewards, persist activity, and expose status and controls through the dashboard. README capabilities also include priorities and pins, favourite-channel points and streaks, history, notifications, backups, and proxy checks. Several of these feature implementations were not excerpted; their subsystem nodes are retained from the repository tree, while uncertain connections are omitted. The reference Twitch implementation is shown separately from the main runtime.
Main entry points: runner.py Mining runner · app.py HTTP API · service.py Mining service · gql.py GraphQL operations
Components 29
Mining runtime
- Application entry
src/dropwatch/__main__.py - Mining service
src/dropwatch/service.py - Mining runner
src/dropwatch/runner.py - Campaign planner
src/dropwatch/planner.py - Runtime events
src/dropwatch/events.py
Twitch integration
- Twitch sign-in
src/dropwatch/twitch/auth_device.py - Campaign catalog
src/dropwatch/twitch/catalog.py - Twitch client
src/dropwatch/twitch/client.py - GraphQL operations
src/dropwatch/twitch/gql.py - Twitch PubSub
src/dropwatch/twitch/pubsub.py - Stream watching
src/dropwatch/twitch/watch.py - HTTP transport
src/dropwatch/twitch/transport.py - Twitch session
src/dropwatch/twitch/session.py
Persistence and operations
- Application store
src/dropwatch/store.py - Domain models
src/dropwatch/models.py - Notifications
src/dropwatch/alerts.py - Backup and restore
src/dropwatch/backup.py
API and dashboard
- HTTP API
src/dropwatch/api/app.py - API schemas
src/dropwatch/api/models.py - Dashboard API client
web/src/api/client.ts - Dashboard state
web/src/store.tsx - Dashboard routing
web/src/router.ts - Dashboard views
web/src/views - Twitch connect screen
web/src/screens/Connect.tsx - Dashboard icons
web/src/ui/Icons.tsx
Protocol reference
- Reference Twitch client
reference/fireph-webui/twitch.py
Other components
- Dropwatch operator
- Operator browser
- Twitch service
Connections 38
- Dropwatch operator → Operator browser: uses dashboard
README.md - Application entry → Mining service: starts
- Mining service → Mining runner: builds and runs
src/dropwatch/service.py - Mining service → Runtime events: publishes events
src/dropwatch/service.py - Mining service → Twitch PubSub: handles events
src/dropwatch/service.py - Mining service → Twitch client: builds parts
src/dropwatch/service.py - Mining service → Campaign catalog: builds parts
src/dropwatch/service.py - Mining runner → Campaign planner: plans campaigns
src/dropwatch/runner.py - Mining runner → Domain models: uses domain data
src/dropwatch/runner.py - Mining runner → GraphQL operations: fetches and claims
src/dropwatch/runner.py - Mining runner → Twitch PubSub: handles updates
src/dropwatch/runner.py - Mining runner → Runtime events: emits activity
src/dropwatch/runner.py - Mining runner → Application store: reads preferences
- Twitch client → GraphQL operations: queries
src/dropwatch/twitch/client.py - GraphQL operations → Twitch session: uses session
src/dropwatch/twitch/gql.py - GraphQL operations → HTTP transport: sends requests
src/dropwatch/twitch/gql.py - Twitch sign-in → Twitch session: creates session
src/dropwatch/twitch/auth_device.py - Twitch sign-in → HTTP transport: sends auth requests
src/dropwatch/twitch/auth_device.py - Dropwatch operator → Twitch sign-in: authorizes Twitch
README.md - Stream watching → Twitch service: watches streams
- Mining runner → Stream watching: assigns watchers
- Twitch client → Twitch service: requests Twitch data
- HTTP API → Application store: reads and writes
src/dropwatch/api/app.py - HTTP API → Mining runner: replans miner
src/dropwatch/api/app.py - HTTP API → Backup and restore: restores backup
src/dropwatch/api/app.py - HTTP API → API schemas: validates responses
src/dropwatch/api/app.py - HTTP API → Mining service: accesses service
src/dropwatch/api/app.py - Application store → Domain models: persists domain data
src/dropwatch/store.py - Application store → Twitch session: persists session
src/dropwatch/store.py - HTTP API → Notifications: configures notifications
- Operator browser → Dashboard API client: controls miner
- Dashboard API client → HTTP API: calls HTTP API
- Dashboard state → Dashboard API client: loads API data
web/src/store.tsx - Dashboard views → Dashboard state: renders state
web/src/views/Overview.tsx - Twitch connect screen → Dashboard API client: submits sign-in
web/src/screens/Connect.tsx - Dashboard views → Dashboard routing: uses routes
web/src/views/Overview.tsx - Dashboard views → Dashboard icons: renders icons
web/src/views/Overview.tsx - Reference Twitch client → Twitch service: informs protocol