# noe-zm28/sca-manual architecture

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

- Interactive diagram: https://gitdiagram.com/noe-zm28/sca-manual
- Repository: https://github.com/noe-zm28/sca-manual

## Overview

This is a configurable parking-management application: an operator selects an entry, cashier, or configuration mode, then the system supports vehicle fee calculation and payment, pensioner management and payments, and operational reporting. The sampled code confirms configuration access, tariff calculation, database operations, and printer/email integrations. Several screens and reporting functions are represented by their exact tree paths; their internal call wiring is not shown in the excerpts, so those links are omitted. The README identifies MariaDB and `main.py` as the database setup and application entry point.

Main entry points: [`main.py`](https://github.com/noe-zm28/sca-manual/blob/main/main.py) (Application entry), [`Controllers/ConfigController.py`](https://github.com/noe-zm28/sca-manual/blob/main/Controllers/ConfigController.py) (Configuration access), [`Controllers/PrinterController.py`](https://github.com/noe-zm28/sca-manual/blob/main/Controllers/PrinterController.py) (Ticket printing), [`Models/Model.py`](https://github.com/noe-zm28/sca-manual/blob/main/Models/Model.py) (Parking operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Parking workflow"]
  node_main["Application entry<br/>[main.py]"]
  node_entry["Vehicle entry<br/>[ViewEntrada.py]"]
  node_cashier["Cashier screen<br/>[ViewCobro.py]"]
  node_tariffs["Tariff calculation<br/>[CobroController.py]"]
end

subgraph group_pension["Pensioners"]
  node_pension_views["Pensioner screens"]
  node_pension_edit["Edit pensioner"]
  node_pension_pay["Pension payments<br/>[ViewPaidPension.py]"]
end

subgraph group_admin["Administration"]
  node_config_ui["Configuration panel<br/>[ViewPanelConfig.py]"]
  node_report_view["Change history"]
end

subgraph group_services["Shared services"]
  node_queries["Domain queries<br/>[Queries.py]"]
  node_operations["Parking operations<br/>[Model.py]"]
  node_database[("MariaDB")]
  node_db_schema["Database schema<br/>[db_base.sql]"]
  node_config_controller["Configuration access"]
  node_config_files["Configuration files"]
  node_printer_controller["Ticket printing"]
  node_email_controller["Email delivery<br/>[EmailController.py]"]
end

node_operator(("Operator"))
node_printer["USB printer"]
node_smtp["SMTP server"]

node_operator -->|"launches"| node_main
node_main -->|"reads mode"| node_config_controller
node_main -->|"selects mode"| node_entry
node_main -->|"selects mode"| node_cashier
node_main -->|"selects mode"| node_config_ui
node_cashier -->|"calculates fee"| node_tariffs
node_cashier -->|"queries operations"| node_operations
node_pension_edit -->|"updates records"| node_queries
node_pension_edit -->|"prints QR"| node_printer_controller
node_queries -->|"executes queries"| node_operations
node_operations -->|"reads and writes"| node_database
node_db_schema -.->|"defines schema"| node_database
node_tariffs -->|"reads tariffs"| node_config_controller
node_config_controller -->|"reads and writes"| node_config_files
node_printer_controller -->|"loads settings"| node_config_controller
node_printer_controller -->|"records RFID"| node_operations
node_printer_controller -->|"prints tickets"| node_printer
node_email_controller -->|"loads settings"| node_config_controller
node_email_controller -->|"sends mail"| node_smtp

click node_main "https://github.com/noe-zm28/sca-manual/blob/main/main.py"
click node_entry "https://github.com/noe-zm28/sca-manual/blob/main/Views/ViewEntrada.py"
click node_cashier "https://github.com/noe-zm28/sca-manual/blob/main/Views/ViewCobro.py"
click node_tariffs "https://github.com/noe-zm28/sca-manual/blob/main/Controllers/CobroController.py"
click node_pension_views "https://github.com/noe-zm28/sca-manual/blob/main/Views/ViewAgregarPensionado.py"
click node_pension_edit "https://github.com/noe-zm28/sca-manual/blob/main/Views/ViewModificarPensionado.py"
click node_pension_pay "https://github.com/noe-zm28/sca-manual/blob/main/Views/ViewPaidPension.py"
click node_queries "https://github.com/noe-zm28/sca-manual/blob/main/Models/Queries.py"
click node_operations "https://github.com/noe-zm28/sca-manual/blob/main/Models/Model.py"
click node_db_schema "https://github.com/noe-zm28/sca-manual/blob/main/DB/db_base.sql"
click node_config_ui "https://github.com/noe-zm28/sca-manual/blob/main/Views/ViewPanelConfig.py"
click node_config_controller "https://github.com/noe-zm28/sca-manual/blob/main/Controllers/ConfigController.py"
click node_config_files "https://github.com/noe-zm28/sca-manual/blob/main/Config/default_config.json"
click node_printer_controller "https://github.com/noe-zm28/sca-manual/blob/main/Controllers/PrinterController.py"
click node_email_controller "https://github.com/noe-zm28/sca-manual/blob/main/Controllers/EmailController.py"
click node_report_view "https://github.com/noe-zm28/sca-manual/blob/main/Views/ViewHitoryChanges.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_main,node_entry,node_cashier,node_tariffs toneBlue
class node_pension_views,node_pension_edit,node_pension_pay toneAmber
class node_config_ui,node_report_view,node_smtp toneMint
class node_queries,node_operations,node_database,node_db_schema,node_config_controller,node_config_files,node_printer_controller,node_email_controller toneRose
class node_operator,node_printer toneIndigo
```

## Components

### Parking workflow

- [Application entry](https://github.com/noe-zm28/sca-manual/blob/main/main.py): `main.py`
- [Vehicle entry](https://github.com/noe-zm28/sca-manual/blob/main/Views/ViewEntrada.py): `Views/ViewEntrada.py`
- [Cashier screen](https://github.com/noe-zm28/sca-manual/blob/main/Views/ViewCobro.py): `Views/ViewCobro.py`
- [Tariff calculation](https://github.com/noe-zm28/sca-manual/blob/main/Controllers/CobroController.py): `Controllers/CobroController.py`

### Pensioners

- [Pensioner screens](https://github.com/noe-zm28/sca-manual/blob/main/Views/ViewAgregarPensionado.py): `Views/ViewAgregarPensionado.py`
- [Edit pensioner](https://github.com/noe-zm28/sca-manual/blob/main/Views/ViewModificarPensionado.py): `Views/ViewModificarPensionado.py`
- [Pension payments](https://github.com/noe-zm28/sca-manual/blob/main/Views/ViewPaidPension.py): `Views/ViewPaidPension.py`

### Administration

- [Configuration panel](https://github.com/noe-zm28/sca-manual/blob/main/Views/ViewPanelConfig.py): `Views/ViewPanelConfig.py`
- [Change history](https://github.com/noe-zm28/sca-manual/blob/main/Views/ViewHitoryChanges.py): `Views/ViewHitoryChanges.py`

### Shared services

- [Domain queries](https://github.com/noe-zm28/sca-manual/blob/main/Models/Queries.py): `Models/Queries.py`
- [Parking operations](https://github.com/noe-zm28/sca-manual/blob/main/Models/Model.py): `Models/Model.py`
- **MariaDB**
- [Database schema](https://github.com/noe-zm28/sca-manual/blob/main/DB/db_base.sql): `DB/db_base.sql`
- [Configuration access](https://github.com/noe-zm28/sca-manual/blob/main/Controllers/ConfigController.py): `Controllers/ConfigController.py`
- [Configuration files](https://github.com/noe-zm28/sca-manual/blob/main/Config/default_config.json): `Config/default_config.json`
- [Ticket printing](https://github.com/noe-zm28/sca-manual/blob/main/Controllers/PrinterController.py): `Controllers/PrinterController.py`
- [Email delivery](https://github.com/noe-zm28/sca-manual/blob/main/Controllers/EmailController.py): `Controllers/EmailController.py`

### Other components

- **Operator**
- **USB printer**
- **SMTP server**

## Connections

- Operator → Application entry: launches
- Application entry → Configuration access: reads mode
- Application entry → Vehicle entry: selects mode
- Application entry → Cashier screen: selects mode
- Application entry → Configuration panel: selects mode
- Cashier screen → Tariff calculation: calculates fee
- Cashier screen → Parking operations: queries operations
- Edit pensioner → Domain queries: updates records
- Edit pensioner → Ticket printing: prints QR
- Domain queries → Parking operations: executes queries
- Parking operations → MariaDB: reads and writes
- Database schema → MariaDB: defines schema
- Tariff calculation → Configuration access: reads tariffs
- Configuration access → Configuration files: reads and writes
- Ticket printing → Configuration access: loads settings
- Ticket printing → Parking operations: records RFID
- Ticket printing → USB printer: prints tickets
- Email delivery → Configuration access: loads settings
- Email delivery → SMTP server: sends mail
