# lxf746/any-auto-register architecture

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

- Interactive diagram: https://gitdiagram.com/lxf746/any-auto-register
- Repository: https://github.com/lxf746/any-auto-register

## Overview

Any Auto Register is a desktop/web application for automating account registration across 11+ platforms, then managing accounts and registration tasks. The main workflow runs from user-configured registration through task orchestration, provider/platform execution, and persistence; operational branches cover account lifecycle, analytics, exports, and Any2API synchronization. A separate customer-portal API and a Turnstile solver are also present. The map uses README and SOURCE INDEX relationships plus shown imports; unsampled subsystem internals and several runtime links are intentionally left unspecified.

Main entry points: [`application/tasks.py`](https://github.com/lxf746/any-auto-register/blob/main/application/tasks.py) (Task orchestration), [`main.py`](https://github.com/lxf746/any-auto-register/blob/main/main.py) (Main API), [`infrastructure/accounts_repository.py`](https://github.com/lxf746/any-auto-register/blob/main/infrastructure/accounts_repository.py) (Account storage), [`frontend/src/App.tsx`](https://github.com/lxf746/any-auto-register/blob/main/frontend/src/App.tsx) (Desktop UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client interfaces"]
  node_frontend["Desktop UI<br/>[App.tsx]"]
  node_http_app["Main API<br/>[main.py]"]
  node_api_routes["API routes"]
end

subgraph group_workflow["Registration workflow"]
  node_task_service["Task orchestration<br/>[tasks.py]"]
  node_task_runtime["Task runtime<br/>[task_runtime.py]"]
  node_platform_registry["Platform registry<br/>[registry.py]"]
  node_platform_drivers["Platform drivers"]
  node_identity["Identity handling<br/>[base_identity.py]"]
  node_browser_oauth["Browser OAuth<br/>[oauth_browser.py]"]
end

subgraph group_providers["Registration integrations"]
  node_mailbox["Mailbox drivers<br/>[base_mailbox.py]"]
  node_captcha_sms["Captcha and SMS<br/>[base_sms.py]"]
  node_provider_catalog["Provider catalog"]
  node_provider_settings["Provider settings"]
  node_proxy_pool["Proxy pool<br/>[proxy_pool.py]"]
end

subgraph group_operations["Account operations"]
  node_account_store[("Account storage")]
  node_account_graph["Account lifecycle data<br/>[account_graph.py]"]
  node_database[("SQLite models<br/>[db.py]")]
  node_task_queries["Task history<br/>[tasks_query.py]"]
  node_any2api["Any2API sync<br/>[any2api_sync.py]"]
end

subgraph group_portal["Portal and solver"]
  node_portal_api["Customer portal API<br/>[main.py]"]
  node_solver["Turnstile solver<br/>[api_solver.py]"]
end

node_user(("Operator"))

node_user -->|"operates"| node_frontend
node_frontend -.->|"uses API"| node_http_app
node_http_app -->|"mounts"| node_api_routes
node_http_app -->|"starts"| node_task_runtime
node_task_runtime -.->|"runs tasks"| node_task_service
node_task_service -->|"resolves platforms"| node_platform_registry
node_platform_registry -->|"loads drivers"| node_platform_drivers
node_task_service -->|"uses identity"| node_identity
node_task_service -->|"uses mailbox"| node_mailbox
node_task_service -->|"uses SMS"| node_captcha_sms
node_task_service -->|"resolves settings"| node_provider_settings
node_provider_settings -->|"reads definitions"| node_provider_catalog
node_task_service -->|"uses proxies"| node_proxy_pool
node_browser_oauth -->|"normalizes providers"| node_identity
node_task_service -.->|"persists accounts"| node_account_store
node_account_store -->|"loads and patches"| node_account_graph
node_account_store -->|"reads and writes"| node_database
node_task_queries -.->|"reads task data"| node_database
node_task_service -->|"syncs accounts"| node_any2api
node_http_app -->|"starts solver"| node_solver
node_user -.->|"uses portal"| node_portal_api

click node_frontend "https://github.com/lxf746/any-auto-register/blob/main/frontend/src/App.tsx"
click node_http_app "https://github.com/lxf746/any-auto-register/blob/main/main.py"
click node_api_routes "https://github.com/lxf746/any-auto-register/tree/main/api"
click node_task_service "https://github.com/lxf746/any-auto-register/blob/main/application/tasks.py"
click node_task_runtime "https://github.com/lxf746/any-auto-register/blob/main/services/task_runtime.py"
click node_platform_registry "https://github.com/lxf746/any-auto-register/blob/main/core/registry.py"
click node_platform_drivers "https://github.com/lxf746/any-auto-register/tree/main/platforms"
click node_identity "https://github.com/lxf746/any-auto-register/blob/main/core/base_identity.py"
click node_browser_oauth "https://github.com/lxf746/any-auto-register/blob/main/core/oauth_browser.py"
click node_mailbox "https://github.com/lxf746/any-auto-register/blob/main/core/base_mailbox.py"
click node_captcha_sms "https://github.com/lxf746/any-auto-register/blob/main/core/base_sms.py"
click node_provider_catalog "https://github.com/lxf746/any-auto-register/blob/main/infrastructure/provider_definitions_repository.py"
click node_provider_settings "https://github.com/lxf746/any-auto-register/blob/main/infrastructure/provider_settings_repository.py"
click node_proxy_pool "https://github.com/lxf746/any-auto-register/blob/main/core/proxy_pool.py"
click node_account_store "https://github.com/lxf746/any-auto-register/blob/main/infrastructure/accounts_repository.py"
click node_account_graph "https://github.com/lxf746/any-auto-register/blob/main/core/account_graph.py"
click node_database "https://github.com/lxf746/any-auto-register/blob/main/core/db.py"
click node_task_queries "https://github.com/lxf746/any-auto-register/blob/main/application/tasks_query.py"
click node_any2api "https://github.com/lxf746/any-auto-register/blob/main/core/any2api_sync.py"
click node_portal_api "https://github.com/lxf746/any-auto-register/blob/main/customer_portal_api/main.py"
click node_solver "https://github.com/lxf746/any-auto-register/blob/main/services/turnstile_solver/api_solver.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_frontend,node_http_app,node_api_routes toneBlue
class node_task_service,node_task_runtime,node_platform_registry,node_platform_drivers,node_identity,node_browser_oauth toneAmber
class node_mailbox,node_captcha_sms,node_provider_catalog,node_provider_settings,node_proxy_pool toneMint
class node_account_store,node_account_graph,node_database,node_task_queries,node_any2api toneRose
class node_portal_api,node_solver,node_user toneIndigo
```

## Components

### Client interfaces

- [Desktop UI](https://github.com/lxf746/any-auto-register/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Main API](https://github.com/lxf746/any-auto-register/blob/main/main.py): `main.py`
- [API routes](https://github.com/lxf746/any-auto-register/tree/main/api): `api`

### Registration workflow

- [Task orchestration](https://github.com/lxf746/any-auto-register/blob/main/application/tasks.py): `application/tasks.py`
- [Task runtime](https://github.com/lxf746/any-auto-register/blob/main/services/task_runtime.py): `services/task_runtime.py`
- [Platform registry](https://github.com/lxf746/any-auto-register/blob/main/core/registry.py): `core/registry.py`
- [Platform drivers](https://github.com/lxf746/any-auto-register/tree/main/platforms): `platforms`
- [Identity handling](https://github.com/lxf746/any-auto-register/blob/main/core/base_identity.py): `core/base_identity.py`
- [Browser OAuth](https://github.com/lxf746/any-auto-register/blob/main/core/oauth_browser.py): `core/oauth_browser.py`

### Registration integrations

- [Mailbox drivers](https://github.com/lxf746/any-auto-register/blob/main/core/base_mailbox.py): `core/base_mailbox.py`
- [Captcha and SMS](https://github.com/lxf746/any-auto-register/blob/main/core/base_sms.py): `core/base_sms.py`
- [Provider catalog](https://github.com/lxf746/any-auto-register/blob/main/infrastructure/provider_definitions_repository.py): `infrastructure/provider_definitions_repository.py`
- [Provider settings](https://github.com/lxf746/any-auto-register/blob/main/infrastructure/provider_settings_repository.py): `infrastructure/provider_settings_repository.py`
- [Proxy pool](https://github.com/lxf746/any-auto-register/blob/main/core/proxy_pool.py): `core/proxy_pool.py`

### Account operations

- [Account storage](https://github.com/lxf746/any-auto-register/blob/main/infrastructure/accounts_repository.py): `infrastructure/accounts_repository.py`
- [Account lifecycle data](https://github.com/lxf746/any-auto-register/blob/main/core/account_graph.py): `core/account_graph.py`
- [SQLite models](https://github.com/lxf746/any-auto-register/blob/main/core/db.py): `core/db.py`
- [Task history](https://github.com/lxf746/any-auto-register/blob/main/application/tasks_query.py): `application/tasks_query.py`
- [Any2API sync](https://github.com/lxf746/any-auto-register/blob/main/core/any2api_sync.py): `core/any2api_sync.py`

### Portal and solver

- [Customer portal API](https://github.com/lxf746/any-auto-register/blob/main/customer_portal_api/main.py): `customer_portal_api/main.py`
- [Turnstile solver](https://github.com/lxf746/any-auto-register/blob/main/services/turnstile_solver/api_solver.py): `services/turnstile_solver/api_solver.py`

### Other components

- **Operator**

## Connections

- Operator → Desktop UI: operates
- Desktop UI → Main API: uses API
- Main API → API routes: mounts (evidence: `main.py`)
- Main API → Task runtime: starts (evidence: `main.py`)
- Task runtime → Task orchestration: runs tasks
- Task orchestration → Platform registry: resolves platforms (evidence: `application/tasks.py`)
- Platform registry → Platform drivers: loads drivers (evidence: `core/registry.py`)
- Task orchestration → Identity handling: uses identity (evidence: `application/tasks.py`)
- Task orchestration → Mailbox drivers: uses mailbox (evidence: `application/tasks.py`)
- Task orchestration → Captcha and SMS: uses SMS (evidence: `application/tasks.py`)
- Task orchestration → Provider settings: resolves settings (evidence: `application/tasks.py`)
- Provider settings → Provider catalog: reads definitions (evidence: `infrastructure/provider_settings_repository.py`)
- Task orchestration → Proxy pool: uses proxies (evidence: `application/tasks.py`)
- Browser OAuth → Identity handling: normalizes providers (evidence: `core/oauth_browser.py`)
- Task orchestration → Account storage: persists accounts
- Account storage → Account lifecycle data: loads and patches (evidence: `infrastructure/accounts_repository.py`)
- Account storage → SQLite models: reads and writes (evidence: `infrastructure/accounts_repository.py`)
- Task history → SQLite models: reads task data
- Task orchestration → Any2API sync: syncs accounts (evidence: `application/tasks.py`)
- Main API → Turnstile solver: starts solver (evidence: `main.py`)
- Operator → Customer portal API: uses portal
