# cordovat-dev/apireportes architecture

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

- Interactive diagram: https://gitdiagram.com/cordovat-dev/apireportes
- Repository: https://github.com/cordovat-dev/apireportes

## Overview

This Java library supports database-backed tabular reports, configurable formatting, console output, HTML construction, and downloadable-file listings; it also includes encryption utilities. The main reporting path is a caller-supplied SQL query executed through a JDBC connection, with rows and metadata rendered using configurable report formatting. HTML classes provide reusable document and element construction, while file-listing code builds HTML links from directory contents. Source excerpts establish only some relationships; isolated utilities are shown without inferred connections.

Main entry points: [`src/com/apireportes/rep/html/HtmlElement.java`](https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/rep/html/HtmlElement.java) (HTML element core), [`src/com/apireportes/rep/html`](https://github.com/cordovat-dev/apireportes/tree/master/src/com/apireportes/rep/html) (HTML tag elements), [`src/com/apireportes/pre/ListaArchivosDescarga.java`](https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/pre/ListaArchivosDescarga.java) (Download listing), [`src/com/apireportes/rep/Reporte.java`](https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/rep/Reporte.java) (JDBC reporter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_reporting["Tabular reporting"]
  node_reporter["JDBC reporter<br/>[Reporte.java]"]
  node_report_format["Report formatting"]
  node_console_formatter["Console formatter"]
end

subgraph group_html["HTML construction"]
  node_html_document["HTML document<br/>[Html.java]"]
  node_html_element["HTML element core<br/>[HtmlElement.java]"]
  node_html_attribute["HTML attributes<br/>[HtmlAttribute.java]"]
  node_html_table["HTML tables<br/>[HtmlTable.java]"]
  node_html_lists["HTML lists<br/>[HtmlUL.java]"]
  node_html_options["Select options<br/>[HtmlOption.java]"]
  node_html_tags["HTML tag elements"]
end

subgraph group_downloads["Download listings"]
  node_file_listing["Download listing"]
  node_indirect_listing["Indirect listing"]
  node_filename_order["Filename ordering"]
end

subgraph group_security["Security utilities"]
  node_encrypter["Encryption helper<br/>[DesEncrypter.java]"]
  node_key["Encryption key<br/>[Llave.java]"]
end

node_report_user(("Report caller"))
node_jdbc[("JDBC database")]

node_report_user -.->|"requests report"| node_reporter
node_reporter -->|"executes SQL"| node_jdbc
node_jdbc -->|"returns rows"| node_reporter
node_reporter -->|"formats results"| node_report_format
node_html_document -->|"extends"| node_html_element
node_html_document -->|"assembles head and body"| node_html_tags
node_html_element -->|"creates attributes"| node_html_attribute
node_html_table -->|"extends"| node_html_element
node_html_table -->|"creates table cells"| node_html_tags
node_html_lists -->|"extends"| node_html_element
node_html_lists -->|"wraps list items"| node_html_tags
node_html_options -->|"extends"| node_html_element
node_html_tags -->|"extends"| node_html_element
node_file_listing -->|"sorts files"| node_filename_order
node_file_listing -->|"builds listing"| node_html_lists
node_file_listing -->|"creates links and content"| node_html_tags
node_indirect_listing -->|"delegates to"| node_file_listing

click node_reporter "https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/rep/Reporte.java"
click node_report_format "https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/rep/FormatoReporte.java"
click node_console_formatter "https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/cons/FormateadorConsola.java"
click node_html_document "https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/rep/html/Html.java"
click node_html_element "https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/rep/html/HtmlElement.java"
click node_html_attribute "https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/rep/html/HtmlAttribute.java"
click node_html_table "https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/rep/html/HtmlTable.java"
click node_html_lists "https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/rep/html/HtmlUL.java"
click node_html_options "https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/rep/html/HtmlOption.java"
click node_html_tags "https://github.com/cordovat-dev/apireportes/tree/master/src/com/apireportes/rep/html"
click node_file_listing "https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/pre/ListaArchivosDescarga.java"
click node_indirect_listing "https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/pre/ListaArchivosDescargaIndirecta.java"
click node_filename_order "https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/pre/ComparatorNombreArchivos.java"
click node_encrypter "https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/seg/DesEncrypter.java"
click node_key "https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/seg/Llave.java"

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_reporter,node_report_format,node_console_formatter toneBlue
class node_html_document,node_html_element,node_html_attribute,node_html_table,node_html_lists,node_html_options,node_html_tags,node_jdbc toneAmber
class node_file_listing,node_indirect_listing,node_filename_order toneMint
class node_encrypter,node_key toneRose
class node_report_user toneIndigo
```

## Components

### Tabular reporting

- [JDBC reporter](https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/rep/Reporte.java): `src/com/apireportes/rep/Reporte.java`
- [Report formatting](https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/rep/FormatoReporte.java): `src/com/apireportes/rep/FormatoReporte.java`
- [Console formatter](https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/cons/FormateadorConsola.java): `src/com/apireportes/cons/FormateadorConsola.java`

### HTML construction

- [HTML document](https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/rep/html/Html.java): `src/com/apireportes/rep/html/Html.java`
- [HTML element core](https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/rep/html/HtmlElement.java): `src/com/apireportes/rep/html/HtmlElement.java`
- [HTML attributes](https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/rep/html/HtmlAttribute.java): `src/com/apireportes/rep/html/HtmlAttribute.java`
- [HTML tables](https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/rep/html/HtmlTable.java): `src/com/apireportes/rep/html/HtmlTable.java`
- [HTML lists](https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/rep/html/HtmlUL.java): `src/com/apireportes/rep/html/HtmlUL.java`
- [Select options](https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/rep/html/HtmlOption.java): `src/com/apireportes/rep/html/HtmlOption.java`
- [HTML tag elements](https://github.com/cordovat-dev/apireportes/tree/master/src/com/apireportes/rep/html): `src/com/apireportes/rep/html`

### Download listings

- [Download listing](https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/pre/ListaArchivosDescarga.java): `src/com/apireportes/pre/ListaArchivosDescarga.java`
- [Indirect listing](https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/pre/ListaArchivosDescargaIndirecta.java): `src/com/apireportes/pre/ListaArchivosDescargaIndirecta.java`
- [Filename ordering](https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/pre/ComparatorNombreArchivos.java): `src/com/apireportes/pre/ComparatorNombreArchivos.java`

### Security utilities

- [Encryption helper](https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/seg/DesEncrypter.java): `src/com/apireportes/seg/DesEncrypter.java`
- [Encryption key](https://github.com/cordovat-dev/apireportes/blob/master/src/com/apireportes/seg/Llave.java): `src/com/apireportes/seg/Llave.java`

### Other components

- **Report caller**
- **JDBC database**

## Connections

- Report caller → JDBC reporter: requests report
- JDBC reporter → JDBC database: executes SQL (evidence: `src/com/apireportes/rep/Reporte.java`)
- JDBC database → JDBC reporter: returns rows (evidence: `src/com/apireportes/rep/Reporte.java`)
- JDBC reporter → Report formatting: formats results (evidence: `src/com/apireportes/rep/Reporte.java`)
- HTML document → HTML element core: extends (evidence: `src/com/apireportes/rep/html/Html.java`)
- HTML document → HTML tag elements: assembles head and body (evidence: `src/com/apireportes/rep/html/Html.java`)
- HTML element core → HTML attributes: creates attributes (evidence: `src/com/apireportes/rep/html/HtmlElement.java`)
- HTML tables → HTML element core: extends (evidence: `src/com/apireportes/rep/html/HtmlTable.java`)
- HTML tables → HTML tag elements: creates table cells (evidence: `src/com/apireportes/rep/html/HtmlTable.java`)
- HTML lists → HTML element core: extends (evidence: `src/com/apireportes/rep/html/HtmlUL.java`)
- HTML lists → HTML tag elements: wraps list items (evidence: `src/com/apireportes/rep/html/HtmlUL.java`)
- Select options → HTML element core: extends (evidence: `src/com/apireportes/rep/html/HtmlOption.java`)
- HTML tag elements → HTML element core: extends (evidence: `src/com/apireportes/rep/html/HtmlA.java`)
- Download listing → Filename ordering: sorts files (evidence: `src/com/apireportes/pre/ListaArchivosDescarga.java`)
- Download listing → HTML lists: builds listing (evidence: `src/com/apireportes/pre/ListaArchivosDescarga.java`)
- Download listing → HTML tag elements: creates links and content (evidence: `src/com/apireportes/pre/ListaArchivosDescarga.java`)
- Indirect listing → Download listing: delegates to (evidence: `src/com/apireportes/pre/ListaArchivosDescargaIndirecta.java`)
