# kayden-vs/simplilearn_autowatch architecture

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

- Interactive diagram: https://gitdiagram.com/kayden-vs/simplilearn_autowatch
- Repository: https://github.com/kayden-vs/simplilearn_autowatch

## Overview

##### Project type and purpose
- This is a standalone Python automation tool (open-source script) called “Simplilearn AutoWatch.”
- Its sole function is to drive a browser via Selenium WebDriver to automatically log in and “watch” course videos on the Simplilearn platform.

##### File structure
- Top-level files only:
- video-bot.py – the main automation script
- requirements.txt – lists dependencies (e.g., selenium)
- README.md, LICENSE, .gitignore – project metadata
- No multi-tier frontend/backend directories; it’s a single-process client automation.

##### README for additional insights
- Dependencies: Python 3.7+, Chrome browser, ChromeDriver
- High-level flow: login → click “Continue Watching” → monitor progress

##### Main components and interactions
a. Components
- Automation Bot (video-bot.py)
- Selenium WebDriver client library (Python API)
- ChromeDriver (WebDriver HTTP server)
- Google Chrome browser (headful or headless)
- Simplilearn web application (remote service)
- Configuration (credentials stored in script or config file)
b. Relationships & data flow
1. Bot loads credentials → instantiates Selenium WebDriver
2. Selenium client sends WebDriver commands over HTTP to ChromeDriver
3. ChromeDriver drives Chrome (launch, navigate, click, extract DOM)
4. Chrome issues HTTPS requests to Simplilearn servers → receives HTML/CSS/JS
5. Bot parses page, identifies “Continue Watching” element, issues click command
6. Bot polls page state (progress bar or video time) until completion
7. Bot logs out or closes browser
c. Architectural patterns & design principles
- Single-process automation loop (initialize → perform actions → tear down)
- External service integration via WebDriver protocol
- Configurable for different user credentials / course URLs
d. Key technologies
- Python 3.7+
- selenium Python package
- ChromeDriver (matches Chrome version)
- Google Chrome browser
- HTTP/HTTPS (WebDriver protocol & web requests)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Automation Layer
    subgraph "Automation Bot"
        VideoBot["Automation Bot\n(video-bot.py + config)"]:::bot
    end

    %% Client Library
    subgraph "Client Library"
        WebDriver["Selenium WebDriver Client\n(requirements.txt)"]:::client
    end

    %% Browser Layer
    subgraph "Browser Layer"
        ChromeDriver["ChromeDriver (HTTP endpoint)"]:::driver
        ChromeBrowser["Google Chrome Browser"]:::browser
    end

    %% External Service
    Simplilearn["Simplilearn Web Server\n(external)"]:::external

    %% Project Metadata
    subgraph "Project Metadata"
        README["README.md"]:::docs
        LICENSE["LICENSE"]:::docs
        Gitignore[".gitignore"]:::docs
    end

    %% Data Flow
    VideoBot -->|"instantiate"| WebDriver
    WebDriver -->|"WebDriver JSON over HTTP"| ChromeDriver
    ChromeDriver -->|"launch & commands"| ChromeBrowser
    ChromeBrowser -->|"HTTPS requests"| Simplilearn
    Simplilearn -->|"HTML/CSS/JS responses"| ChromeBrowser
    ChromeBrowser -->|"WebDriver responses"| ChromeDriver
    ChromeDriver -->|"JSON responses"| WebDriver
    WebDriver -->|"data to bot"| VideoBot

    %% Click Events
    click VideoBot "https://github.com/kayden-vs/simplilearn_autowatch/blob/main/video-bot.py"
    click WebDriver "https://github.com/kayden-vs/simplilearn_autowatch/blob/main/requirements.txt"
    click README "https://github.com/kayden-vs/simplilearn_autowatch/blob/main/README.md"
    click LICENSE "https://github.com/kayden-vs/simplilearn_autowatch/tree/main/LICENSE"
    click Gitignore "https://github.com/kayden-vs/simplilearn_autowatch/blob/main/.gitignore"

    %% Styles
    classDef bot fill:#D0E8FF,stroke:#0052D4,color:#000
    classDef client fill:#D4F8D4,stroke:#2E7D32,color:#000
    classDef driver fill:#FFF9C4,stroke:#FBC02D,color:#000
    classDef browser fill:#FFE0B2,stroke:#E65100,color:#000
    classDef external fill:#ECEFF1,stroke:#607D8B,color:#000
    classDef docs fill:#F5F5F5,stroke:#9E9E9E,color:#000
```
