# xisz/twitch-channel-points-miner-v2 architecture

> Architecture diagram of the GitHub repository xisz/twitch-channel-points-miner-v2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/xisz/twitch-channel-points-miner-v2
- Repository: https://github.com/xisz/twitch-channel-points-miner-v2

## Overview

Twitch Channel Points Miner is a configured Twitch account automation script. The user supplies streamer and behavior settings; the miner authenticates with Twitch, monitors streams and channel events, and claims points, drops, moments, and raid rewards, while optionally placing predictions and reporting activity through logs, analytics, and notifications. The graph includes documented capabilities even where their implementation was not excerpted; relationships among those unsampled parts are left out when the available evidence does not establish the caller.

Main entry points: [`TwitchChannelPointsMiner/TwitchChannelPointsMiner.py`](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/TwitchChannelPointsMiner.py) (Miner orchestrator), [`TwitchChannelPointsMiner/logger.py`](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/logger.py) (Logging and reports), [`TwitchChannelPointsMiner/classes/Twitch.py`](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Twitch.py) (Twitch client), [`TwitchChannelPointsMiner/classes/entities/Streamer.py`](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/entities/Streamer.py) (Streamer state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Miner runtime"]
  node_miner["Miner orchestrator"]
  node_settings["Runtime settings<br/>[Settings.py]"]
end

subgraph group_twitch["Twitch interaction"]
  node_twitch_client["Twitch client<br/>[Twitch.py]"]
  node_login["Twitch login<br/>[TwitchLogin.py]"]
  node_websocket_pool["Event connections<br/>[WebSocketsPool.py]"]
  node_irc_chat["IRC chat<br/>[Chat.py]"]
end

subgraph group_domain["Stream behavior"]
  node_streamer["Streamer state<br/>[Streamer.py]"]
  node_bet["Prediction strategy<br/>[Bet.py]"]
  node_campaign["Drop campaigns<br/>[Campaign.py]"]
  node_drop["Drop claims<br/>[Drop.py]"]
  node_community_goal["Community goals<br/>[CommunityGoal.py]"]
end

subgraph group_observability["Reporting and notifications"]
  node_analytics["Analytics server<br/>[AnalyticsServer.py]"]
  node_logger["Logging and reports<br/>[logger.py]"]
  node_discord["Discord notifier<br/>[Discord.py]"]
  node_gotify["Gotify notifier<br/>[Gotify.py]"]
  node_matrix["Matrix notifier<br/>[Matrix.py]"]
  node_pushover["Pushover notifier<br/>[Pushover.py]"]
  node_telegram["Telegram notifier<br/>[Telegram.py]"]
  node_webhook["Webhook notifier<br/>[Webhook.py]"]
end

node_user(("Miner operator"))
node_twitch_service(("Twitch"))
node_notification_services(("Notification services"))

node_user -->|"configures and starts"| node_miner
node_miner -->|"uses settings"| node_settings
node_miner -->|"coordinates"| node_twitch_client
node_twitch_client -->|"authenticates through"| node_login
node_twitch_client -->|"sends API requests"| node_twitch_service
node_miner -->|"manages connections"| node_websocket_pool
node_websocket_pool -->|"claims bonus"| node_twitch_client
node_websocket_pool -->|"updates event state"| node_streamer
node_streamer -->|"manages chat"| node_irc_chat
node_irc_chat -->|"joins IRC"| node_twitch_service
node_streamer -->|"holds betting settings"| node_bet
node_twitch_client -->|"loads campaigns"| node_campaign
node_campaign -->|"uses drop data"| node_drop
node_miner -->|"starts analytics"| node_analytics
node_miner -->|"configures logging"| node_logger
node_logger -->|"sends notifications"| node_discord
node_logger -->|"sends notifications"| node_gotify
node_logger -->|"sends notifications"| node_matrix
node_logger -->|"sends notifications"| node_pushover
node_logger -->|"sends notifications"| node_telegram
node_logger -->|"sends notifications"| node_webhook
node_discord -->|"notifies"| node_notification_services
node_gotify -->|"notifies"| node_notification_services
node_matrix -->|"notifies"| node_notification_services
node_pushover -->|"notifies"| node_notification_services
node_telegram -->|"notifies"| node_notification_services
node_webhook -->|"sends HTTP request"| node_notification_services
node_miner -->|"tracks streamers"| node_streamer
node_twitch_client -.->|"handles goal data"| node_community_goal

click node_miner "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/TwitchChannelPointsMiner.py"
click node_settings "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Settings.py"
click node_twitch_client "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Twitch.py"
click node_login "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/TwitchLogin.py"
click node_websocket_pool "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/WebSocketsPool.py"
click node_irc_chat "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Chat.py"
click node_streamer "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/entities/Streamer.py"
click node_bet "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/entities/Bet.py"
click node_campaign "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/entities/Campaign.py"
click node_drop "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/entities/Drop.py"
click node_community_goal "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/entities/CommunityGoal.py"
click node_analytics "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/AnalyticsServer.py"
click node_logger "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/logger.py"
click node_discord "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Discord.py"
click node_gotify "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Gotify.py"
click node_matrix "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Matrix.py"
click node_pushover "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Pushover.py"
click node_telegram "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Telegram.py"
click node_webhook "https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Webhook.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_miner,node_settings toneBlue
class node_twitch_client,node_login,node_websocket_pool,node_irc_chat toneAmber
class node_streamer,node_bet,node_campaign,node_drop,node_community_goal toneMint
class node_analytics,node_logger,node_discord,node_gotify,node_matrix,node_pushover,node_telegram,node_webhook toneRose
class node_user,node_twitch_service,node_notification_services toneIndigo
```

## Components

### Miner runtime

- [Miner orchestrator](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/TwitchChannelPointsMiner.py): `TwitchChannelPointsMiner/TwitchChannelPointsMiner.py`
- [Runtime settings](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Settings.py): `TwitchChannelPointsMiner/classes/Settings.py`

### Twitch interaction

- [Twitch client](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Twitch.py): `TwitchChannelPointsMiner/classes/Twitch.py`
- [Twitch login](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/TwitchLogin.py): `TwitchChannelPointsMiner/classes/TwitchLogin.py`
- [Event connections](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/WebSocketsPool.py): `TwitchChannelPointsMiner/classes/WebSocketsPool.py`
- [IRC chat](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Chat.py): `TwitchChannelPointsMiner/classes/Chat.py`

### Stream behavior

- [Streamer state](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/entities/Streamer.py): `TwitchChannelPointsMiner/classes/entities/Streamer.py`
- [Prediction strategy](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/entities/Bet.py): `TwitchChannelPointsMiner/classes/entities/Bet.py`
- [Drop campaigns](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/entities/Campaign.py): `TwitchChannelPointsMiner/classes/entities/Campaign.py`
- [Drop claims](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/entities/Drop.py): `TwitchChannelPointsMiner/classes/entities/Drop.py`
- [Community goals](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/entities/CommunityGoal.py): `TwitchChannelPointsMiner/classes/entities/CommunityGoal.py`

### Reporting and notifications

- [Analytics server](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/AnalyticsServer.py): `TwitchChannelPointsMiner/classes/AnalyticsServer.py`
- [Logging and reports](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/logger.py): `TwitchChannelPointsMiner/logger.py`
- [Discord notifier](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Discord.py): `TwitchChannelPointsMiner/classes/Discord.py`
- [Gotify notifier](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Gotify.py): `TwitchChannelPointsMiner/classes/Gotify.py`
- [Matrix notifier](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Matrix.py): `TwitchChannelPointsMiner/classes/Matrix.py`
- [Pushover notifier](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Pushover.py): `TwitchChannelPointsMiner/classes/Pushover.py`
- [Telegram notifier](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Telegram.py): `TwitchChannelPointsMiner/classes/Telegram.py`
- [Webhook notifier](https://github.com/xisz/twitch-channel-points-miner-v2/blob/master/TwitchChannelPointsMiner/classes/Webhook.py): `TwitchChannelPointsMiner/classes/Webhook.py`

### Other components

- **Miner operator**
- **Twitch**
- **Notification services**

## Connections

- Miner operator → Miner orchestrator: configures and starts (evidence: `README.md`)
- Miner orchestrator → Runtime settings: uses settings (evidence: `TwitchChannelPointsMiner/TwitchChannelPointsMiner.py`)
- Miner orchestrator → Twitch client: coordinates (evidence: `TwitchChannelPointsMiner/TwitchChannelPointsMiner.py`)
- Twitch client → Twitch login: authenticates through (evidence: `TwitchChannelPointsMiner/classes/Twitch.py`)
- Twitch client → Twitch: sends API requests (evidence: `TwitchChannelPointsMiner/classes/Twitch.py`)
- Miner orchestrator → Event connections: manages connections (evidence: `TwitchChannelPointsMiner/TwitchChannelPointsMiner.py`)
- Event connections → Twitch client: claims bonus (evidence: `TwitchChannelPointsMiner/classes/WebSocketsPool.py`)
- Event connections → Streamer state: updates event state (evidence: `TwitchChannelPointsMiner/classes/WebSocketsPool.py`)
- Streamer state → IRC chat: manages chat (evidence: `TwitchChannelPointsMiner/classes/entities/Streamer.py`)
- IRC chat → Twitch: joins IRC (evidence: `TwitchChannelPointsMiner/classes/Chat.py`)
- Streamer state → Prediction strategy: holds betting settings (evidence: `TwitchChannelPointsMiner/classes/entities/Streamer.py`)
- Twitch client → Drop campaigns: loads campaigns (evidence: `TwitchChannelPointsMiner/classes/Twitch.py`)
- Drop campaigns → Drop claims: uses drop data (evidence: `TwitchChannelPointsMiner/classes/entities/Campaign.py`)
- Miner orchestrator → Analytics server: starts analytics (evidence: `TwitchChannelPointsMiner/TwitchChannelPointsMiner.py`)
- Miner orchestrator → Logging and reports: configures logging (evidence: `TwitchChannelPointsMiner/TwitchChannelPointsMiner.py`)
- Logging and reports → Discord notifier: sends notifications (evidence: `TwitchChannelPointsMiner/logger.py`)
- Logging and reports → Gotify notifier: sends notifications (evidence: `TwitchChannelPointsMiner/logger.py`)
- Logging and reports → Matrix notifier: sends notifications (evidence: `TwitchChannelPointsMiner/logger.py`)
- Logging and reports → Pushover notifier: sends notifications (evidence: `TwitchChannelPointsMiner/logger.py`)
- Logging and reports → Telegram notifier: sends notifications (evidence: `TwitchChannelPointsMiner/logger.py`)
- Logging and reports → Webhook notifier: sends notifications (evidence: `TwitchChannelPointsMiner/logger.py`)
- Discord notifier → Notification services: notifies (evidence: `TwitchChannelPointsMiner/classes/Discord.py`)
- Gotify notifier → Notification services: notifies (evidence: `TwitchChannelPointsMiner/classes/Gotify.py`)
- Matrix notifier → Notification services: notifies (evidence: `TwitchChannelPointsMiner/classes/Matrix.py`)
- Pushover notifier → Notification services: notifies (evidence: `TwitchChannelPointsMiner/classes/Pushover.py`)
- Telegram notifier → Notification services: notifies (evidence: `TwitchChannelPointsMiner/classes/Telegram.py`)
- Webhook notifier → Notification services: sends HTTP request (evidence: `TwitchChannelPointsMiner/classes/Webhook.py`)
- Miner orchestrator → Streamer state: tracks streamers (evidence: `TwitchChannelPointsMiner/TwitchChannelPointsMiner.py`)
- Twitch client → Community goals: handles goal data (evidence: `TwitchChannelPointsMiner/classes/Twitch.py`)
