# negassab/platiniumbettingbot architecture

> Architecture diagram of the GitHub repository negassab/platiniumbettingbot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/negassab/platiniumbettingbot
- Repository: https://github.com/negassab/platiniumbettingbot

## Overview

##### Data Sources Layer
- Four blogspot websites as external data sources

##### Core Application Components (based on the src directory)
- Waiter Component (waiter.py)
- Represents the entry point/orchestrator
- Coordinates between scraping and delivery
- Cooker Component (cooker.py)
- Handles the scraping logic
- Processes raw HTML into structured data
- Freezer Component (freezer.py)
- Manages data persistence
- Interfaces with the database

##### Storage Layer
- MySQL Database (indicated by PyMySQL dependency)
- Configuration Storage (.conbt.ini in data directory)

##### Output Layer
- Telegram Bot Integration
- Telegram Channel

Drawing Instructions:

- [External Sources] → [Core Components] → [Storage] → [Output Channels]

##### Component Representation
- Use rectangles for core components (Waiter, Cooker, Freezer)
- Use message queue symbols for Telegram integration

##### Specific Flows
- Blogs → Cooker → Freezer → Database
- Waiter → Cooker (orchestration)
- Waiter → Telegram Bot → Telegram Channel

Important Elements to Highlight:

##### Data Flow
- How data moves from source blogs through the system
- Transformation points (raw HTML → structured data)
- Storage and retrieval paths

##### Integration Points
- HTTP requests to blogs
- Database connections
- Telegram API integration

##### Configuration
- Where configuration files are read
- Environment-specific settings

##### Error Handling
- Error notification paths
- Retry mechanisms if any

Level of Detail Guidelines:

##### Component Level
- Major classes/modules
- Primary methods/functions
- Dependencies

##### Interface Level
- API endpoints
- Database schemas
- Message formats

##### Infrastructure Level
- Deployment boundaries
- Scaling points
- Monitoring hooks

Remember to:
- Use consistent notation
- Version information
- Document any assumptions

## Diagram (Mermaid)

```mermaid
graph TB
    %% Style Definitions
    classDef external fill:#a8d1f7,stroke:#0066cc
    classDef core fill:#90EE90,stroke:#006400
    classDef storage fill:#FFE4B5,stroke:#DAA520
    classDef output fill:#DDA0DD,stroke:#800080
    classDef config fill:#F0E68C,stroke:#BDB76B

    %% External Data Sources
    subgraph DataSources["Data Sources Layer"]
        Blog1[Blog Source 1]:::external
        Blog2[Blog Source 2]:::external
        Blog3[Blog Source 3]:::external
        Blog4[Blog Source 4]:::external
    end

    %% Core Application Components
    subgraph CoreComponents["Core Processing Layer"]
        Waiter[Waiter<br/>Orchestrator]
        Cooker[Cooker<br/>Scraping/Processing]
        Freezer[Freezer<br/>Data Persistence]
    end

    %% Storage Layer
    subgraph StorageLayer["Storage Layer"]
        DB[(MySQL Database)]:::storage
        Config[".conbt.ini"]:::config
    end

    %% Output Layer
    subgraph OutputLayer["Output Layer"]
        TBot[Telegram Bot]:::output
        TChannel[Telegram Channel]:::output
    end

    %% Connections
    Blog1 & Blog2 & Blog3 & Blog4 --> Cooker
    Waiter --> Cooker
    Cooker --> Freezer
    Freezer --> DB
    Config --> Waiter
    Waiter --> TBot
    TBot --> TChannel

    %% Click Events
    click Waiter "https://github.com/NegassaB/platiniumBettingBot/blob/main/src/waiter.py"
    click Cooker "https://github.com/NegassaB/platiniumBettingBot/blob/main/src/cooker.py"
    click Freezer "https://github.com/NegassaB/platiniumBettingBot/blob/main/src/freezer.py"
    click Config "https://github.com/NegassaB/platiniumBettingBot/blob/main/data/.conbt.ini"

    %% Legend
    subgraph Legend
        E[External Sources]:::external
        C[Core Components]:::core
        S[(Storage)]:::storage
        O[Output Channels]:::output
        CF[Configuration]:::config
    end
```
