# caiocleim/civixbank architecture

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

- Interactive diagram: https://gitdiagram.com/caiocleim/civixbank
- Repository: https://github.com/caiocleim/civixbank

## Overview

Civix Bank is a PHP banking application with two apparent implementations: an MVC-style front end and a standalone `civix/` banking site. The user-facing flow includes login, a customer dashboard, and banking actions such as transfers, payments, deposits, and viewing a statement; account creation is also represented, though its form appears incomplete. The MVC routes and view rendering are visible in the excerpts. Several standalone workflows are identified by the tree and source index, but their internal calls were not shown, so those connections are omitted.

Main entry points: [`civix/painelCliente/painelCliente.php`](https://github.com/caiocleim/civixbank/blob/main/civix/painelCliente/painelCliente.php) (Standalone Dashboard), [`routes/web.php`](https://github.com/caiocleim/civixbank/blob/main/routes/web.php) (Web Routes), [`app/controllers/ViewController.php`](https://github.com/caiocleim/civixbank/blob/main/app/controllers/ViewController.php) (View Controller), [`civix/painelCliente/extratoCliente/extratoCliente.php`](https://github.com/caiocleim/civixbank/blob/main/civix/painelCliente/extratoCliente/extratoCliente.php) (Account Statement)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mvc["MVC Web Application"]
  node_web_routes["Web Routes<br/>[web.php]"]
  node_view_controller["View Controller<br/>[ViewController.php]"]
  node_login_controller["Login Controller"]
  node_error_controller["Error Controller"]
  node_usuario_controller["User Controller"]
  node_login_view["Login View<br/>[login.php]"]
  node_account_creation["Account Creation<br/>[criarConta.php]"]
end

subgraph group_legacy["Standalone Banking Site"]
  node_legacy_login["Standalone Login<br/>[index.php]"]
  node_legacy_login_script["Login Script<br/>[script-login.php]"]
end

subgraph group_customer["Customer Banking"]
  node_customer_view["Customer Dashboard View<br/>[painelCliente.php]"]
  node_legacy_dashboard["Standalone Dashboard<br/>[painelCliente.php]"]
  node_refresh_customer["Refresh Customer Data<br/>[atualizarDados.php]"]
  node_transfer["Transfers"]
  node_payment["Payments<br/>[pagar.php]"]
  node_deposit["Deposits<br/>[depositar.php]"]
  node_statement["Account Statement<br/>[extratoCliente.php]"]
end

subgraph group_persistence["Data Access"]
  node_auth_model["Authentication Model<br/>[AuthModel.php]"]
  node_database_access["Database Access<br/>[Database.php]"]
  node_database[("MySQL Database")]
  node_legacy_connection["Legacy DB Connection<br/>[conexao-banco.php]"]
end

node_customer_actor(("Customer"))

node_customer_actor -->|"requests page"| node_web_routes
node_web_routes -->|"renders views"| node_view_controller
node_web_routes -->|"checks login"| node_login_controller
node_web_routes -->|"reports login error"| node_error_controller
node_view_controller -->|"renders"| node_login_view
node_view_controller -->|"renders"| node_account_creation
node_view_controller -->|"renders"| node_customer_view
node_login_controller -->|"loads"| node_error_controller
node_auth_model -->|"extends"| node_database_access
node_database_access -->|"connects to"| node_database
node_customer_actor -->|"opens login"| node_legacy_login
node_legacy_login -->|"submits credentials"| node_legacy_login_script
node_legacy_dashboard -->|"loads data refresh"| node_refresh_customer
node_legacy_dashboard -->|"links to"| node_transfer
node_legacy_dashboard -->|"links to"| node_payment
node_legacy_dashboard -->|"links to"| node_deposit
node_legacy_dashboard -->|"links to"| node_statement
node_statement -->|"loads connection"| node_legacy_connection
node_statement -->|"queries transactions"| node_database

click node_web_routes "https://github.com/caiocleim/civixbank/blob/main/routes/web.php"
click node_view_controller "https://github.com/caiocleim/civixbank/blob/main/app/controllers/ViewController.php"
click node_login_controller "https://github.com/caiocleim/civixbank/blob/main/app/controllers/LoginController.php"
click node_error_controller "https://github.com/caiocleim/civixbank/blob/main/app/controllers/ErrorController.php"
click node_usuario_controller "https://github.com/caiocleim/civixbank/blob/main/app/controllers/UsuarioController.php"
click node_login_view "https://github.com/caiocleim/civixbank/blob/main/views/login/login.php"
click node_account_creation "https://github.com/caiocleim/civixbank/blob/main/views/criarConta.php"
click node_customer_view "https://github.com/caiocleim/civixbank/blob/main/views/cliente/painelCliente.php"
click node_auth_model "https://github.com/caiocleim/civixbank/blob/main/app/models/AuthModel.php"
click node_database_access "https://github.com/caiocleim/civixbank/blob/main/app/models/Database.php"
click node_legacy_login "https://github.com/caiocleim/civixbank/blob/main/civix/index.php"
click node_legacy_login_script "https://github.com/caiocleim/civixbank/blob/main/civix/scripts/script-login.php"
click node_legacy_dashboard "https://github.com/caiocleim/civixbank/blob/main/civix/painelCliente/painelCliente.php"
click node_refresh_customer "https://github.com/caiocleim/civixbank/blob/main/civix/painelCliente/scripts/atualizarDados.php"
click node_transfer "https://github.com/caiocleim/civixbank/tree/main/civix/painelCliente/transferir"
click node_payment "https://github.com/caiocleim/civixbank/blob/main/civix/painelCliente/pagar/pagar.php"
click node_deposit "https://github.com/caiocleim/civixbank/blob/main/civix/painelCliente/depositar/depositar.php"
click node_statement "https://github.com/caiocleim/civixbank/blob/main/civix/painelCliente/extratoCliente/extratoCliente.php"
click node_legacy_connection "https://github.com/caiocleim/civixbank/blob/main/civix/scripts/conexao-banco.php"

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_web_routes,node_view_controller,node_login_controller,node_error_controller,node_usuario_controller,node_login_view,node_account_creation toneBlue
class node_legacy_login,node_legacy_login_script toneAmber
class node_customer_view,node_legacy_dashboard,node_refresh_customer,node_transfer,node_payment,node_deposit,node_statement toneMint
class node_auth_model,node_database_access,node_database,node_legacy_connection toneRose
class node_customer_actor toneIndigo
```

## Components

### MVC Web Application

- [Web Routes](https://github.com/caiocleim/civixbank/blob/main/routes/web.php): `routes/web.php`
- [View Controller](https://github.com/caiocleim/civixbank/blob/main/app/controllers/ViewController.php): `app/controllers/ViewController.php`
- [Login Controller](https://github.com/caiocleim/civixbank/blob/main/app/controllers/LoginController.php): `app/controllers/LoginController.php`
- [Error Controller](https://github.com/caiocleim/civixbank/blob/main/app/controllers/ErrorController.php): `app/controllers/ErrorController.php`
- [User Controller](https://github.com/caiocleim/civixbank/blob/main/app/controllers/UsuarioController.php): `app/controllers/UsuarioController.php`
- [Login View](https://github.com/caiocleim/civixbank/blob/main/views/login/login.php): `views/login/login.php`
- [Account Creation](https://github.com/caiocleim/civixbank/blob/main/views/criarConta.php): `views/criarConta.php`

### Standalone Banking Site

- [Standalone Login](https://github.com/caiocleim/civixbank/blob/main/civix/index.php): `civix/index.php`
- [Login Script](https://github.com/caiocleim/civixbank/blob/main/civix/scripts/script-login.php): `civix/scripts/script-login.php`

### Customer Banking

- [Customer Dashboard View](https://github.com/caiocleim/civixbank/blob/main/views/cliente/painelCliente.php): `views/cliente/painelCliente.php`
- [Standalone Dashboard](https://github.com/caiocleim/civixbank/blob/main/civix/painelCliente/painelCliente.php): `civix/painelCliente/painelCliente.php`
- [Refresh Customer Data](https://github.com/caiocleim/civixbank/blob/main/civix/painelCliente/scripts/atualizarDados.php): `civix/painelCliente/scripts/atualizarDados.php`
- [Transfers](https://github.com/caiocleim/civixbank/tree/main/civix/painelCliente/transferir): `civix/painelCliente/transferir`
- [Payments](https://github.com/caiocleim/civixbank/blob/main/civix/painelCliente/pagar/pagar.php): `civix/painelCliente/pagar/pagar.php`
- [Deposits](https://github.com/caiocleim/civixbank/blob/main/civix/painelCliente/depositar/depositar.php): `civix/painelCliente/depositar/depositar.php`
- [Account Statement](https://github.com/caiocleim/civixbank/blob/main/civix/painelCliente/extratoCliente/extratoCliente.php): `civix/painelCliente/extratoCliente/extratoCliente.php`

### Data Access

- [Authentication Model](https://github.com/caiocleim/civixbank/blob/main/app/models/AuthModel.php): `app/models/AuthModel.php`
- [Database Access](https://github.com/caiocleim/civixbank/blob/main/app/models/Database.php): `app/models/Database.php`
- **MySQL Database**
- [Legacy DB Connection](https://github.com/caiocleim/civixbank/blob/main/civix/scripts/conexao-banco.php): `civix/scripts/conexao-banco.php`

### Other components

- **Customer**

## Connections

- Customer → Web Routes: requests page (evidence: `routes/web.php`)
- Web Routes → View Controller: renders views (evidence: `routes/web.php`)
- Web Routes → Login Controller: checks login (evidence: `routes/web.php`)
- Web Routes → Error Controller: reports login error (evidence: `routes/web.php`)
- View Controller → Login View: renders (evidence: `app/controllers/ViewController.php`)
- View Controller → Account Creation: renders (evidence: `app/controllers/ViewController.php`)
- View Controller → Customer Dashboard View: renders (evidence: `app/controllers/ViewController.php`)
- Login Controller → Error Controller: loads (evidence: `app/controllers/LoginController.php`)
- Authentication Model → Database Access: extends (evidence: `app/models/AuthModel.php`)
- Database Access → MySQL Database: connects to (evidence: `app/models/Database.php`)
- Customer → Standalone Login: opens login (evidence: `civix/index.php`)
- Standalone Login → Login Script: submits credentials (evidence: `civix/index.php`)
- Standalone Dashboard → Refresh Customer Data: loads data refresh (evidence: `civix/painelCliente/painelCliente.php`)
- Standalone Dashboard → Transfers: links to (evidence: `civix/painelCliente/painelCliente.php`)
- Standalone Dashboard → Payments: links to (evidence: `civix/painelCliente/painelCliente.php`)
- Standalone Dashboard → Deposits: links to (evidence: `civix/painelCliente/painelCliente.php`)
- Standalone Dashboard → Account Statement: links to (evidence: `civix/painelCliente/painelCliente.php`)
- Account Statement → Legacy DB Connection: loads connection (evidence: `civix/painelCliente/extratoCliente/extratoCliente.php`)
- Account Statement → MySQL Database: queries transactions (evidence: `civix/painelCliente/extratoCliente/extratoCliente.php`)
