# jacks-exe/projeto-iluminacao-mina architecture

> Architecture diagram of the GitHub repository jacks-exe/projeto-iluminacao-mina, 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/jacks-exe/projeto-iluminacao-mina
- Repository: https://github.com/jacks-exe/projeto-iluminacao-mina

## Overview

GEONEX is a mine-lighting SCADA application for monitoring and controlling towers, managing automation and maintenance, and reviewing telemetry and energy use. The apparent user workflow is dashboard or login → operational feature → API/backend → tower state or records, with an IoT bridge for serial device commands. Source excerpts establish selected PHP database dependencies and automation/device links, but do not expose the frontend API call graph or PHP telemetry/login internals; those links are therefore omitted rather than inferred.

Main entry points: [`backend-php/conexao.php`](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend-php/conexao.php) (MySQL connection), [`frontend/src/main.ts`](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/main.ts) (Vue app entry), [`backend-php/automacoes.php`](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend-php/automacoes.php) (Automation rules), [`backend/src/main/java/com/iluminacao/service/AutomacaoSchedulerService.java`](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend/src/main/java/com/iluminacao/service/AutomacaoSchedulerService.java) (Automation scheduler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["SCADA interface"]
  node_frontend_entry["Vue app entry<br/>[main.ts]"]
  node_app_shell["App shell<br/>[App.vue]"]
  node_dashboard["Operations dashboard<br/>[DashboardView.vue]"]
  node_analytics["Telemetry analytics<br/>[AnalyticsView.vue]"]
  node_automation_ui["Automation controls<br/>[AutomacoesView.vue]"]
  node_maintenance_ui["Work orders"]
  node_settings_ui["System settings"]
  node_login_ui["Login screen<br/>[LoginView.vue]"]
  node_frontend_api["API client<br/>[api.ts]"]
end

subgraph group_php["PHP SCADA API"]
  node_php_db[("MySQL connection<br/>[conexao.php]")]
  node_php_towers["Tower control<br/>[postes.php]"]
  node_php_automation["Automation rules<br/>[automacoes.php]"]
  node_php_telemetry["Telemetry history"]
  node_php_workorders["Maintenance orders<br/>[ordens_servico.php]"]
  node_php_users["User management<br/>[usuarios.php]"]
  node_php_login["PHP authentication<br/>[login.php]"]
end

subgraph group_java["Java services"]
  node_java_auth["Java authentication"]
  node_login_request["Login request DTO<br/>[LoginRequest.java]"]
  node_scheduler["Automation scheduler"]
  node_tower_model["Tower entity<br/>[Torre.java]"]
  node_sector_model["Sector entity<br/>[Setor.java]"]
end

subgraph group_iot["Device bridge"]
  node_iot_bridge["IoT serial bridge<br/>[ponte_iot.py]"]
end

node_operator(("SCADA user"))

node_frontend_entry -->|"mounts"| node_app_shell
node_frontend_entry -->|"uses router"| node_app_shell
node_php_towers -->|"queries and updates"| node_php_db
node_php_automation -->|"queries and updates"| node_php_db
node_php_telemetry -->|"queries"| node_php_db
node_php_workorders -->|"queries and updates"| node_php_db
node_php_users -->|"uses connection"| node_php_db
node_php_login -->|"uses connection"| node_php_db
node_php_automation -->|"posts commands"| node_iot_bridge
node_scheduler -->|"uses entity"| node_tower_model
node_tower_model -->|"references sector"| node_sector_model
node_java_auth -->|"accepts request"| node_login_request
node_scheduler -.->|"sends HTTP command"| node_iot_bridge
node_operator -.->|"opens interface"| node_frontend_entry
node_frontend_api -.->|"API-backed data"| node_php_db

click node_frontend_entry "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/main.ts"
click node_app_shell "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/App.vue"
click node_dashboard "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/views/DashboardView.vue"
click node_analytics "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/views/AnalyticsView.vue"
click node_automation_ui "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/views/AutomacoesView.vue"
click node_maintenance_ui "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/views/OrdensServicoView.vue"
click node_settings_ui "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/views/ConfiguracoesView.vue"
click node_login_ui "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/views/LoginView.vue"
click node_frontend_api "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/services/api.ts"
click node_php_db "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend-php/conexao.php"
click node_php_towers "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend-php/postes.php"
click node_php_automation "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend-php/automacoes.php"
click node_php_telemetry "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend-php/historico_telemetria.php"
click node_php_workorders "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend-php/ordens_servico.php"
click node_php_users "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend-php/usuarios.php"
click node_php_login "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend-php/login.php"
click node_java_auth "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend/src/main/java/com/iluminacao/controller/AuthController.java"
click node_login_request "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend/src/main/java/com/iluminacao/dto/LoginRequest.java"
click node_scheduler "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend/src/main/java/com/iluminacao/service/AutomacaoSchedulerService.java"
click node_tower_model "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend/src/main/java/com/iluminacao/model/Torre.java"
click node_sector_model "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend/src/main/java/com/iluminacao/model/Setor.java"
click node_iot_bridge "https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/iot/ponte_iot.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_frontend_entry,node_app_shell,node_dashboard,node_analytics,node_automation_ui,node_maintenance_ui,node_settings_ui,node_login_ui,node_frontend_api,node_operator toneBlue
class node_php_db,node_php_towers,node_php_automation,node_php_telemetry,node_php_workorders,node_php_users,node_php_login toneAmber
class node_java_auth,node_login_request,node_scheduler,node_tower_model,node_sector_model toneMint
class node_iot_bridge toneRose
```

## Components

### SCADA interface

- [Vue app entry](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/main.ts): `frontend/src/main.ts`
- [App shell](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/App.vue): `frontend/src/App.vue`
- [Operations dashboard](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/views/DashboardView.vue): `frontend/src/views/DashboardView.vue`
- [Telemetry analytics](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/views/AnalyticsView.vue): `frontend/src/views/AnalyticsView.vue`
- [Automation controls](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/views/AutomacoesView.vue): `frontend/src/views/AutomacoesView.vue`
- [Work orders](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/views/OrdensServicoView.vue): `frontend/src/views/OrdensServicoView.vue`
- [System settings](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/views/ConfiguracoesView.vue): `frontend/src/views/ConfiguracoesView.vue`
- [Login screen](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/views/LoginView.vue): `frontend/src/views/LoginView.vue`
- [API client](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`

### PHP SCADA API

- [MySQL connection](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend-php/conexao.php): `backend-php/conexao.php`
- [Tower control](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend-php/postes.php): `backend-php/postes.php`
- [Automation rules](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend-php/automacoes.php): `backend-php/automacoes.php`
- [Telemetry history](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend-php/historico_telemetria.php): `backend-php/historico_telemetria.php`
- [Maintenance orders](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend-php/ordens_servico.php): `backend-php/ordens_servico.php`
- [User management](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend-php/usuarios.php): `backend-php/usuarios.php`
- [PHP authentication](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend-php/login.php): `backend-php/login.php`

### Java services

- [Java authentication](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend/src/main/java/com/iluminacao/controller/AuthController.java): `backend/src/main/java/com/iluminacao/controller/AuthController.java`
- [Login request DTO](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend/src/main/java/com/iluminacao/dto/LoginRequest.java): `backend/src/main/java/com/iluminacao/dto/LoginRequest.java`
- [Automation scheduler](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend/src/main/java/com/iluminacao/service/AutomacaoSchedulerService.java): `backend/src/main/java/com/iluminacao/service/AutomacaoSchedulerService.java`
- [Tower entity](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend/src/main/java/com/iluminacao/model/Torre.java): `backend/src/main/java/com/iluminacao/model/Torre.java`
- [Sector entity](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/backend/src/main/java/com/iluminacao/model/Setor.java): `backend/src/main/java/com/iluminacao/model/Setor.java`

### Device bridge

- [IoT serial bridge](https://github.com/jacks-exe/projeto-iluminacao-mina/blob/main/iot/ponte_iot.py): `iot/ponte_iot.py`

### Other components

- **SCADA user**

## Connections

- Vue app entry → App shell: mounts (evidence: `frontend/src/main.ts`)
- Vue app entry → App shell: uses router (evidence: `frontend/src/main.ts`)
- Tower control → MySQL connection: queries and updates (evidence: `backend-php/postes.php`)
- Automation rules → MySQL connection: queries and updates (evidence: `backend-php/automacoes.php`)
- Telemetry history → MySQL connection: queries (evidence: `backend-php/historico_telemetria.php`)
- Maintenance orders → MySQL connection: queries and updates (evidence: `backend-php/ordens_servico.php`)
- User management → MySQL connection: uses connection (evidence: `backend-php/usuarios.php`)
- PHP authentication → MySQL connection: uses connection (evidence: `backend-php/login.php`)
- Automation rules → IoT serial bridge: posts commands (evidence: `backend-php/automacoes.php`)
- Automation scheduler → Tower entity: uses entity (evidence: `backend/src/main/java/com/iluminacao/service/AutomacaoSchedulerService.java`)
- Tower entity → Sector entity: references sector (evidence: `backend/src/main/java/com/iluminacao/model/Torre.java`)
- Java authentication → Login request DTO: accepts request (evidence: `backend/src/main/java/com/iluminacao/controller/AuthController.java`)
- Automation scheduler → IoT serial bridge: sends HTTP command
- SCADA user → Vue app entry: opens interface
- API client → MySQL connection: API-backed data
