# matheuszwilk/proxybet architecture

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

- Interactive diagram: https://gitdiagram.com/matheuszwilk/proxybet
- Repository: https://github.com/matheuszwilk/proxybet

## Overview

ProxyBet is an Electron launcher and per-account automation system. Its main workflow is to accept an operation from the renderer, dispatch it through the main process, and run browser-backed sessions through the automation engine; a separate quick-operation path calls provider APIs without opening a browser. The tree also includes a browser extension, Mercado Pago tooling, and financial services. Several connections are based on explicit comments and SOURCE INDEX references; unsampled extension and renderer wiring is left unasserted.

Main entry points: [`src/main/instance/engine/motor.js`](https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/motor.js) (Automation motor), [`src/main/instance/engine/quick-op-runner.js`](https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/quick-op-runner.js) (Quick-op runner), [`src/main/index.js`](https://github.com/matheuszwilk/proxybet/blob/main/src/main/index.js) (Main process), [`src/renderer/play-controller.js`](https://github.com/matheuszwilk/proxybet/blob/main/src/renderer/play-controller.js) (Renderer controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_renderer["Renderer controls<br/>[play-controller.js]"]
  node_main["Main process<br/>[index.js]"]
  node_extension["Browser extension<br/>[content.js]"]
  node_mainworld["Page overlays<br/>[60-image-scale.js]"]
end

subgraph group_engine["Session automation"]
  node_motor["Automation motor<br/>[motor.js]"]
  node_browser["Account browser<br/>[navegador.js]"]
  node_chromium["Chromium setup<br/>[chromium.js]"]
  node_windowing["Window placement<br/>[janelas.js]"]
  node_mirror["Mirror mode<br/>[espelho.js]"]
  node_proxyip["Proxy IP check<br/>[proxy-ip.js]"]
end

subgraph group_quick["Quick operations"]
  node_quickrunner["Quick-op runner<br/>[quick-op-runner.js]"]
  node_transport["HTTP transport<br/>[rt-transport.js]"]
  node_providers["Game providers<br/>[index.js]"]
end

subgraph group_integrations["External integrations"]
  node_finance["Financial services<br/>[financeiro.js]"]
end

node_user(("Operator"))
node_providerapi["Casino APIs"]
node_smspsp["SMS and payment APIs"]

node_user -.->|"operates"| node_renderer
node_renderer -.->|"requests operations"| node_main
node_main -->|"dispatches sessions"| node_motor
node_main -->|"dispatches quick ops"| node_quickrunner
node_motor -->|"manages sessions"| node_browser
node_motor -->|"positions windows"| node_windowing
node_motor -->|"delegates mirror"| node_mirror
node_motor -->|"tests proxy IP"| node_proxyip
node_motor -->|"uses Chromium"| node_chromium
node_motor -.->|"launches with extension"| node_extension
node_extension -.->|"injects page scripts"| node_mainworld
node_quickrunner -->|"creates sessions"| node_transport
node_quickrunner -->|"uses game clients"| node_providers
node_quickrunner -->|"uses financial services"| node_finance
node_providers -.->|"connects to casinos"| node_providerapi
node_finance -->|"calls service APIs"| node_smspsp

click node_renderer "https://github.com/matheuszwilk/proxybet/blob/main/src/renderer/play-controller.js"
click node_main "https://github.com/matheuszwilk/proxybet/blob/main/src/main/index.js"
click node_extension "https://github.com/matheuszwilk/proxybet/blob/main/src/ext/content.js"
click node_mainworld "https://github.com/matheuszwilk/proxybet/blob/main/src/ext/main-world/60-image-scale.js"
click node_motor "https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/motor.js"
click node_browser "https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/navegador.js"
click node_chromium "https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/chromium.js"
click node_windowing "https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/janelas.js"
click node_mirror "https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/espelho.js"
click node_proxyip "https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/proxy-ip.js"
click node_quickrunner "https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/quick-op-runner.js"
click node_transport "https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/rt-transport.js"
click node_providers "https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/game-providers/index.js"
click node_finance "https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/servicos/financeiro.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_renderer,node_main,node_extension,node_mainworld toneBlue
class node_motor,node_browser,node_chromium,node_windowing,node_mirror,node_proxyip toneAmber
class node_quickrunner,node_transport,node_providers,node_providerapi,node_smspsp toneMint
class node_finance toneRose
class node_user toneIndigo
```

## Components

### Desktop interface

- [Renderer controls](https://github.com/matheuszwilk/proxybet/blob/main/src/renderer/play-controller.js): `src/renderer/play-controller.js`
- [Main process](https://github.com/matheuszwilk/proxybet/blob/main/src/main/index.js): `src/main/index.js`
- [Browser extension](https://github.com/matheuszwilk/proxybet/blob/main/src/ext/content.js): `src/ext/content.js`
- [Page overlays](https://github.com/matheuszwilk/proxybet/blob/main/src/ext/main-world/60-image-scale.js): `src/ext/main-world/60-image-scale.js`

### Session automation

- [Automation motor](https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/motor.js): `src/main/instance/engine/motor.js`
- [Account browser](https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/navegador.js): `src/main/instance/engine/navegador.js`
- [Chromium setup](https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/chromium.js): `src/main/instance/engine/chromium.js`
- [Window placement](https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/janelas.js): `src/main/instance/engine/janelas.js`
- [Mirror mode](https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/espelho.js): `src/main/instance/engine/espelho.js`
- [Proxy IP check](https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/proxy-ip.js): `src/main/instance/engine/proxy-ip.js`

### Quick operations

- [Quick-op runner](https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/quick-op-runner.js): `src/main/instance/engine/quick-op-runner.js`
- [HTTP transport](https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/rt-transport.js): `src/main/instance/engine/rt-transport.js`
- [Game providers](https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/engine/game-providers/index.js): `src/main/instance/engine/game-providers/index.js`

### External integrations

- [Financial services](https://github.com/matheuszwilk/proxybet/blob/main/src/main/instance/servicos/financeiro.js): `src/main/instance/servicos/financeiro.js`

### Other components

- **Operator**
- **Casino APIs**
- **SMS and payment APIs**

## Connections

- Operator → Renderer controls: operates
- Renderer controls → Main process: requests operations
- Main process → Automation motor: dispatches sessions (evidence: `src/main/index.js`)
- Main process → Quick-op runner: dispatches quick ops (evidence: `src/main/index.js`)
- Automation motor → Account browser: manages sessions (evidence: `src/main/instance/engine/motor.js`)
- Automation motor → Window placement: positions windows (evidence: `src/main/instance/engine/motor.js`)
- Automation motor → Mirror mode: delegates mirror (evidence: `src/main/instance/engine/motor.js`)
- Automation motor → Proxy IP check: tests proxy IP (evidence: `src/main/instance/engine/motor.js`)
- Automation motor → Chromium setup: uses Chromium (evidence: `src/main/instance/engine/motor.js`)
- Automation motor → Browser extension: launches with extension
- Browser extension → Page overlays: injects page scripts
- Quick-op runner → HTTP transport: creates sessions (evidence: `src/main/instance/engine/quick-op-runner.js`)
- Quick-op runner → Game providers: uses game clients (evidence: `src/main/instance/engine/quick-op-runner.js`)
- Quick-op runner → Financial services: uses financial services (evidence: `src/main/instance/engine/quick-op-runner.js`)
- Game providers → Casino APIs: connects to casinos
- Financial services → SMS and payment APIs: calls service APIs (evidence: `src/main/instance/servicos/financeiro.js`)
