# vladimirchan/fetchotpapis architecture

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

- Interactive diagram: https://gitdiagram.com/vladimirchan/fetchotpapis
- Repository: https://github.com/vladimirchan/fetchotpapis

## Overview

This is a small Express application that repeatedly sends OTP requests to multiple external services and streams progress to a browser. The main workflow is browser controls → server loop → staggered service requests → streamed status updates; the server also accepts phone-number updates. `bruteforce.js` and `temp.js` are separate standalone request scripts, not part of that loop. The README is empty, and the excerpts do not show the page implementation, so browser interactions are represented only at the server endpoint level.

Main entry points: [`main.js`](https://github.com/vladimirchan/fetchotpapis/blob/main/main.js) (Express server), [`apiServices.js`](https://github.com/vladimirchan/fetchotpapis/blob/main/apiServices.js) (Service requests), [`bruteforce.js`](https://github.com/vladimirchan/fetchotpapis/blob/main/bruteforce.js) (Repeating requests), [`temp.js`](https://github.com/vladimirchan/fetchotpapis/blob/main/temp.js) (Housing request)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Web control"]
  node_server["Express server<br/>[main.js]"]
  node_page["Control page<br/>[index.html]"]
  node_runner["Staggered loop<br/>[main.js]"]
  node_phone["Phone setting<br/>[main.js]"]
end

subgraph group_services["OTP integrations"]
  node_api["Service requests<br/>[apiServices.js]"]
  node_remote{{"OTP services"}}
end

subgraph group_scripts["Standalone scripts"]
  node_brute["Repeating requests<br/>[bruteforce.js]"]
  node_housing["Housing request<br/>[temp.js]"]
end

node_browser(("Browser user"))

node_browser -->|"controls via HTTP"| node_server
node_server -->|"serves static files"| node_page
node_server -->|"starts or stops"| node_runner
node_server -->|"updates phone"| node_phone
node_runner -->|"invokes requests"| node_api
node_runner -->|"streams status"| node_server
node_phone -->|"sets phone"| node_api
node_api -->|"sends OTP requests"| node_remote
node_brute -->|"sends OTP requests"| node_remote
node_housing -->|"sends OTP request"| node_remote

click node_server "https://github.com/vladimirchan/fetchotpapis/blob/main/main.js"
click node_page "https://github.com/vladimirchan/fetchotpapis/blob/main/public/index.html"
click node_runner "https://github.com/vladimirchan/fetchotpapis/blob/main/main.js"
click node_phone "https://github.com/vladimirchan/fetchotpapis/blob/main/main.js"
click node_api "https://github.com/vladimirchan/fetchotpapis/blob/main/apiServices.js"
click node_brute "https://github.com/vladimirchan/fetchotpapis/blob/main/bruteforce.js"
click node_housing "https://github.com/vladimirchan/fetchotpapis/blob/main/temp.js"

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_server,node_page,node_runner,node_phone,node_browser toneBlue
class node_api,node_remote toneAmber
class node_brute,node_housing toneMint
```

## Components

### Web control

- [Express server](https://github.com/vladimirchan/fetchotpapis/blob/main/main.js): `main.js`
- [Control page](https://github.com/vladimirchan/fetchotpapis/blob/main/public/index.html): `public/index.html`
- [Staggered loop](https://github.com/vladimirchan/fetchotpapis/blob/main/main.js): `main.js`
- [Phone setting](https://github.com/vladimirchan/fetchotpapis/blob/main/main.js): `main.js`

### OTP integrations

- [Service requests](https://github.com/vladimirchan/fetchotpapis/blob/main/apiServices.js): `apiServices.js`
- **OTP services**

### Standalone scripts

- [Repeating requests](https://github.com/vladimirchan/fetchotpapis/blob/main/bruteforce.js): `bruteforce.js`
- [Housing request](https://github.com/vladimirchan/fetchotpapis/blob/main/temp.js): `temp.js`

### Other components

- **Browser user**

## Connections

- Browser user → Express server: controls via HTTP (evidence: `main.js`)
- Express server → Control page: serves static files (evidence: `main.js`)
- Express server → Staggered loop: starts or stops (evidence: `main.js`)
- Express server → Phone setting: updates phone (evidence: `main.js`)
- Staggered loop → Service requests: invokes requests (evidence: `main.js`)
- Staggered loop → Express server: streams status (evidence: `main.js`)
- Phone setting → Service requests: sets phone (evidence: `main.js`)
- Service requests → OTP services: sends OTP requests (evidence: `apiServices.js`)
- Repeating requests → OTP services: sends OTP requests (evidence: `bruteforce.js`)
- Housing request → OTP services: sends OTP request (evidence: `temp.js`)
