# him0x/otp architecture

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

- Interactive diagram: https://gitdiagram.com/him0x/otp
- Repository: https://github.com/him0x/otp

## Overview

This is a command-line WhatsApp OTP-spamming tool with trial/premium licensing. The principal workflow is: a user enters the menu, the program checks license status, then a permitted single-round or premium run is delegated to the execution engine; trial use also updates quota. The README additionally advertises 39 APIs, threading, API-availability checks, auto-update checks, and an admin panel. The excerpts do not expose engine internals or substantiate those feature implementations, so they are represented only at a documented, high level; the license wrapper’s encrypted payload loading is visible.

Main entry points: [`main.py`](https://github.com/him0x/otp/blob/main/main.py) (Menu Console), [`license.py`](https://github.com/him0x/otp/blob/main/license.py) (License API), [`main_engine.py`](https://github.com/him0x/otp/blob/main/main_engine.py) (Run Engine), [`license_enc.py`](https://github.com/him0x/otp/blob/main/license_enc.py) (Encrypted License Payload)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User Interface"]
  node_console["Menu Console<br/>[main.py]"]
end

subgraph group_licensing["Licensing"]
  node_license_api["License API<br/>[license.py]"]
  node_license_payload["Encrypted License Payload<br/>[license_enc.py]"]
end

subgraph group_runtime["Execution Runtime"]
  node_engine["Run Engine<br/>[main_engine.py]"]
end

node_user(("CLI User"))
node_supabase[("Supabase")]

node_user -->|"chooses options"| node_console
node_console -->|"checks license"| node_license_api
node_license_api -->|"loads encrypted code"| node_license_payload
node_license_api -->|"uses backend"| node_supabase
node_console -->|"starts round"| node_engine
node_engine -->|"returns success"| node_console

click node_console "https://github.com/him0x/otp/blob/main/main.py"
click node_license_api "https://github.com/him0x/otp/blob/main/license.py"
click node_license_payload "https://github.com/him0x/otp/blob/main/license_enc.py"
click node_engine "https://github.com/him0x/otp/blob/main/main_engine.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_console,node_user toneBlue
class node_license_api,node_license_payload,node_supabase toneAmber
class node_engine toneMint
```

## Components

### User Interface

- [Menu Console](https://github.com/him0x/otp/blob/main/main.py): `main.py`

### Licensing

- [License API](https://github.com/him0x/otp/blob/main/license.py): `license.py`
- [Encrypted License Payload](https://github.com/him0x/otp/blob/main/license_enc.py): `license_enc.py`

### Execution Runtime

- [Run Engine](https://github.com/him0x/otp/blob/main/main_engine.py): `main_engine.py`

### Other components

- **CLI User**
- **Supabase**

## Connections

- CLI User → Menu Console: chooses options (evidence: `README.md`)
- Menu Console → License API: checks license (evidence: `main.py`)
- License API → Encrypted License Payload: loads encrypted code (evidence: `license.py`)
- License API → Supabase: uses backend (evidence: `README.md`)
- Menu Console → Run Engine: starts round (evidence: `main.py`)
- Run Engine → Menu Console: returns success (evidence: `main.py`)
