# coskundeniz/google-ad-clicker-premium architecture

> Architecture diagram of the GitHub repository coskundeniz/google-ad-clicker-premium, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/coskundeniz/google-ad-clicker-premium
- Repository: https://github.com/coskundeniz/google-ad-clicker-premium

## Overview

Ad Clicker Premium is a configurable Google-search browser automation tool. A user configures a query and browser behavior, then runs one browser, multiple browsers, a loop, or the desktop UI. The main run creates a browser, searches and selects ad, shopping, and filtered non-ad links, performs clicks, and can record results for reports. The README also documents proxy and country targeting, Android, captcha, hooks, and notifications. Some subsystem links rely on the SOURCE INDEX or README rather than complete excerpts; those are marked dashed where runtime wiring is unverified.

Main entry points: [`ad_clicker.py`](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/ad_clicker.py) (Single-browser run), [`search_controller.py`](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/search_controller.py) (Search and link selection), [`gui.py`](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/gui.py) (Desktop UI), [`webdriver.py`](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/webdriver.py) (Browser setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launch["Run and configure"]
  node_config["Configuration<br/>[config.json]"]
  node_config_reader["Config reader<br/>[config_reader.py]"]
  node_gui["Desktop UI<br/>[gui.py]"]
  node_single_run["Single-browser run<br/>[ad_clicker.py]"]
  node_multi_run["Multi-browser run<br/>[run_ad_clicker.py]"]
  node_loop_run["Loop runner<br/>[run_in_loop.py]"]
end

subgraph group_browser["Browser and search"]
  node_browser_setup["Browser setup<br/>[webdriver.py]"]
  node_proxy_setup["Proxy setup<br/>[proxy.py]"]
  node_search["Search and link selection"]
  node_behavior["Page behavior"]
  node_click_execution["Link clicking"]
  node_utilities["Targeting and helpers<br/>[utils.py]"]
end

subgraph group_support["Extensions and reporting"]
  node_captcha["Captcha solving<br/>[utils.py]"]
  node_hooks["Custom hooks<br/>[hooks.py]"]
  node_android["Android control<br/>[adb.py]"]
  node_telegram["Telegram notifications"]
  node_stats["Run statistics<br/>[stats.py]"]
  node_reporting["Click reports<br/>[utils.py]"]
end

subgraph group_state["Local state"]
  node_click_db[("Click log database<br/>[clicklogs_db.py]")]
  node_geo_db[("Geolocation database<br/>[geolocation_db.py]")]
end

node_user(("User"))
node_geo_service{{"Geolocation services"}}
node_google{{"Google Search"}}
node_android_device(("Android device"))

node_user -->|"configures and runs"| node_gui
node_user -->|"starts run"| node_single_run
node_user -->|"starts run"| node_multi_run
node_user -->|"starts loop"| node_loop_run
node_config -.->|"read by"| node_config_reader
node_gui -.->|"uses"| node_config_reader
node_gui -->|"launches"| node_single_run
node_gui -->|"launches"| node_multi_run
node_gui -->|"launches"| node_loop_run
node_single_run -->|"uses"| node_config_reader
node_multi_run -->|"uses"| node_config_reader
node_loop_run -.->|"uses"| node_config_reader
node_single_run -->|"selects proxy"| node_proxy_setup
node_single_run -->|"creates browser"| node_browser_setup
node_single_run -->|"runs search"| node_search
node_search -.->|"searches"| node_google
node_search -.->|"applies page actions"| node_behavior
node_search -.->|"selects links to click"| node_click_execution
node_single_run -.->|"records clicks"| node_click_db
node_single_run -->|"invokes hooks"| node_hooks
node_single_run -.->|"sends notifications"| node_telegram
node_single_run -.->|"uses run statistics"| node_stats
node_single_run -.->|"generates report"| node_reporting
node_single_run -.->|"can solve captcha"| node_captcha
node_single_run -.->|"can dispatch links"| node_android
node_android -.->|"controls"| node_android_device
node_search -.->|"records selected links"| node_click_db
node_search -.->|"updates statistics"| node_stats
node_browser_setup -.->|"configures proxy"| node_proxy_setup
node_browser_setup -.->|"uses helpers"| node_utilities
node_browser_setup -.->|"uses cached location"| node_geo_db
node_utilities -.->|"reads and writes"| node_geo_db
node_browser_setup -.->|"looks up timezone"| node_geo_service
node_single_run -.->|"loads targeting data"| node_utilities
node_single_run -->|"queries report data"| node_click_db
node_reporting -.->|"formats stored results"| node_click_db

click node_config "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/config.json"
click node_config_reader "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/config_reader.py"
click node_gui "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/gui.py"
click node_single_run "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/ad_clicker.py"
click node_multi_run "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/run_ad_clicker.py"
click node_loop_run "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/run_in_loop.py"
click node_browser_setup "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/webdriver.py"
click node_proxy_setup "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/proxy.py"
click node_search "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/search_controller.py"
click node_behavior "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/search_controller.py"
click node_click_execution "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/search_controller.py"
click node_utilities "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/utils.py"
click node_captcha "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/utils.py"
click node_hooks "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/hooks.py"
click node_android "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/adb.py"
click node_telegram "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/telegram_notifier.py"
click node_stats "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/stats.py"
click node_reporting "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/utils.py"
click node_click_db "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/clicklogs_db.py"
click node_geo_db "https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/geolocation_db.py"

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_config,node_config_reader,node_gui,node_single_run,node_multi_run,node_loop_run,node_user toneBlue
class node_browser_setup,node_proxy_setup,node_search,node_behavior,node_click_execution,node_utilities toneAmber
class node_captcha,node_hooks,node_android,node_telegram,node_stats,node_reporting toneMint
class node_click_db,node_geo_db toneRose
class node_geo_service,node_google,node_android_device toneIndigo
```

## Components

### Run and configure

- [Configuration](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/config.json): `config.json`
- [Config reader](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/config_reader.py): `config_reader.py`
- [Desktop UI](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/gui.py): `gui.py`
- [Single-browser run](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/ad_clicker.py): `ad_clicker.py`
- [Multi-browser run](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/run_ad_clicker.py): `run_ad_clicker.py`
- [Loop runner](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/run_in_loop.py): `run_in_loop.py`

### Browser and search

- [Browser setup](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/webdriver.py): `webdriver.py`
- [Proxy setup](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/proxy.py): `proxy.py`
- [Search and link selection](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/search_controller.py): `search_controller.py`
- [Page behavior](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/search_controller.py): `search_controller.py`
- [Link clicking](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/search_controller.py): `search_controller.py`
- [Targeting and helpers](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/utils.py): `utils.py`

### Extensions and reporting

- [Captcha solving](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/utils.py): `utils.py`
- [Custom hooks](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/hooks.py): `hooks.py`
- [Android control](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/adb.py): `adb.py`
- [Telegram notifications](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/telegram_notifier.py): `telegram_notifier.py`
- [Run statistics](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/stats.py): `stats.py`
- [Click reports](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/utils.py): `utils.py`

### Local state

- [Click log database](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/clicklogs_db.py): `clicklogs_db.py`
- [Geolocation database](https://github.com/coskundeniz/google-ad-clicker-premium/blob/main/geolocation_db.py): `geolocation_db.py`

### Other components

- **User**
- **Geolocation services**
- **Google Search**
- **Android device**

## Connections

- User → Desktop UI: configures and runs (evidence: `README.md`)
- User → Single-browser run: starts run (evidence: `README.md`)
- User → Multi-browser run: starts run (evidence: `README.md`)
- User → Loop runner: starts loop (evidence: `README.md`)
- Configuration → Config reader: read by (evidence: `config_reader.py`)
- Desktop UI → Config reader: uses (evidence: `gui.py`)
- Desktop UI → Single-browser run: launches (evidence: `gui.py`)
- Desktop UI → Multi-browser run: launches (evidence: `gui.py`)
- Desktop UI → Loop runner: launches (evidence: `gui.py`)
- Single-browser run → Config reader: uses (evidence: `ad_clicker.py`)
- Multi-browser run → Config reader: uses (evidence: `run_ad_clicker.py`)
- Loop runner → Config reader: uses (evidence: `run_in_loop.py`)
- Single-browser run → Proxy setup: selects proxy (evidence: `ad_clicker.py`)
- Single-browser run → Browser setup: creates browser (evidence: `ad_clicker.py`)
- Single-browser run → Search and link selection: runs search (evidence: `ad_clicker.py`)
- Search and link selection → Google Search: searches (evidence: `README.md`)
- Search and link selection → Page behavior: applies page actions (evidence: `README.md`)
- Search and link selection → Link clicking: selects links to click (evidence: `README.md`)
- Single-browser run → Click log database: records clicks (evidence: `ad_clicker.py`)
- Single-browser run → Custom hooks: invokes hooks (evidence: `ad_clicker.py`)
- Single-browser run → Telegram notifications: sends notifications (evidence: `README.md`)
- Single-browser run → Run statistics: uses run statistics (evidence: `ad_clicker.py`)
- Single-browser run → Click reports: generates report (evidence: `README.md`)
- Single-browser run → Captcha solving: can solve captcha (evidence: `README.md`)
- Single-browser run → Android control: can dispatch links (evidence: `README.md`)
- Android control → Android device: controls (evidence: `adb.py`)
- Search and link selection → Click log database: records selected links (evidence: `search_controller.py`)
- Search and link selection → Run statistics: updates statistics (evidence: `search_controller.py`)
- Browser setup → Proxy setup: configures proxy (evidence: `webdriver.py`)
- Browser setup → Targeting and helpers: uses helpers (evidence: `webdriver.py`)
- Browser setup → Geolocation database: uses cached location (evidence: `webdriver.py`)
- Targeting and helpers → Geolocation database: reads and writes (evidence: `utils.py`)
- Browser setup → Geolocation services: looks up timezone (evidence: `webdriver.py`)
- Single-browser run → Targeting and helpers: loads targeting data (evidence: `ad_clicker.py`)
- Single-browser run → Click log database: queries report data (evidence: `ad_clicker.py`)
- Click reports → Click log database: formats stored results (evidence: `README.md`)
