# xtekky/zefoy architecture

> Architecture diagram of the GitHub repository xtekky/zefoy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/xtekky/zefoy
- Repository: https://github.com/xtekky/zefoy

## Overview

This repository contains several generations of a Zefoy/TikTok engagement automation tool, not one unified application. The principal workflow accepts a TikTok video URL, establishes a Zefoy session (and handles CAPTCHA), selects an engagement service, then repeatedly submits requests while respecting service timers. Implementations include a Selenium-driven Python client, a direct-request Python client, a Go client, and older Selenium scripts. The README provides no architecture detail; edges below rely on shown excerpts, and unsampled subsystems are not assumed to connect.

Main entry points: [`to update/main.py`](https://github.com/xtekky/zefoy/blob/main/to%20update/main.py) (HTTP workflow), [`main.py`](https://github.com/xtekky/zefoy/blob/main/main.py) (Browser workflow), [`to update/main.go`](https://github.com/xtekky/zefoy/blob/main/to%20update/main.go) (Service worker), [`to update/old/other/source.py`](https://github.com/xtekky/zefoy/blob/main/to%20update/old/other/source.py) (Legacy automation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser["Browser client"]
  node_browser_flow["Browser workflow<br/>[main.py]"]
  node_browser_select["Service selection<br/>[main.py]"]
  node_browser_submit["Submit loop<br/>[main.py]"]
end

subgraph group_python_http["Python HTTP client"]
  node_http_flow["HTTP workflow<br/>[main.py]"]
  node_http_session["Session and CAPTCHA<br/>[main.py]"]
  node_http_lookup["Video lookup<br/>[main.py]"]
  node_http_search["Service search<br/>[main.py]"]
  node_http_submit["Request submitter<br/>[main.py]"]
end

subgraph group_go_client["Go client"]
  node_go_entry["CLI and dispatch<br/>[main.go]"]
  node_go_worker["Service worker<br/>[main.go]"]
  node_go_session["Session and CAPTCHA<br/>[main.go]"]
  node_go_keys["Service key lookup<br/>[main.go]"]
  node_go_submit["Request submitter<br/>[main.go]"]
end

subgraph group_legacy["Legacy scripts"]
  node_old_workflow["Legacy automation<br/>[source.py]"]
  node_old_views["Views automation<br/>[views.py]"]
end

node_user(("User"))
node_zefoy["Zefoy service"]
node_discord["Discord support"]
node_captcha_api["CAPTCHA solver API"]
node_livecounts["Livecounts API"]
node_go_solver["CAPTCHA API"]

node_user -->|"starts"| node_browser_flow
node_browser_flow -->|"opens site"| node_zefoy
node_browser_flow -->|"checks and selects"| node_browser_select
node_browser_select -->|"clicks service"| node_zefoy
node_browser_select -->|"starts submission"| node_browser_submit
node_browser_submit -->|"submits video"| node_zefoy
node_browser_flow -->|"opens support"| node_discord
node_user -->|"starts"| node_http_flow
node_http_flow -->|"initializes session"| node_http_session
node_http_session -->|"requests CAPTCHA"| node_zefoy
node_http_session -->|"requests solution"| node_captcha_api
node_http_flow -->|"resolves video ID"| node_http_lookup
node_http_lookup -->|"fetches video stats"| node_livecounts
node_http_flow -->|"searches video"| node_http_search
node_http_search -->|"posts service search"| node_zefoy
node_http_flow -->|"starts repeat sends"| node_http_submit
node_http_submit -->|"posts engagement"| node_zefoy
node_user -->|"provides video link"| node_go_entry
node_go_entry -->|"dispatches services"| node_go_worker
node_go_worker -->|"starts session"| node_go_session
node_go_session -->|"gets session and CAPTCHA"| node_zefoy
node_go_session -->|"requests solution"| node_go_solver
node_go_worker -->|"looks up service key"| node_go_keys
node_go_keys -->|"posts video search"| node_zefoy
node_go_worker -->|"submits repeatedly"| node_go_submit
node_go_submit -->|"posts engagement"| node_zefoy
node_user -->|"starts legacy client"| node_old_workflow
node_old_workflow -->|"drives browser"| node_zefoy
node_user -->|"provides video URL"| node_old_views
node_old_views -->|"drives views workflow"| node_zefoy

click node_browser_flow "https://github.com/xtekky/zefoy/blob/main/main.py"
click node_browser_select "https://github.com/xtekky/zefoy/blob/main/main.py"
click node_browser_submit "https://github.com/xtekky/zefoy/blob/main/main.py"
click node_http_flow "https://github.com/xtekky/zefoy/blob/main/to%20update/main.py"
click node_http_session "https://github.com/xtekky/zefoy/blob/main/to%20update/main.py"
click node_http_lookup "https://github.com/xtekky/zefoy/blob/main/to%20update/main.py"
click node_http_search "https://github.com/xtekky/zefoy/blob/main/to%20update/main.py"
click node_http_submit "https://github.com/xtekky/zefoy/blob/main/to%20update/main.py"
click node_go_entry "https://github.com/xtekky/zefoy/blob/main/to%20update/main.go"
click node_go_worker "https://github.com/xtekky/zefoy/blob/main/to%20update/main.go"
click node_go_session "https://github.com/xtekky/zefoy/blob/main/to%20update/main.go"
click node_go_keys "https://github.com/xtekky/zefoy/blob/main/to%20update/main.go"
click node_go_submit "https://github.com/xtekky/zefoy/blob/main/to%20update/main.go"
click node_old_workflow "https://github.com/xtekky/zefoy/blob/main/to%20update/old/other/source.py"
click node_old_views "https://github.com/xtekky/zefoy/blob/main/to%20update/old/views.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_browser_flow,node_browser_select,node_browser_submit,node_user toneBlue
class node_http_flow,node_http_session,node_http_lookup,node_http_search,node_http_submit toneAmber
class node_go_entry,node_go_worker,node_go_session,node_go_keys,node_go_submit,node_captcha_api,node_livecounts,node_go_solver toneMint
class node_old_workflow,node_old_views toneRose
class node_zefoy,node_discord toneIndigo
```

## Components

### Browser client

- [Browser workflow](https://github.com/xtekky/zefoy/blob/main/main.py): `main.py`
- [Service selection](https://github.com/xtekky/zefoy/blob/main/main.py): `main.py`
- [Submit loop](https://github.com/xtekky/zefoy/blob/main/main.py): `main.py`

### Python HTTP client

- [HTTP workflow](https://github.com/xtekky/zefoy/blob/main/to%20update/main.py): `to update/main.py`
- [Session and CAPTCHA](https://github.com/xtekky/zefoy/blob/main/to%20update/main.py): `to update/main.py`
- [Video lookup](https://github.com/xtekky/zefoy/blob/main/to%20update/main.py): `to update/main.py`
- [Service search](https://github.com/xtekky/zefoy/blob/main/to%20update/main.py): `to update/main.py`
- [Request submitter](https://github.com/xtekky/zefoy/blob/main/to%20update/main.py): `to update/main.py`

### Go client

- [CLI and dispatch](https://github.com/xtekky/zefoy/blob/main/to%20update/main.go): `to update/main.go`
- [Service worker](https://github.com/xtekky/zefoy/blob/main/to%20update/main.go): `to update/main.go`
- [Session and CAPTCHA](https://github.com/xtekky/zefoy/blob/main/to%20update/main.go): `to update/main.go`
- [Service key lookup](https://github.com/xtekky/zefoy/blob/main/to%20update/main.go): `to update/main.go`
- [Request submitter](https://github.com/xtekky/zefoy/blob/main/to%20update/main.go): `to update/main.go`

### Legacy scripts

- [Legacy automation](https://github.com/xtekky/zefoy/blob/main/to%20update/old/other/source.py): `to update/old/other/source.py`
- [Views automation](https://github.com/xtekky/zefoy/blob/main/to%20update/old/views.py): `to update/old/views.py`

### Other components

- **User**
- **Zefoy service**
- **Discord support**
- **CAPTCHA solver API**
- **Livecounts API**
- **CAPTCHA API**

## Connections

- User → Browser workflow: starts (evidence: `main.py`)
- Browser workflow → Zefoy service: opens site (evidence: `main.py`)
- Browser workflow → Service selection: checks and selects (evidence: `main.py`)
- Service selection → Zefoy service: clicks service (evidence: `main.py`)
- Service selection → Submit loop: starts submission (evidence: `main.py`)
- Submit loop → Zefoy service: submits video (evidence: `main.py`)
- Browser workflow → Discord support: opens support (evidence: `main.py`)
- User → HTTP workflow: starts (evidence: `to update/main.py`)
- HTTP workflow → Session and CAPTCHA: initializes session (evidence: `to update/main.py`)
- Session and CAPTCHA → Zefoy service: requests CAPTCHA (evidence: `to update/main.py`)
- Session and CAPTCHA → CAPTCHA solver API: requests solution (evidence: `to update/main.py`)
- HTTP workflow → Video lookup: resolves video ID (evidence: `to update/main.py`)
- Video lookup → Livecounts API: fetches video stats (evidence: `to update/main.py`)
- HTTP workflow → Service search: searches video (evidence: `to update/main.py`)
- Service search → Zefoy service: posts service search (evidence: `to update/main.py`)
- HTTP workflow → Request submitter: starts repeat sends (evidence: `to update/main.py`)
- Request submitter → Zefoy service: posts engagement (evidence: `to update/main.py`)
- User → CLI and dispatch: provides video link (evidence: `to update/main.go`)
- CLI and dispatch → Service worker: dispatches services (evidence: `to update/main.go`)
- Service worker → Session and CAPTCHA: starts session (evidence: `to update/main.go`)
- Session and CAPTCHA → Zefoy service: gets session and CAPTCHA (evidence: `to update/main.go`)
- Session and CAPTCHA → CAPTCHA API: requests solution (evidence: `to update/main.go`)
- Service worker → Service key lookup: looks up service key (evidence: `to update/main.go`)
- Service key lookup → Zefoy service: posts video search (evidence: `to update/main.go`)
- Service worker → Request submitter: submits repeatedly (evidence: `to update/main.go`)
- Request submitter → Zefoy service: posts engagement (evidence: `to update/main.go`)
- User → Legacy automation: starts legacy client (evidence: `to update/old/other/source.py`)
- Legacy automation → Zefoy service: drives browser (evidence: `to update/old/other/source.py`)
- User → Views automation: provides video URL (evidence: `to update/old/views.py`)
- Views automation → Zefoy service: drives views workflow (evidence: `to update/old/views.py`)
