# mrjumady/edotrefferal architecture

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

- Interactive diagram: https://gitdiagram.com/mrjumady/edotrefferal
- Repository: https://github.com/mrjumady/edotrefferal

## Overview

This is a small PHP command-line script for automating Edot referral-account registration using AdaOTP verification. The visible workflow creates an Edot token, obtains a suggested username, requests an AdaOTP phone order, sends and verifies an OTP, registers the account, then follows the registration redirect. The single source file also contains HTTP, parsing, and random-string helpers. The README gives no further capability detail, and excerpts omit parts of the workflow, so the graph includes only relationships visible in the shown source.

Main entry points: [`edot_refferal.php`](https://github.com/mrjumady/edotrefferal/blob/main/edot_refferal.php) (Referral automation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Registration workflow"]
  node_automation["Referral automation<br/>[edot_refferal.php]"]
end

subgraph group_helpers["Internal helpers"]
  node_http["HTTP client<br/>[edot_refferal.php]"]
  node_parsing["Response parsing<br/>[edot_refferal.php]"]
  node_random["Random device ID<br/>[edot_refferal.php]"]
end

subgraph group_services["External services"]
  node_edot["Edot accounts API"]
  node_adaotp["AdaOTP service"]
end

node_cli(("CLI operator"))

node_cli -->|"runs"| node_automation
node_automation -->|"generates ID"| node_random
node_automation -->|"sends requests"| node_http
node_automation -->|"parses responses"| node_parsing
node_automation -->|"requests token and registers"| node_edot
node_automation -->|"orders and verifies OTP"| node_adaotp

click node_automation "https://github.com/mrjumady/edotrefferal/blob/main/edot_refferal.php"
click node_http "https://github.com/mrjumady/edotrefferal/blob/main/edot_refferal.php"
click node_parsing "https://github.com/mrjumady/edotrefferal/blob/main/edot_refferal.php"
click node_random "https://github.com/mrjumady/edotrefferal/blob/main/edot_refferal.php"

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_automation toneBlue
class node_http,node_parsing,node_random toneAmber
class node_edot,node_adaotp toneMint
class node_cli toneIndigo
```

## Components

### Registration workflow

- [Referral automation](https://github.com/mrjumady/edotrefferal/blob/main/edot_refferal.php): `edot_refferal.php`

### Internal helpers

- [HTTP client](https://github.com/mrjumady/edotrefferal/blob/main/edot_refferal.php): `edot_refferal.php`
- [Response parsing](https://github.com/mrjumady/edotrefferal/blob/main/edot_refferal.php): `edot_refferal.php`
- [Random device ID](https://github.com/mrjumady/edotrefferal/blob/main/edot_refferal.php): `edot_refferal.php`

### External services

- **Edot accounts API**
- **AdaOTP service**

### Other components

- **CLI operator**

## Connections

- CLI operator → Referral automation: runs (evidence: `edot_refferal.php`)
- Referral automation → Random device ID: generates ID (evidence: `edot_refferal.php`)
- Referral automation → HTTP client: sends requests (evidence: `edot_refferal.php`)
- Referral automation → Response parsing: parses responses (evidence: `edot_refferal.php`)
- Referral automation → Edot accounts API: requests token and registers (evidence: `edot_refferal.php`)
- Referral automation → AdaOTP service: orders and verifies OTP (evidence: `edot_refferal.php`)
