# raghubirmahato/facebook architecture

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

- Interactive diagram: https://gitdiagram.com/raghubirmahato/facebook
- Repository: https://github.com/raghubirmahato/facebook

## Overview

The toolkit’s principal workflow accepts a login mode and credentials, runs Facebook login attempts concurrently, handles login challenges and errors, and records successful results. A separate utility generates phone-style usernames and saves them to a text file. The graph reflects documented features and visible calls; some implementation details and the connection between username generation and login attempts were not shown, so they are not inferred.

Main entry points: [`facebook.py`](https://github.com/raghubirmahato/facebook/blob/main/facebook.py) (Login attempt), [`user.py`](https://github.com/raghubirmahato/facebook/blob/main/user.py) (Username generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Attempt orchestration"]
  node_mode_selection["Mode selection<br/>[facebook.py]"]
  node_single_user["Single-user runner<br/>[facebook.py]"]
  node_multi_user["Multi-user runner<br/>[facebook.py]"]
  node_success_results["Successful results<br/>[facebook.py]"]
end

subgraph group_login["Login automation"]
  node_login_attempt["Login attempt<br/>[facebook.py]"]
  node_error_recovery["Error recovery<br/>[facebook.py]"]
end

subgraph group_support["Supporting capabilities"]
  node_captcha_ocr["CAPTCHA OCR<br/>[facebook.py]"]
  node_sqlite[("Results database<br/>[facebook.py]")]
  node_username_generator["Username generator<br/>[user.py]"]
end

node_operator(("Operator"))
node_facebook{{"Facebook"}}
node_operator_input(("Generation input"))
node_username_file["Username text file"]
node_selenium{{"Chrome WebDriver"}}
node_tesseract{{"Tesseract OCR"}}

node_operator -->|"chooses mode"| node_mode_selection
node_mode_selection -->|"dispatches"| node_single_user
node_mode_selection -->|"dispatches"| node_multi_user
node_single_user -->|"schedules attempts"| node_login_attempt
node_multi_user -->|"schedules attempts"| node_login_attempt
node_login_attempt -->|"controls browser"| node_selenium
node_login_attempt -->|"submits login"| node_facebook
node_login_attempt -->|"checks errors"| node_error_recovery
node_login_attempt -->|"solves CAPTCHA"| node_captcha_ocr
node_captcha_ocr -->|"extracts text"| node_tesseract
node_single_user -->|"collects successes"| node_success_results
node_multi_user -->|"collects successes"| node_success_results
node_success_results -->|"stores results"| node_sqlite
node_operator_input -->|"provides settings"| node_username_generator
node_username_generator -->|"writes usernames"| node_username_file

click node_mode_selection "https://github.com/raghubirmahato/facebook/blob/main/facebook.py"
click node_single_user "https://github.com/raghubirmahato/facebook/blob/main/facebook.py"
click node_multi_user "https://github.com/raghubirmahato/facebook/blob/main/facebook.py"
click node_login_attempt "https://github.com/raghubirmahato/facebook/blob/main/facebook.py"
click node_error_recovery "https://github.com/raghubirmahato/facebook/blob/main/facebook.py"
click node_captcha_ocr "https://github.com/raghubirmahato/facebook/blob/main/facebook.py"
click node_success_results "https://github.com/raghubirmahato/facebook/blob/main/facebook.py"
click node_sqlite "https://github.com/raghubirmahato/facebook/blob/main/facebook.py"
click node_username_generator "https://github.com/raghubirmahato/facebook/blob/main/user.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_mode_selection,node_single_user,node_multi_user,node_success_results,node_username_file toneBlue
class node_login_attempt,node_error_recovery toneAmber
class node_captcha_ocr,node_sqlite,node_username_generator toneMint
class node_operator,node_facebook,node_operator_input,node_selenium,node_tesseract toneIndigo
```

## Components

### Attempt orchestration

- [Mode selection](https://github.com/raghubirmahato/facebook/blob/main/facebook.py): `facebook.py`
- [Single-user runner](https://github.com/raghubirmahato/facebook/blob/main/facebook.py): `facebook.py`
- [Multi-user runner](https://github.com/raghubirmahato/facebook/blob/main/facebook.py): `facebook.py`
- [Successful results](https://github.com/raghubirmahato/facebook/blob/main/facebook.py): `facebook.py`

### Login automation

- [Login attempt](https://github.com/raghubirmahato/facebook/blob/main/facebook.py): `facebook.py`
- [Error recovery](https://github.com/raghubirmahato/facebook/blob/main/facebook.py): `facebook.py`

### Supporting capabilities

- [CAPTCHA OCR](https://github.com/raghubirmahato/facebook/blob/main/facebook.py): `facebook.py`
- [Results database](https://github.com/raghubirmahato/facebook/blob/main/facebook.py): `facebook.py`
- [Username generator](https://github.com/raghubirmahato/facebook/blob/main/user.py): `user.py`

### Other components

- **Operator**
- **Facebook**
- **Generation input**
- **Username text file**
- **Chrome WebDriver**
- **Tesseract OCR**

## Connections

- Operator → Mode selection: chooses mode (evidence: `facebook.py`)
- Mode selection → Single-user runner: dispatches (evidence: `facebook.py`)
- Mode selection → Multi-user runner: dispatches (evidence: `facebook.py`)
- Single-user runner → Login attempt: schedules attempts (evidence: `facebook.py`)
- Multi-user runner → Login attempt: schedules attempts (evidence: `facebook.py`)
- Login attempt → Chrome WebDriver: controls browser (evidence: `facebook.py`)
- Login attempt → Facebook: submits login (evidence: `facebook.py`)
- Login attempt → Error recovery: checks errors (evidence: `facebook.py`)
- Login attempt → CAPTCHA OCR: solves CAPTCHA (evidence: `facebook.py`)
- CAPTCHA OCR → Tesseract OCR: extracts text (evidence: `facebook.py`)
- Single-user runner → Successful results: collects successes (evidence: `facebook.py`)
- Multi-user runner → Successful results: collects successes (evidence: `facebook.py`)
- Successful results → Results database: stores results (evidence: `facebook.py`)
- Generation input → Username generator: provides settings (evidence: `user.py`)
- Username generator → Username text file: writes usernames (evidence: `user.py`)
