# lij768423-svg/grok-register-panel architecture

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

- Interactive diagram: https://gitdiagram.com/lij768423-svg/grok-register-panel
- Repository: https://github.com/lij768423-svg/grok-register-panel

## Overview

This repository automates Grok account registration and provides a live control panel. The main user-to-result path is panel or batch launch → registration with a browser and mailbox OTP → SSO/device authorization → local auth-file output, with optional quality probing. The panel also manages proxy and email-domain pools, recovery, BFS checks, and monitoring. Relationships are limited to those shown in the README or SOURCE INDEX; several panel and batch internals were not sampled, so uncertain links are omitted.

Main entry points: [`webui/monitor.py`](https://github.com/lij768423-svg/grok-register-panel/blob/main/webui/monitor.py) (Live Monitor), [`grok_register_ttk.py`](https://github.com/lij768423-svg/grok-register-panel/blob/main/grok_register_ttk.py) (Batch Orchestrator), [`register_flow.py`](https://github.com/lij768423-svg/grok-register-panel/blob/main/register_flow.py) (Registration Flow), [`browser_session.py`](https://github.com/lij768423-svg/grok-register-panel/blob/main/browser_session.py) (Browser Session)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Registration Runtime"]
  node_batch["Batch Entrypoints<br/>[run_until_100.py]"]
  node_orchestrator["Batch Orchestrator"]
  node_registration["Registration Flow<br/>[register_flow.py]"]
  node_browser["Browser Session<br/>[browser_session.py]"]
  node_camoufox["Camoufox Adapter"]
  node_connectivity["出口预检<br/>[connectivity.py]"]
end

subgraph group_mail["Mailbox Services"]
  node_mailbox["Mailbox Providers"]
  node_mail_common["Mail OTP Helpers<br/>[common.py]"]
  node_mail_cloudflare["Cloudflare Mail<br/>[cloudflare.py]"]
  node_mail_moemail["MoeMail<br/>[moemail.py]"]
  node_mail_outlook["Outlook Inventory<br/>[outlook_rt.py]"]
end

subgraph group_panel["Live Panel"]
  node_proxy_pool[("Proxy Pool<br/>[proxy_store.py]")]
  node_domain_pool[("Email Domain Pool")]
  node_monitor["Live Monitor<br/>[monitor.py]"]
end

subgraph group_accounts["Account Operations"]
  node_recovery["SSO Recovery<br/>[recovery_ops.py]"]
  node_sso["SSO to Auth"]
  node_bfs["BFS Scan<br/>[bfs_ops.py]"]
  node_quality["Quality Probe<br/>[quality_probe.py]"]
  node_quality_ops["Quality Controls<br/>[quality_ops.py]"]
end

subgraph group_infra["Runtime Infrastructure"]
  node_traffic["Batch Traffic<br/>[batch_traffic.py]"]
  node_cache["Static Asset Cache"]
  node_retry["Retry Policy<br/>[retry_policy.py]"]
  node_supervisor["Batch Supervisor"]
  node_platform["Runtime Platform"]
  node_secure["Private File Helpers<br/>[secure_files.py]"]
  node_state[("Runtime State Files")]
end

node_user(("Operator"))

node_user -->|"controls"| node_monitor
node_user -->|"launches"| node_batch
node_monitor -->|"starts tasks"| node_batch
node_batch -.->|"runs batches"| node_orchestrator
node_orchestrator -->|"runs registration"| node_registration
node_registration -->|"uses session"| node_browser
node_browser -->|"adapts browser"| node_camoufox
node_registration -->|"gets OTP"| node_mailbox
node_mail_cloudflare -->|"uses helpers"| node_mail_common
node_mail_moemail -->|"uses helpers"| node_mail_common
node_mail_outlook -->|"uses helpers"| node_mail_common
node_orchestrator -.->|"prechecks egress"| node_connectivity
node_monitor -->|"manages"| node_proxy_pool
node_monitor -->|"manages"| node_domain_pool
node_monitor -->|"routes recovery"| node_recovery
node_recovery -->|"converts auth"| node_sso
node_monitor -->|"routes scans"| node_bfs
node_monitor -->|"routes probes"| node_quality_ops
node_quality_ops -->|"runs probe"| node_quality
node_orchestrator -->|"optional probe"| node_quality
node_orchestrator -.->|"measures traffic"| node_traffic
node_browser -->|"uses cache"| node_cache
node_supervisor -->|"uses policy"| node_retry
node_supervisor -->|"uses runtime"| node_platform
node_traffic -->|"uses file helpers"| node_secure
node_proxy_pool -->|"persists securely"| node_secure
node_domain_pool -->|"persists securely"| node_secure
node_monitor -->|"reads status"| node_state

click node_batch "https://github.com/lij768423-svg/grok-register-panel/blob/main/run_until_100.py"
click node_orchestrator "https://github.com/lij768423-svg/grok-register-panel/blob/main/grok_register_ttk.py"
click node_registration "https://github.com/lij768423-svg/grok-register-panel/blob/main/register_flow.py"
click node_browser "https://github.com/lij768423-svg/grok-register-panel/blob/main/browser_session.py"
click node_camoufox "https://github.com/lij768423-svg/grok-register-panel/blob/main/camoufox_adapter.py"
click node_mailbox "https://github.com/lij768423-svg/grok-register-panel/tree/main/email_providers"
click node_mail_common "https://github.com/lij768423-svg/grok-register-panel/blob/main/email_providers/common.py"
click node_mail_cloudflare "https://github.com/lij768423-svg/grok-register-panel/blob/main/email_providers/cloudflare.py"
click node_mail_moemail "https://github.com/lij768423-svg/grok-register-panel/blob/main/email_providers/moemail.py"
click node_mail_outlook "https://github.com/lij768423-svg/grok-register-panel/blob/main/email_providers/outlook_rt.py"
click node_connectivity "https://github.com/lij768423-svg/grok-register-panel/blob/main/connectivity.py"
click node_proxy_pool "https://github.com/lij768423-svg/grok-register-panel/blob/main/webui/proxy_store.py"
click node_domain_pool "https://github.com/lij768423-svg/grok-register-panel/blob/main/webui/email_domain_store.py"
click node_monitor "https://github.com/lij768423-svg/grok-register-panel/blob/main/webui/monitor.py"
click node_recovery "https://github.com/lij768423-svg/grok-register-panel/blob/main/webui/recovery_ops.py"
click node_sso "https://github.com/lij768423-svg/grok-register-panel/blob/main/sso_to_auth_json.py"
click node_bfs "https://github.com/lij768423-svg/grok-register-panel/blob/main/webui/bfs_ops.py"
click node_quality "https://github.com/lij768423-svg/grok-register-panel/blob/main/quality_probe.py"
click node_quality_ops "https://github.com/lij768423-svg/grok-register-panel/blob/main/webui/quality_ops.py"
click node_traffic "https://github.com/lij768423-svg/grok-register-panel/blob/main/batch_traffic.py"
click node_cache "https://github.com/lij768423-svg/grok-register-panel/blob/main/static_asset_cache.py"
click node_retry "https://github.com/lij768423-svg/grok-register-panel/blob/main/retry_policy.py"
click node_supervisor "https://github.com/lij768423-svg/grok-register-panel/blob/main/batch_supervisor.py"
click node_platform "https://github.com/lij768423-svg/grok-register-panel/blob/main/runtime_platform.py"
click node_secure "https://github.com/lij768423-svg/grok-register-panel/blob/main/secure_files.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_batch,node_orchestrator,node_registration,node_browser,node_camoufox,node_connectivity toneBlue
class node_mailbox,node_mail_common,node_mail_cloudflare,node_mail_moemail,node_mail_outlook toneAmber
class node_proxy_pool,node_domain_pool,node_monitor toneMint
class node_recovery,node_sso,node_bfs,node_quality,node_quality_ops toneRose
class node_traffic,node_cache,node_retry,node_supervisor,node_platform,node_secure,node_state,node_user toneIndigo
```

## Components

### Registration Runtime

- [Batch Entrypoints](https://github.com/lij768423-svg/grok-register-panel/blob/main/run_until_100.py): `run_until_100.py`
- [Batch Orchestrator](https://github.com/lij768423-svg/grok-register-panel/blob/main/grok_register_ttk.py): `grok_register_ttk.py`
- [Registration Flow](https://github.com/lij768423-svg/grok-register-panel/blob/main/register_flow.py): `register_flow.py`
- [Browser Session](https://github.com/lij768423-svg/grok-register-panel/blob/main/browser_session.py): `browser_session.py`
- [Camoufox Adapter](https://github.com/lij768423-svg/grok-register-panel/blob/main/camoufox_adapter.py): `camoufox_adapter.py`
- [出口预检](https://github.com/lij768423-svg/grok-register-panel/blob/main/connectivity.py): `connectivity.py`

### Mailbox Services

- [Mailbox Providers](https://github.com/lij768423-svg/grok-register-panel/tree/main/email_providers): `email_providers`
- [Mail OTP Helpers](https://github.com/lij768423-svg/grok-register-panel/blob/main/email_providers/common.py): `email_providers/common.py`
- [Cloudflare Mail](https://github.com/lij768423-svg/grok-register-panel/blob/main/email_providers/cloudflare.py): `email_providers/cloudflare.py`
- [MoeMail](https://github.com/lij768423-svg/grok-register-panel/blob/main/email_providers/moemail.py): `email_providers/moemail.py`
- [Outlook Inventory](https://github.com/lij768423-svg/grok-register-panel/blob/main/email_providers/outlook_rt.py): `email_providers/outlook_rt.py`

### Live Panel

- [Proxy Pool](https://github.com/lij768423-svg/grok-register-panel/blob/main/webui/proxy_store.py): `webui/proxy_store.py`
- [Email Domain Pool](https://github.com/lij768423-svg/grok-register-panel/blob/main/webui/email_domain_store.py): `webui/email_domain_store.py`
- [Live Monitor](https://github.com/lij768423-svg/grok-register-panel/blob/main/webui/monitor.py): `webui/monitor.py`

### Account Operations

- [SSO Recovery](https://github.com/lij768423-svg/grok-register-panel/blob/main/webui/recovery_ops.py): `webui/recovery_ops.py`
- [SSO to Auth](https://github.com/lij768423-svg/grok-register-panel/blob/main/sso_to_auth_json.py): `sso_to_auth_json.py`
- [BFS Scan](https://github.com/lij768423-svg/grok-register-panel/blob/main/webui/bfs_ops.py): `webui/bfs_ops.py`
- [Quality Probe](https://github.com/lij768423-svg/grok-register-panel/blob/main/quality_probe.py): `quality_probe.py`
- [Quality Controls](https://github.com/lij768423-svg/grok-register-panel/blob/main/webui/quality_ops.py): `webui/quality_ops.py`

### Runtime Infrastructure

- [Batch Traffic](https://github.com/lij768423-svg/grok-register-panel/blob/main/batch_traffic.py): `batch_traffic.py`
- [Static Asset Cache](https://github.com/lij768423-svg/grok-register-panel/blob/main/static_asset_cache.py): `static_asset_cache.py`
- [Retry Policy](https://github.com/lij768423-svg/grok-register-panel/blob/main/retry_policy.py): `retry_policy.py`
- [Batch Supervisor](https://github.com/lij768423-svg/grok-register-panel/blob/main/batch_supervisor.py): `batch_supervisor.py`
- [Runtime Platform](https://github.com/lij768423-svg/grok-register-panel/blob/main/runtime_platform.py): `runtime_platform.py`
- [Private File Helpers](https://github.com/lij768423-svg/grok-register-panel/blob/main/secure_files.py): `secure_files.py`
- **Runtime State Files**

### Other components

- **Operator**

## Connections

- Operator → Live Monitor: controls (evidence: `README.md`)
- Operator → Batch Entrypoints: launches (evidence: `README.md`)
- Live Monitor → Batch Entrypoints: starts tasks (evidence: `README.md`)
- Batch Entrypoints → Batch Orchestrator: runs batches
- Batch Orchestrator → Registration Flow: runs registration (evidence: `README.md`)
- Registration Flow → Browser Session: uses session (evidence: `register_flow.py`)
- Browser Session → Camoufox Adapter: adapts browser (evidence: `browser_session.py`)
- Registration Flow → Mailbox Providers: gets OTP (evidence: `README.md`)
- Cloudflare Mail → Mail OTP Helpers: uses helpers (evidence: `email_providers/cloudflare.py`)
- MoeMail → Mail OTP Helpers: uses helpers (evidence: `email_providers/moemail.py`)
- Outlook Inventory → Mail OTP Helpers: uses helpers (evidence: `email_providers/outlook_rt.py`)
- Batch Orchestrator → 出口预检: prechecks egress (evidence: `grok_register_ttk.py`)
- Live Monitor → Proxy Pool: manages (evidence: `webui/monitor.py`)
- Live Monitor → Email Domain Pool: manages (evidence: `webui/monitor.py`)
- Live Monitor → SSO Recovery: routes recovery (evidence: `webui/monitor.py`)
- SSO Recovery → SSO to Auth: converts auth (evidence: `webui/recovery_ops.py`)
- Live Monitor → BFS Scan: routes scans (evidence: `webui/monitor.py`)
- Live Monitor → Quality Controls: routes probes (evidence: `webui/monitor.py`)
- Quality Controls → Quality Probe: runs probe (evidence: `webui/quality_ops.py`)
- Batch Orchestrator → Quality Probe: optional probe (evidence: `README.md`)
- Batch Orchestrator → Batch Traffic: measures traffic (evidence: `grok_register_ttk.py`)
- Browser Session → Static Asset Cache: uses cache (evidence: `browser_session.py`)
- Batch Supervisor → Retry Policy: uses policy (evidence: `batch_supervisor.py`)
- Batch Supervisor → Runtime Platform: uses runtime (evidence: `batch_supervisor.py`)
- Batch Traffic → Private File Helpers: uses file helpers (evidence: `batch_traffic.py`)
- Proxy Pool → Private File Helpers: persists securely (evidence: `webui/proxy_store.py`)
- Email Domain Pool → Private File Helpers: persists securely (evidence: `webui/email_domain_store.py`)
- Live Monitor → Runtime State Files: reads status (evidence: `README.md`)
