# gabriellecruzz/projeto-mecanica architecture

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

- Interactive diagram: https://gitdiagram.com/gabriellecruzz/projeto-mecanica
- Repository: https://github.com/gabriellecruzz/projeto-mecanica

## Overview

Projeto-mecanica appears to be a browser-based workshop-management application. Its apparent workflow is account access, client and vehicle management, then creating or editing service orders (orçamentos); dashboard, service, and settings screens are also present in the tree. PHP endpoints handle these operations and use a shared MySQL connection. The README provides no capability or flow details, and frontend wiring was not sampled, so UI-to-endpoint relationships are shown as unverified rather than asserted.

Main entry points: [`assets/js`](https://github.com/gabriellecruzz/projeto-mecanica/tree/main/assets/js) (Browser interactions), [`php/conexao.php`](https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/conexao.php) (MySQL connection), [`bd_mecanica.sql`](https://github.com/gabriellecruzz/projeto-mecanica/blob/main/bd_mecanica.sql) (Workshop database), [`php/usuarios/usuario-cadastro.php`](https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/usuarios/usuario-cadastro.php) (Account registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_pages["Dashboard pages"]
  node_scripts["Browser interactions"]
end

subgraph group_accounts["Accounts"]
  node_registration["Account registration"]
  node_login["Account login<br/>[usuario-login.php]"]
  node_document["Document validation"]
end

subgraph group_customers["Customer records"]
  node_clientcreate["Client creation"]
  node_clientlist["Client listing<br/>[cliente-listar.php]"]
  node_clientdetail["Client details"]
  node_clientother["Client operations"]
  node_vehicles["Vehicle operations"]
end

subgraph group_workorders["Service orders"]
  node_ordercreate["Order creation"]
  node_orderedit["Order editing<br/>[editar-servico.php]"]
  node_orderother["Order operations"]
end

node_user(("Workshop user"))
node_connection["MySQL connection<br/>[conexao.php]"]
node_database[("Workshop database<br/>[bd_mecanica.sql]")]

node_user -.->|"uses"| node_pages
node_pages -.->|"uses"| node_scripts
node_scripts -.->|"submits to"| node_registration
node_scripts -.->|"submits to"| node_login
node_scripts -.->|"submits to"| node_clientcreate
node_scripts -.->|"requests"| node_clientlist
node_scripts -.->|"requests"| node_clientdetail
node_scripts -.->|"requests"| node_vehicles
node_scripts -.->|"submits to"| node_ordercreate
node_scripts -.->|"submits to"| node_orderedit
node_registration -->|"validates with"| node_document
node_registration -->|"loads"| node_connection
node_login -->|"loads"| node_connection
node_clientcreate -->|"loads"| node_connection
node_clientlist -->|"loads"| node_connection
node_clientdetail -->|"loads"| node_connection
node_clientother -->|"loads"| node_connection
node_vehicles -->|"loads"| node_connection
node_ordercreate -->|"loads"| node_connection
node_orderedit -->|"loads"| node_connection
node_orderother -->|"loads"| node_connection
node_registration -->|"writes account"| node_database
node_login -->|"checks credentials"| node_database
node_clientcreate -->|"writes client and vehicles"| node_database
node_clientlist -->|"reads clients"| node_database
node_clientdetail -->|"reads client and vehicles"| node_database
node_vehicles -->|"changes vehicles"| node_database
node_ordercreate -->|"creates order"| node_database
node_orderedit -->|"updates order"| node_database

click node_pages "https://github.com/gabriellecruzz/projeto-mecanica/tree/main/dashboard"
click node_scripts "https://github.com/gabriellecruzz/projeto-mecanica/tree/main/assets/js"
click node_registration "https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/usuarios/usuario-cadastro.php"
click node_login "https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/usuarios/usuario-login.php"
click node_document "https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/usuarios/validar-documento.php"
click node_clientcreate "https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/clientes/cliente-cadastrar.php"
click node_clientlist "https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/clientes/cliente-listar.php"
click node_clientdetail "https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/clientes/cliente-detalhes.php"
click node_clientother "https://github.com/gabriellecruzz/projeto-mecanica/tree/main/php/clientes"
click node_vehicles "https://github.com/gabriellecruzz/projeto-mecanica/tree/main/php/veiculos"
click node_ordercreate "https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/orcamentos/salvar-orcamento.php"
click node_orderedit "https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/orcamentos/editar-servico.php"
click node_orderother "https://github.com/gabriellecruzz/projeto-mecanica/tree/main/php/orcamentos"
click node_connection "https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/conexao.php"
click node_database "https://github.com/gabriellecruzz/projeto-mecanica/blob/main/bd_mecanica.sql"

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_pages,node_scripts,node_user toneBlue
class node_registration,node_login,node_document,node_database toneAmber
class node_clientcreate,node_clientlist,node_clientdetail,node_clientother,node_vehicles toneMint
class node_ordercreate,node_orderedit,node_orderother toneRose
class node_connection toneTeal
```

## Components

### Web interface

- [Dashboard pages](https://github.com/gabriellecruzz/projeto-mecanica/tree/main/dashboard): `dashboard`
- [Browser interactions](https://github.com/gabriellecruzz/projeto-mecanica/tree/main/assets/js): `assets/js`

### Accounts

- [Account registration](https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/usuarios/usuario-cadastro.php): `php/usuarios/usuario-cadastro.php`
- [Account login](https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/usuarios/usuario-login.php): `php/usuarios/usuario-login.php`
- [Document validation](https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/usuarios/validar-documento.php): `php/usuarios/validar-documento.php`

### Customer records

- [Client creation](https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/clientes/cliente-cadastrar.php): `php/clientes/cliente-cadastrar.php`
- [Client listing](https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/clientes/cliente-listar.php): `php/clientes/cliente-listar.php`
- [Client details](https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/clientes/cliente-detalhes.php): `php/clientes/cliente-detalhes.php`
- [Client operations](https://github.com/gabriellecruzz/projeto-mecanica/tree/main/php/clientes): `php/clientes`
- [Vehicle operations](https://github.com/gabriellecruzz/projeto-mecanica/tree/main/php/veiculos): `php/veiculos`

### Service orders

- [Order creation](https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/orcamentos/salvar-orcamento.php): `php/orcamentos/salvar-orcamento.php`
- [Order editing](https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/orcamentos/editar-servico.php): `php/orcamentos/editar-servico.php`
- [Order operations](https://github.com/gabriellecruzz/projeto-mecanica/tree/main/php/orcamentos): `php/orcamentos`

### Other components

- **Workshop user**
- [MySQL connection](https://github.com/gabriellecruzz/projeto-mecanica/blob/main/php/conexao.php): `php/conexao.php`
- [Workshop database](https://github.com/gabriellecruzz/projeto-mecanica/blob/main/bd_mecanica.sql): `bd_mecanica.sql`

## Connections

- Workshop user → Dashboard pages: uses
- Dashboard pages → Browser interactions: uses
- Browser interactions → Account registration: submits to
- Browser interactions → Account login: submits to
- Browser interactions → Client creation: submits to
- Browser interactions → Client listing: requests
- Browser interactions → Client details: requests
- Browser interactions → Vehicle operations: requests
- Browser interactions → Order creation: submits to
- Browser interactions → Order editing: submits to
- Account registration → Document validation: validates with (evidence: `php/usuarios/usuario-cadastro.php`)
- Account registration → MySQL connection: loads (evidence: `php/usuarios/usuario-cadastro.php`)
- Account login → MySQL connection: loads (evidence: `php/usuarios/usuario-login.php`)
- Client creation → MySQL connection: loads (evidence: `php/clientes/cliente-cadastrar.php`)
- Client listing → MySQL connection: loads (evidence: `php/clientes/cliente-listar.php`)
- Client details → MySQL connection: loads (evidence: `php/clientes/cliente-detalhes.php`)
- Client operations → MySQL connection: loads (evidence: `php/clientes/buscar-cliente.php`)
- Vehicle operations → MySQL connection: loads (evidence: `php/veiculos/salvar-veiculos.php`)
- Order creation → MySQL connection: loads (evidence: `php/orcamentos/salvar-orcamento.php`)
- Order editing → MySQL connection: loads (evidence: `php/orcamentos/editar-servico.php`)
- Order operations → MySQL connection: loads (evidence: `php/orcamentos/atualizar-status.php`)
- Account registration → Workshop database: writes account (evidence: `php/usuarios/usuario-cadastro.php`)
- Account login → Workshop database: checks credentials (evidence: `php/usuarios/usuario-login.php`)
- Client creation → Workshop database: writes client and vehicles (evidence: `php/clientes/cliente-cadastrar.php`)
- Client listing → Workshop database: reads clients (evidence: `php/clientes/cliente-listar.php`)
- Client details → Workshop database: reads client and vehicles (evidence: `php/clientes/cliente-detalhes.php`)
- Vehicle operations → Workshop database: changes vehicles (evidence: `php/veiculos/salvar-veiculos.php`)
- Order creation → Workshop database: creates order (evidence: `php/orcamentos/salvar-orcamento.php`)
- Order editing → Workshop database: updates order (evidence: `php/orcamentos/editar-servico.php`)
