# w111user/daily-streak-tool architecture

> Architecture diagram of the GitHub repository w111user/daily-streak-tool, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/w111user/daily-streak-tool
- Repository: https://github.com/w111user/daily-streak-tool

## Overview

TikTok Automatic Sender automates daily TikTok video sharing to configured friends. The main workflow is configuration and recipient selection in the Tkinter UI (or a scheduled run), followed by browser-based DM discovery/resolution and sending; CAPTCHA pauses for manual intervention. The graph also preserves video selection and desktop/Telegram alerts. UI and scheduler wiring is shown in excerpts, while some sender internals are incomplete, so the video-pool connection is marked unverified.

Main entry points: [`ui.py`](https://github.com/w111user/daily-streak-tool/blob/main/ui.py) (Tkinter UI), [`sender.py`](https://github.com/w111user/daily-streak-tool/blob/main/sender.py) (TikTok sender), [`notifier.py`](https://github.com/w111user/daily-streak-tool/blob/main/notifier.py) (Notifications), [`main.py`](https://github.com/w111user/daily-streak-tool/blob/main/main.py) (Daily scheduler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Control and UI"]
  node_ui["Tkinter UI<br/>[ui.py]"]
  node_config["App config<br/>[ui.py]"]
  node_scheduler["Daily scheduler<br/>[main.py]"]
end

subgraph group_delivery["TikTok delivery"]
  node_recipient_scan["DM scanning<br/>[ui.py]"]
  node_username_resolve["Username resolution<br/>[ui.py]"]
  node_sender["TikTok sender<br/>[sender.py]"]
  node_video_pool["Video selection<br/>[video_pool.py]"]
end

subgraph group_support["Support services"]
  node_captcha["CAPTCHA and popups<br/>[captcha.py]"]
  node_notifier["Notifications<br/>[notifier.py]"]
end

node_user(("User"))
node_tiktok["TikTok"]
node_desktop["Desktop notifications"]
node_telegram["Telegram"]

node_user -->|"configures and starts"| node_ui
node_ui -->|"saves settings"| node_config
node_ui -->|"starts scan"| node_recipient_scan
node_recipient_scan -->|"scans DMs"| node_tiktok
node_ui -->|"starts resolution"| node_username_resolve
node_username_resolve -->|"resolves usernames"| node_tiktok
node_user -->|"runs directly"| node_scheduler
node_scheduler -->|"schedules run"| node_sender
node_ui -->|"starts sender"| node_sender
node_sender -->|"automates DMs"| node_tiktok
node_sender -.->|"selects video"| node_video_pool
node_sender -->|"checks challenges"| node_captcha
node_captcha -->|"alerts user"| node_notifier
node_notifier -->|"sends alert"| node_desktop
node_notifier -->|"sends alert"| node_telegram

click node_ui "https://github.com/w111user/daily-streak-tool/blob/main/ui.py"
click node_config "https://github.com/w111user/daily-streak-tool/blob/main/ui.py"
click node_scheduler "https://github.com/w111user/daily-streak-tool/blob/main/main.py"
click node_recipient_scan "https://github.com/w111user/daily-streak-tool/blob/main/ui.py"
click node_username_resolve "https://github.com/w111user/daily-streak-tool/blob/main/ui.py"
click node_sender "https://github.com/w111user/daily-streak-tool/blob/main/sender.py"
click node_video_pool "https://github.com/w111user/daily-streak-tool/blob/main/video_pool.py"
click node_captcha "https://github.com/w111user/daily-streak-tool/blob/main/captcha.py"
click node_notifier "https://github.com/w111user/daily-streak-tool/blob/main/notifier.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_ui,node_config,node_scheduler,node_user toneBlue
class node_recipient_scan,node_username_resolve,node_sender,node_video_pool toneAmber
class node_captcha,node_notifier toneMint
class node_tiktok,node_desktop,node_telegram toneIndigo
```

## Components

### Control and UI

- [Tkinter UI](https://github.com/w111user/daily-streak-tool/blob/main/ui.py): `ui.py`
- [App config](https://github.com/w111user/daily-streak-tool/blob/main/ui.py): `ui.py`
- [Daily scheduler](https://github.com/w111user/daily-streak-tool/blob/main/main.py): `main.py`

### TikTok delivery

- [DM scanning](https://github.com/w111user/daily-streak-tool/blob/main/ui.py): `ui.py`
- [Username resolution](https://github.com/w111user/daily-streak-tool/blob/main/ui.py): `ui.py`
- [TikTok sender](https://github.com/w111user/daily-streak-tool/blob/main/sender.py): `sender.py`
- [Video selection](https://github.com/w111user/daily-streak-tool/blob/main/video_pool.py): `video_pool.py`

### Support services

- [CAPTCHA and popups](https://github.com/w111user/daily-streak-tool/blob/main/captcha.py): `captcha.py`
- [Notifications](https://github.com/w111user/daily-streak-tool/blob/main/notifier.py): `notifier.py`

### Other components

- **User**
- **TikTok**
- **Desktop notifications**
- **Telegram**

## Connections

- User → Tkinter UI: configures and starts (evidence: `README.md`)
- Tkinter UI → App config: saves settings (evidence: `ui.py`)
- Tkinter UI → DM scanning: starts scan (evidence: `README.md`)
- DM scanning → TikTok: scans DMs (evidence: `ui.py`)
- Tkinter UI → Username resolution: starts resolution (evidence: `ui.py`)
- Username resolution → TikTok: resolves usernames (evidence: `ui.py`)
- User → Daily scheduler: runs directly (evidence: `README.md`)
- Daily scheduler → TikTok sender: schedules run (evidence: `main.py`)
- Tkinter UI → TikTok sender: starts sender (evidence: `ui.py`)
- TikTok sender → TikTok: automates DMs (evidence: `README.md`)
- TikTok sender → Video selection: selects video (evidence: `sender.py`)
- TikTok sender → CAPTCHA and popups: checks challenges (evidence: `sender.py`)
- CAPTCHA and popups → Notifications: alerts user (evidence: `captcha.py`)
- Notifications → Desktop notifications: sends alert (evidence: `notifier.py`)
- Notifications → Telegram: sends alert (evidence: `notifier.py`)
