# souvik-dey-2029/automation_bot architecture

> Architecture diagram of the GitHub repository souvik-dey-2029/automation_bot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/souvik-dey-2029/automation_bot
- Repository: https://github.com/souvik-dey-2029/automation_bot

## Overview

Smart Automation Bot is a desktop-task automation CLI. A user selects an action in the menu, and `main.py` dispatches it; full automation additionally opens Notepad, launches a coding environment, organizes downloads, and starts the download monitor and screenshot logger in threads. Those services read settings, manipulate files or the desktop, and record events. The README also documents monitoring, screenshots, configurable settings, and multithreaded operation. Edges reflect the shown calls and documented capabilities; external desktop and filesystem effects are modeled at a high level.

Main entry points: [`main.py`](https://github.com/souvik-dey-2029/automation_bot/blob/main/main.py) (CLI and orchestration), [`modules/screenshot_logger.py`](https://github.com/souvik-dey-2029/automation_bot/blob/main/modules/screenshot_logger.py) (Screenshot logger), [`modules/monitor.py`](https://github.com/souvik-dey-2029/automation_bot/blob/main/modules/monitor.py) (Download monitor), [`modules/organizer.py`](https://github.com/souvik-dey-2029/automation_bot/blob/main/modules/organizer.py) (Downloads organizer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and orchestration"]
  node_main["CLI and orchestration<br/>[main.py]"]
end

subgraph group_tasks["Desktop tasks"]
  node_opener["Notepad opener<br/>[opener.py]"]
  node_launcher["Environment launcher<br/>[launcher.py]"]
  node_screenshots["Screenshot logger"]
end

subgraph group_files["File automation"]
  node_monitor["Download monitor<br/>[monitor.py]"]
  node_organizer["Downloads organizer<br/>[organizer.py]"]
end

subgraph group_support["Configuration and logging"]
  node_config_loader["Configuration loader<br/>[config_loader.py]"]
  node_config["Automation settings<br/>[config.json]"]
  node_logger["Event logger<br/>[logger.py]"]
  node_log_file[("Automation log<br/>[automation_log.txt]")]
end

node_user(("CLI user"))
node_desktop["Desktop controls"]
node_web["ChatGPT and GitHub"]
node_downloads["Downloads folder"]
node_screenshot_files["Screenshot files"]

node_user -->|"selects action"| node_main
node_main -->|"opens Notepad"| node_opener
node_main -->|"launches"| node_launcher
node_main -->|"organizes downloads"| node_organizer
node_main -->|"starts thread"| node_monitor
node_main -->|"starts thread"| node_screenshots
node_opener -->|"types and presses"| node_desktop
node_launcher -->|"controls applications"| node_desktop
node_launcher -->|"opens sites"| node_web
node_monitor -->|"loads settings"| node_config_loader
node_monitor -->|"checks files"| node_downloads
node_monitor -->|"organizes on detection"| node_organizer
node_monitor -->|"logs detections"| node_logger
node_organizer -->|"loads settings"| node_config_loader
node_organizer -->|"moves files"| node_downloads
node_organizer -->|"logs moves"| node_logger
node_screenshots -->|"loads settings"| node_config_loader
node_screenshots -->|"captures screen"| node_desktop
node_screenshots -->|"saves images"| node_screenshot_files
node_screenshots -->|"logs saves"| node_logger
node_config_loader -->|"reads settings"| node_config
node_logger -->|"appends events"| node_log_file
node_main -->|"logs startup"| node_logger

click node_main "https://github.com/souvik-dey-2029/automation_bot/blob/main/main.py"
click node_opener "https://github.com/souvik-dey-2029/automation_bot/blob/main/modules/opener.py"
click node_launcher "https://github.com/souvik-dey-2029/automation_bot/blob/main/modules/launcher.py"
click node_monitor "https://github.com/souvik-dey-2029/automation_bot/blob/main/modules/monitor.py"
click node_organizer "https://github.com/souvik-dey-2029/automation_bot/blob/main/modules/organizer.py"
click node_screenshots "https://github.com/souvik-dey-2029/automation_bot/blob/main/modules/screenshot_logger.py"
click node_config_loader "https://github.com/souvik-dey-2029/automation_bot/blob/main/modules/config_loader.py"
click node_config "https://github.com/souvik-dey-2029/automation_bot/blob/main/config.json"
click node_logger "https://github.com/souvik-dey-2029/automation_bot/blob/main/modules/logger.py"
click node_log_file "https://github.com/souvik-dey-2029/automation_bot/blob/main/logs/automation_log.txt"

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_main,node_user,node_screenshot_files toneBlue
class node_opener,node_launcher,node_screenshots toneAmber
class node_monitor,node_organizer toneMint
class node_config_loader,node_config,node_logger,node_log_file toneRose
class node_desktop,node_web,node_downloads toneIndigo
```

## Components

### CLI and orchestration

- [CLI and orchestration](https://github.com/souvik-dey-2029/automation_bot/blob/main/main.py): `main.py`

### Desktop tasks

- [Notepad opener](https://github.com/souvik-dey-2029/automation_bot/blob/main/modules/opener.py): `modules/opener.py`
- [Environment launcher](https://github.com/souvik-dey-2029/automation_bot/blob/main/modules/launcher.py): `modules/launcher.py`
- [Screenshot logger](https://github.com/souvik-dey-2029/automation_bot/blob/main/modules/screenshot_logger.py): `modules/screenshot_logger.py`

### File automation

- [Download monitor](https://github.com/souvik-dey-2029/automation_bot/blob/main/modules/monitor.py): `modules/monitor.py`
- [Downloads organizer](https://github.com/souvik-dey-2029/automation_bot/blob/main/modules/organizer.py): `modules/organizer.py`

### Configuration and logging

- [Configuration loader](https://github.com/souvik-dey-2029/automation_bot/blob/main/modules/config_loader.py): `modules/config_loader.py`
- [Automation settings](https://github.com/souvik-dey-2029/automation_bot/blob/main/config.json): `config.json`
- [Event logger](https://github.com/souvik-dey-2029/automation_bot/blob/main/modules/logger.py): `modules/logger.py`
- [Automation log](https://github.com/souvik-dey-2029/automation_bot/blob/main/logs/automation_log.txt): `logs/automation_log.txt`

### Other components

- **CLI user**
- **Desktop controls**
- **ChatGPT and GitHub**
- **Downloads folder**
- **Screenshot files**

## Connections

- CLI user → CLI and orchestration: selects action (evidence: `README.md`)
- CLI and orchestration → Notepad opener: opens Notepad (evidence: `main.py`)
- CLI and orchestration → Environment launcher: launches (evidence: `main.py`)
- CLI and orchestration → Downloads organizer: organizes downloads (evidence: `main.py`)
- CLI and orchestration → Download monitor: starts thread (evidence: `main.py`)
- CLI and orchestration → Screenshot logger: starts thread (evidence: `main.py`)
- Notepad opener → Desktop controls: types and presses (evidence: `modules/opener.py`)
- Environment launcher → Desktop controls: controls applications (evidence: `modules/launcher.py`)
- Environment launcher → ChatGPT and GitHub: opens sites (evidence: `modules/launcher.py`)
- Download monitor → Configuration loader: loads settings (evidence: `modules/monitor.py`)
- Download monitor → Downloads folder: checks files (evidence: `modules/monitor.py`)
- Download monitor → Downloads organizer: organizes on detection (evidence: `modules/monitor.py`)
- Download monitor → Event logger: logs detections (evidence: `modules/monitor.py`)
- Downloads organizer → Configuration loader: loads settings (evidence: `modules/organizer.py`)
- Downloads organizer → Downloads folder: moves files (evidence: `modules/organizer.py`)
- Downloads organizer → Event logger: logs moves (evidence: `modules/organizer.py`)
- Screenshot logger → Configuration loader: loads settings (evidence: `modules/screenshot_logger.py`)
- Screenshot logger → Desktop controls: captures screen (evidence: `modules/screenshot_logger.py`)
- Screenshot logger → Screenshot files: saves images (evidence: `modules/screenshot_logger.py`)
- Screenshot logger → Event logger: logs saves (evidence: `modules/screenshot_logger.py`)
- Configuration loader → Automation settings: reads settings (evidence: `modules/config_loader.py`)
- Event logger → Automation log: appends events (evidence: `modules/logger.py`)
- CLI and orchestration → Event logger: logs startup (evidence: `main.py`)
