# dimakiss/udemy_bot architecture

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

- Interactive diagram: https://gitdiagram.com/dimakiss/udemy_bot
- Repository: https://github.com/dimakiss/udemy_bot

## Overview

##### Main Components

a) Client Components:
- Chrome WebDriver
- Python Script (Udemy_bot.py)
- Authentication Module

b) External Services:
- UdemyFreebies Website
- Udemy Platform

##### User Layer
- Input parameters (email, password)

##### Application Layer
- A WebDriver component connected to the main script
- Authentication handler

##### External Services Layer
- UdemyFreebies service component
- Udemy platform component
- Course filtering mechanism (ratings > 4.2, 200+ ratings)

##### Data Flow Indicators
- User credentials → Authentication
- Bot → UdemyFreebies (course search)
- Bot → Udemy (course enrollment)
- Course data flow between components

**┌─────────────────────────────────────────────────┐**
- User Input                      │
- (Email & Password)                    │
- ┘
- ↓
**┌─────────────────────────────────────────────────┐**
- Udemy_bot.py                        │
- ┌─────────────────┐    ┌──────────────────┐    │
- Authentication │    │  Course Filter    │    │
- Handler      │    │  - Rating > 4.2  │    │
- ┘    │  - 200+ reviews  │    │
- ┌─────────────────┐    └──────────────────┘    │
- Chrome WebDriver│                            │
- ┘                            │
- ┘
- ↙                  ↘
**┌────────────────────┐  ┌──────────────────┐**
- UdemyFreebies    │  │    Udemy         │
- (Course Search)  │→ │    Platform      │
- ┘  └──────────────────┘

- Blue: User interface components
- Green: Core application components
- Yellow: External services
- Gray: Infrastructure components (WebDriver)

Important Elements to Highlight:
##### Automation Flow
- Sequential process of searching and enrolling
- Where course filtering happens

##### Integration Points
- WebDriver interaction with websites
- Authentication points
- Course data processing

##### Configuration Elements
- Category selection
- Rating filters
- Review count filters

- Data flow direction indicators
- Component type indicators
- Authentication points
- Filter points

- Clear separation between local components and external services
- Security considerations around credential handling
- Points where configuration can be modified (categories, ratings, etc.)

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef user fill:#B3E0FF,stroke:#333,stroke-width:2px
    classDef core fill:#98FB98,stroke:#333,stroke-width:2px
    classDef external fill:#FFE4B5,stroke:#333,stroke-width:2px
    classDef config fill:#E6E6FA,stroke:#333,stroke-width:2px
    classDef infra fill:#DCDCDC,stroke:#333,stroke-width:2px

    %% User Layer
    User[User Input<br>Email & Password]:::user

    %% Application Layer
    MainScript[Udemy Bot Script]:::core
    click MainScript "https://github.com/dimakiss/Udemy_bot/blob/main/Udemy_bot.py"
    
    Auth[Authentication Handler]:::core
    WebDriver[Chrome WebDriver]:::infra
    Filter[Course Filter<br>Rating > 4.2<br>200+ reviews]:::core
    
    %% External Services
    UdemyFreebies[UdemyFreebies<br>Course Search]:::external
    Udemy[Udemy Platform]:::external

    %% Dependencies
    Dependencies[Dependencies]:::config
    click Dependencies "https://github.com/dimakiss/Udemy_bot/blob/main/requirements.txt"
    
    Documentation[Documentation]:::config
    click Documentation "https://github.com/dimakiss/Udemy_bot/blob/main/README.md"
    
    License[License Info]:::config
    click License "https://github.com/dimakiss/Udemy_bot/tree/main/LICENSE"

    %% Relationships
    User --> MainScript
    MainScript --> Auth
    MainScript --> WebDriver
    MainScript --> Filter
    WebDriver --> UdemyFreebies
    WebDriver --> Udemy
    UdemyFreebies --> Udemy
    
    %% Support Components
    MainScript --- Dependencies
    MainScript --- Documentation
    MainScript --- License

    %% Legend
    subgraph Legend
        L1[User Interface]:::user
        L2[Core Components]:::core
        L3[External Services]:::external
        L4[Infrastructure]:::infra
        L5[Configuration]:::config
    end
```
