# rodo1302/proy_scan architecture

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

- Interactive diagram: https://gitdiagram.com/rodo1302/proy_scan
- Repository: https://github.com/rodo1302/proy_scan

## Overview

Relevo Patrimonio is a desktop application for physical asset inventories. The principal workflow is scanning a code, checking it against the Excel master, adding unmatched items to the active session, organizing and reviewing session records, then generating inventory or bulk-search spreadsheets. The graph preserves the documented editing, sector, theme, and master-update capabilities. Relationships reflect sampled calls and README-described wiring; unsampled UI callbacks and generator details are not assumed beyond that documentation.

Main entry points: [`ui/main_window.py`](https://github.com/rodo1302/proy_scan/blob/main/ui/main_window.py) (Main window), [`data/planilla_generator.py`](https://github.com/rodo1302/proy_scan/blob/main/data/planilla_generator.py) (Spreadsheet generator), [`services/patrimonio_service.py`](https://github.com/rodo1302/proy_scan/blob/main/services/patrimonio_service.py) (Session and rules), [`data/excel_repository.py`](https://github.com/rodo1302/proy_scan/blob/main/data/excel_repository.py) (Excel repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop UI"]
  node_app["Application entry<br/>[app.py]"]
  node_window["Main window<br/>[main_window.py]"]
  node_row_style["Sector row styling<br/>[presentation.py]"]
  node_add_dialog["Manual item dialog<br/>[dialogs.py]"]
  node_obs_dialog["Observation editor"]
  node_report_dialog["Releve report form"]
end

subgraph group_workflow["Inventory Workflow"]
  node_controller["Patrimony controller"]
  node_service["Session and rules"]
end

subgraph group_excel["Excel Data and Reports"]
  node_repository["Excel repository"]
  node_master[("Inventory workbook")]
  node_generator["Spreadsheet generator"]
  node_releve_template["Releve template"]
  node_search_template["Bulk search template"]
  node_releve_output["Releve export"]
  node_search_output["Bulk search export"]
end

subgraph group_domain["Domain and Configuration"]
  node_product["Asset product<br/>[producto.py]"]
  node_settings["Resource settings<br/>[settings.py]"]
end

node_user(("Inventory user"))

node_user -->|"uses"| node_window
node_app -->|"creates"| node_controller
node_app -->|"opens"| node_window
node_window -->|"dispatches actions"| node_controller
node_window -->|"styles rows"| node_row_style
node_window -->|"opens"| node_add_dialog
node_window -->|"opens"| node_obs_dialog
node_window -->|"opens"| node_report_dialog
node_controller -->|"delegates to"| node_service
node_service -->|"uses"| node_repository
node_service -->|"uses"| node_generator
node_repository -->|"creates"| node_product
node_service -->|"manages"| node_product
node_repository -->|"reads and updates"| node_master
node_settings -->|"configures path"| node_repository
node_settings -->|"configures paths"| node_generator
node_generator -->|"fills"| node_releve_template
node_generator -->|"fills"| node_search_template
node_generator -->|"writes"| node_releve_output
node_generator -->|"writes"| node_search_output

click node_app "https://github.com/rodo1302/proy_scan/blob/main/app.py"
click node_window "https://github.com/rodo1302/proy_scan/blob/main/ui/main_window.py"
click node_row_style "https://github.com/rodo1302/proy_scan/blob/main/ui/presentation.py"
click node_add_dialog "https://github.com/rodo1302/proy_scan/blob/main/ui/dialogs.py"
click node_obs_dialog "https://github.com/rodo1302/proy_scan/blob/main/ui/observacion_dialogs.py"
click node_report_dialog "https://github.com/rodo1302/proy_scan/blob/main/ui/planillas_dialogs.py"
click node_controller "https://github.com/rodo1302/proy_scan/blob/main/controllers/patrimonio_controller.py"
click node_service "https://github.com/rodo1302/proy_scan/blob/main/services/patrimonio_service.py"
click node_product "https://github.com/rodo1302/proy_scan/blob/main/models/producto.py"
click node_settings "https://github.com/rodo1302/proy_scan/blob/main/config/settings.py"
click node_repository "https://github.com/rodo1302/proy_scan/blob/main/data/excel_repository.py"
click node_generator "https://github.com/rodo1302/proy_scan/blob/main/data/planilla_generator.py"
click node_releve_template "https://github.com/rodo1302/proy_scan/blob/main/plantillas/plantilla_relevo.xlsx"
click node_search_template "https://github.com/rodo1302/proy_scan/blob/main/plantillas/plantilla_busqueda.xls"

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_app,node_window,node_row_style,node_add_dialog,node_obs_dialog,node_report_dialog,node_user toneBlue
class node_controller,node_service toneAmber
class node_repository,node_master,node_generator,node_releve_template,node_search_template,node_releve_output,node_search_output toneMint
class node_product,node_settings toneRose
```

## Components

### Desktop UI

- [Application entry](https://github.com/rodo1302/proy_scan/blob/main/app.py): `app.py`
- [Main window](https://github.com/rodo1302/proy_scan/blob/main/ui/main_window.py): `ui/main_window.py`
- [Sector row styling](https://github.com/rodo1302/proy_scan/blob/main/ui/presentation.py): `ui/presentation.py`
- [Manual item dialog](https://github.com/rodo1302/proy_scan/blob/main/ui/dialogs.py): `ui/dialogs.py`
- [Observation editor](https://github.com/rodo1302/proy_scan/blob/main/ui/observacion_dialogs.py): `ui/observacion_dialogs.py`
- [Releve report form](https://github.com/rodo1302/proy_scan/blob/main/ui/planillas_dialogs.py): `ui/planillas_dialogs.py`

### Inventory Workflow

- [Patrimony controller](https://github.com/rodo1302/proy_scan/blob/main/controllers/patrimonio_controller.py): `controllers/patrimonio_controller.py`
- [Session and rules](https://github.com/rodo1302/proy_scan/blob/main/services/patrimonio_service.py): `services/patrimonio_service.py`

### Excel Data and Reports

- [Excel repository](https://github.com/rodo1302/proy_scan/blob/main/data/excel_repository.py): `data/excel_repository.py`
- **Inventory workbook**
- [Spreadsheet generator](https://github.com/rodo1302/proy_scan/blob/main/data/planilla_generator.py): `data/planilla_generator.py`
- [Releve template](https://github.com/rodo1302/proy_scan/blob/main/plantillas/plantilla_relevo.xlsx): `plantillas/plantilla_relevo.xlsx`
- [Bulk search template](https://github.com/rodo1302/proy_scan/blob/main/plantillas/plantilla_busqueda.xls): `plantillas/plantilla_busqueda.xls`
- **Releve export**
- **Bulk search export**

### Domain and Configuration

- [Asset product](https://github.com/rodo1302/proy_scan/blob/main/models/producto.py): `models/producto.py`
- [Resource settings](https://github.com/rodo1302/proy_scan/blob/main/config/settings.py): `config/settings.py`

### Other components

- **Inventory user**

## Connections

- Inventory user → Main window: uses (evidence: `README.md`)
- Application entry → Patrimony controller: creates (evidence: `app.py`)
- Application entry → Main window: opens (evidence: `app.py`)
- Main window → Patrimony controller: dispatches actions (evidence: `ui/main_window.py`)
- Main window → Sector row styling: styles rows (evidence: `ui/main_window.py`)
- Main window → Manual item dialog: opens (evidence: `ui/main_window.py`)
- Main window → Observation editor: opens (evidence: `ui/main_window.py`)
- Main window → Releve report form: opens (evidence: `ui/main_window.py`)
- Patrimony controller → Session and rules: delegates to (evidence: `controllers/patrimonio_controller.py`)
- Session and rules → Excel repository: uses (evidence: `services/patrimonio_service.py`)
- Session and rules → Spreadsheet generator: uses (evidence: `services/patrimonio_service.py`)
- Excel repository → Asset product: creates (evidence: `data/excel_repository.py`)
- Session and rules → Asset product: manages (evidence: `services/patrimonio_service.py`)
- Excel repository → Inventory workbook: reads and updates (evidence: `README.md`)
- Resource settings → Excel repository: configures path (evidence: `README.md`)
- Resource settings → Spreadsheet generator: configures paths (evidence: `README.md`)
- Spreadsheet generator → Releve template: fills (evidence: `README.md`)
- Spreadsheet generator → Bulk search template: fills (evidence: `README.md`)
- Spreadsheet generator → Releve export: writes (evidence: `README.md`)
- Spreadsheet generator → Bulk search export: writes (evidence: `README.md`)
