# vonssy/dawn-bot architecture

> Architecture diagram of the GitHub repository vonssy/dawn-bot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vonssy/dawn-bot
- Repository: https://github.com/vonssy/dawn-bot

## Overview

##### Project type and purpose
- This is a Python-based CLI automation tool (“bot”) for validating Dawn accounts via HTTP requests and proxies.
- It reads account credentials, rotates through proxies (either public list or private), sends keep-alive pings every 10 minutes, and runs multi-threaded tasks to auto-retrieve account info.

##### File structure
- Top-level files:
- README.md – project description and instructions
- requirements.txt – Python dependencies
- bot.py – main application script containing orchestration, threading, HTTP logic
- accounts.json – configuration file listing account email+token pairs
- proxy.txt – configuration file listing proxy endpoints
- No separate “frontend” or “backend” folders; single-script architecture.
- No database or server component—state is held in JSON/text files and in-memory threads.

##### README for additional insights
- Describes four proxy modes: public list, private proxies, no proxy, rotating invalid proxies.
- Mentions multi-threading, keep-alive pings, and account info retrieval.
- Lists required Python 3.9+ and pip installation.

##### Key advice
- Be detailed: break out public vs. private proxy flows, keep-alive scheduler as a subcomponent.
- Every step: config parsing, mode selection logic, thread pooling, HTTP request/response, proxy rotation.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Configuration Store
    subgraph "Configuration Store"
        A1["accounts.json"]:::config
        A2["proxy.txt"]:::config
    end

    %% Core Python Modules
    subgraph "Core Python Modules"
        B["Bot Orchestrator"]:::core
        subgraph "Orchestrator Components"
            B1["Mode Selector"]:::core
            B2["Thread Pool Manager"]:::core
            B3["Keep-Alive Scheduler"]:::core
        end
        C["Proxy Manager"]:::core
        D["HTTP Client"]:::core
        E["requirements.txt"]:::config
        F["README.md"]:::config
    end

    %% External Services
    subgraph "External Services"
        ES1["Dawn Validator API"]:::external
        ES2["Monosans Proxy List URL"]:::external
    end

    %% Connections
    A1 -->|"loads credentials"| B
    A2 -->|"loads proxies"| B
    B -->|"selects mode"| B1
    B -->|"spawns threads"| B2
    B -->|"schedules pings"| B3
    B -->|"initializes"| C
    C -->|"fetches public list"| ES2
    C -->|"provides proxy"| D
    D -->|"validates account"| ES1
    D -->|"marks bad proxy"| C

    %% Click Events
    click A1 "https://github.com/vonssy/dawn-bot/blob/main/accounts.json"
    click A2 "https://github.com/vonssy/dawn-bot/blob/main/proxy.txt"
    click B "https://github.com/vonssy/dawn-bot/blob/main/bot.py"
    click C "https://github.com/vonssy/dawn-bot/blob/main/bot.py"
    click D "https://github.com/vonssy/dawn-bot/blob/main/bot.py"
    click E "https://github.com/vonssy/dawn-bot/blob/main/requirements.txt"
    click F "https://github.com/vonssy/dawn-bot/blob/main/README.md"

    %% Styles
    classDef config fill:#CCCCCC,stroke:#333,stroke-width:1px
    classDef core fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef external fill:#90EE90,stroke:#333,stroke-width:1px
```
