# andrewmbarros/imigra architecture

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

- Interactive diagram: https://gitdiagram.com/andrewmbarros/imigra
- Repository: https://github.com/andrewmbarros/imigra

## Overview

Imigra is a desktop RPA tool for migrating PBX settings from 3CX to Yeastar. The user enters cloud identifiers and a client name in the GUI, then starts individual migration steps or a sequence. Extension migration exports 3CX data, converts it to Yeastar’s import layout, and uploads it; other modules handle trunks, groups, permissions, and outbound rules. Queues and inbound routes are represented in the interface but are unfinished. The excerpts show the GUI dispatch and several automation routines; unsampled modules and parts of the extension workflow limit detail on their internal steps.

Main entry points: [`main.py`](https://github.com/andrewmbarros/imigra/blob/main/main.py) (GUI and dispatch), [`src/utils/navegador.py`](https://github.com/andrewmbarros/imigra/blob/main/src/utils/navegador.py) (Browser and login), [`src/rpa/extensoes.py`](https://github.com/andrewmbarros/imigra/blob/main/src/rpa/extensoes.py) (Extension migration), [`src/rpa/troncos.py`](https://github.com/andrewmbarros/imigra/blob/main/src/rpa/troncos.py) (Trunk migration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_gui["GUI and dispatch<br/>[main.py]"]
end

subgraph group_migration["Migration workflows"]
  node_extensions["Extension migration<br/>[extensoes.py]"]
  node_trunks["Trunk migration<br/>[troncos.py]"]
  node_queues["Queue migration<br/>[filas.py]"]
  node_groups["Extension groups<br/>[grupos_extensao.py]"]
  node_permissions["Client permissions<br/>[permissoes.py]"]
  node_outbound["Outbound rules<br/>[regras_saida.py]"]
  node_inbound["Inbound routes<br/>[main.py]"]
end

subgraph group_automation["Browser automation"]
  node_browser["Browser and login<br/>[navegador.py]"]
end

subgraph group_data["Data processing"]
  node_etl["CSV conversion<br/>[processador.py]"]
  node_csvdata[("Migration CSV files<br/>[settings.py]")]
end

subgraph group_configuration["Configuration"]
  node_settings["Settings and credentials<br/>[settings.py]"]
end

node_user(("Migration operator"))
node_threecx["3CX cloud panel"]
node_yeastar["Yeastar cloud panel"]

node_user -->|"enters settings"| node_gui
node_gui -->|"dispatches"| node_extensions
node_gui -->|"dispatches"| node_trunks
node_gui -->|"dispatches"| node_queues
node_gui -->|"dispatches"| node_groups
node_gui -->|"dispatches"| node_permissions
node_gui -->|"dispatches"| node_outbound
node_gui -->|"shows unfinished"| node_inbound
node_gui -->|"runs ETL"| node_etl
node_extensions -->|"exports settings"| node_threecx
node_extensions -->|"converts export"| node_etl
node_etl -->|"reads and writes"| node_csvdata
node_extensions -->|"imports extensions"| node_yeastar
node_trunks -->|"reads trunks"| node_threecx
node_trunks -->|"writes CSV"| node_csvdata
node_trunks -->|"imports trunks"| node_yeastar
node_groups -->|"creates group"| node_yeastar
node_permissions -->|"sets permissions"| node_yeastar
node_outbound -->|"reads rules"| node_threecx
node_outbound -->|"registers rules"| node_yeastar
node_extensions -->|"uses browser"| node_browser
node_trunks -->|"uses browser"| node_browser
node_groups -->|"uses browser"| node_browser
node_permissions -->|"uses browser"| node_browser
node_outbound -->|"uses browser"| node_browser
node_browser -->|"logs in"| node_threecx
node_browser -->|"logs in"| node_yeastar
node_extensions -->|"loads cloud URLs"| node_settings
node_trunks -->|"loads paths and URLs"| node_settings
node_etl -->|"loads data paths"| node_settings
node_browser -->|"loads credentials"| node_settings

click node_gui "https://github.com/andrewmbarros/imigra/blob/main/main.py"
click node_settings "https://github.com/andrewmbarros/imigra/blob/main/config/settings.py"
click node_extensions "https://github.com/andrewmbarros/imigra/blob/main/src/rpa/extensoes.py"
click node_trunks "https://github.com/andrewmbarros/imigra/blob/main/src/rpa/troncos.py"
click node_queues "https://github.com/andrewmbarros/imigra/blob/main/src/rpa/filas.py"
click node_groups "https://github.com/andrewmbarros/imigra/blob/main/src/rpa/grupos_extensao.py"
click node_permissions "https://github.com/andrewmbarros/imigra/blob/main/src/rpa/permissoes.py"
click node_outbound "https://github.com/andrewmbarros/imigra/blob/main/src/rpa/regras_saida.py"
click node_inbound "https://github.com/andrewmbarros/imigra/blob/main/main.py"
click node_browser "https://github.com/andrewmbarros/imigra/blob/main/src/utils/navegador.py"
click node_etl "https://github.com/andrewmbarros/imigra/blob/main/src/etl/processador.py"
click node_csvdata "https://github.com/andrewmbarros/imigra/blob/main/config/settings.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_gui toneBlue
class node_extensions,node_trunks,node_queues,node_groups,node_permissions,node_outbound,node_inbound toneAmber
class node_browser toneMint
class node_etl,node_csvdata toneRose
class node_settings,node_user,node_threecx,node_yeastar toneIndigo
```

## Components

### Desktop interface

- [GUI and dispatch](https://github.com/andrewmbarros/imigra/blob/main/main.py): `main.py`

### Migration workflows

- [Extension migration](https://github.com/andrewmbarros/imigra/blob/main/src/rpa/extensoes.py): `src/rpa/extensoes.py`
- [Trunk migration](https://github.com/andrewmbarros/imigra/blob/main/src/rpa/troncos.py): `src/rpa/troncos.py`
- [Queue migration](https://github.com/andrewmbarros/imigra/blob/main/src/rpa/filas.py): `src/rpa/filas.py`
- [Extension groups](https://github.com/andrewmbarros/imigra/blob/main/src/rpa/grupos_extensao.py): `src/rpa/grupos_extensao.py`
- [Client permissions](https://github.com/andrewmbarros/imigra/blob/main/src/rpa/permissoes.py): `src/rpa/permissoes.py`
- [Outbound rules](https://github.com/andrewmbarros/imigra/blob/main/src/rpa/regras_saida.py): `src/rpa/regras_saida.py`
- [Inbound routes](https://github.com/andrewmbarros/imigra/blob/main/main.py): `main.py`

### Browser automation

- [Browser and login](https://github.com/andrewmbarros/imigra/blob/main/src/utils/navegador.py): `src/utils/navegador.py`

### Data processing

- [CSV conversion](https://github.com/andrewmbarros/imigra/blob/main/src/etl/processador.py): `src/etl/processador.py`
- [Migration CSV files](https://github.com/andrewmbarros/imigra/blob/main/config/settings.py): `config/settings.py`

### Configuration

- [Settings and credentials](https://github.com/andrewmbarros/imigra/blob/main/config/settings.py): `config/settings.py`

### Other components

- **Migration operator**
- **3CX cloud panel**
- **Yeastar cloud panel**

## Connections

- Migration operator → GUI and dispatch: enters settings (evidence: `README.md`)
- GUI and dispatch → Extension migration: dispatches (evidence: `main.py`)
- GUI and dispatch → Trunk migration: dispatches (evidence: `main.py`)
- GUI and dispatch → Queue migration: dispatches (evidence: `main.py`)
- GUI and dispatch → Extension groups: dispatches (evidence: `main.py`)
- GUI and dispatch → Client permissions: dispatches (evidence: `main.py`)
- GUI and dispatch → Outbound rules: dispatches (evidence: `main.py`)
- GUI and dispatch → Inbound routes: shows unfinished (evidence: `main.py`)
- GUI and dispatch → CSV conversion: runs ETL (evidence: `main.py`)
- Extension migration → 3CX cloud panel: exports settings (evidence: `src/rpa/extensoes.py`)
- Extension migration → CSV conversion: converts export (evidence: `README.md`)
- CSV conversion → Migration CSV files: reads and writes (evidence: `src/etl/processador.py`)
- Extension migration → Yeastar cloud panel: imports extensions (evidence: `src/rpa/extensoes.py`)
- Trunk migration → 3CX cloud panel: reads trunks (evidence: `src/rpa/troncos.py`)
- Trunk migration → Migration CSV files: writes CSV (evidence: `src/rpa/troncos.py`)
- Trunk migration → Yeastar cloud panel: imports trunks (evidence: `src/rpa/troncos.py`)
- Extension groups → Yeastar cloud panel: creates group (evidence: `src/rpa/grupos_extensao.py`)
- Client permissions → Yeastar cloud panel: sets permissions (evidence: `src/rpa/permissoes.py`)
- Outbound rules → 3CX cloud panel: reads rules (evidence: `src/rpa/regras_saida.py`)
- Outbound rules → Yeastar cloud panel: registers rules (evidence: `src/rpa/regras_saida.py`)
- Extension migration → Browser and login: uses browser (evidence: `src/rpa/extensoes.py`)
- Trunk migration → Browser and login: uses browser (evidence: `src/rpa/troncos.py`)
- Extension groups → Browser and login: uses browser (evidence: `src/rpa/grupos_extensao.py`)
- Client permissions → Browser and login: uses browser (evidence: `src/rpa/permissoes.py`)
- Outbound rules → Browser and login: uses browser (evidence: `src/rpa/regras_saida.py`)
- Browser and login → 3CX cloud panel: logs in (evidence: `src/utils/navegador.py`)
- Browser and login → Yeastar cloud panel: logs in (evidence: `src/utils/navegador.py`)
- Extension migration → Settings and credentials: loads cloud URLs (evidence: `src/rpa/extensoes.py`)
- Trunk migration → Settings and credentials: loads paths and URLs (evidence: `src/rpa/troncos.py`)
- CSV conversion → Settings and credentials: loads data paths (evidence: `src/etl/processador.py`)
- Browser and login → Settings and credentials: loads credentials (evidence: `src/utils/navegador.py`)
