# berkeboylu/boylu-elogo-bulk architecture

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

- Interactive diagram: https://gitdiagram.com/berkeboylu/boylu-elogo-bulk
- Repository: https://github.com/berkeboylu/boylu-elogo-bulk

## Overview

Boylu E-Logo Bulk Downloader is a PHP tool that reads an invoice list, uses E-Logo SOAP services to find and retrieve invoice documents, and saves them as PDFs. Its single source file owns the workflow, including session handling, existing-file checks, error/log persistence, and the results UI. The README documents these capabilities and files; the excerpts do not show every internal call, so uncertain relationships are omitted.

Main entry points: [`index.php`](https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/index.php) (Download runner), [`files`](https://github.com/berkeboylu/boylu-elogo-bulk/tree/main/files) (Downloaded PDFs), [`invoices.json`](https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/invoices.json) (Invoice list), [`files/logo-session`](https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/files/logo-session) (Session file)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Download workflow"]
  node_runner["Download runner<br/>[index.php]"]
  node_invoice_loader["Invoice loading<br/>[index.php]"]
  node_session_login["Session login<br/>[index.php]"]
  node_document_lookup["Document lookup<br/>[index.php]"]
  node_ettn_map["ETTN mapping<br/>[index.php]"]
  node_pdf_retrieval["PDF retrieval<br/>[index.php]"]
  node_existing_scan["Existing-file scan<br/>[index.php]"]
end

subgraph group_state["Local state"]
  node_invoice_list["Invoice list<br/>[invoices.json]"]
  node_pdf_files[("Downloaded PDFs")]
  node_session_file["Session file"]
  node_error_records["Error records<br/>[errors.json]"]
  node_run_logs[("Run logs")]
end

subgraph group_presentation["Results"]
  node_results_ui["Results UI<br/>[index.php]"]
end

node_operator(("Operator"))
node_logo_service{{"E-Logo SOAP"}}

node_operator -->|"starts"| node_runner
node_runner -->|"loads list"| node_invoice_loader
node_invoice_loader -->|"reads"| node_invoice_list
node_runner -->|"checks files"| node_existing_scan
node_existing_scan -->|"scans"| node_pdf_files
node_runner -->|"gets session"| node_session_login
node_session_login -->|"logs in"| node_logo_service
node_session_login -->|"stores session"| node_session_file
node_runner -->|"builds map"| node_document_lookup
node_document_lookup -->|"lists documents"| node_logo_service
node_document_lookup -->|"maps ETTN"| node_ettn_map
node_runner -->|"fetches invoices"| node_pdf_retrieval
node_pdf_retrieval -->|"gets document"| node_logo_service
node_pdf_retrieval -->|"writes PDFs"| node_pdf_files
node_runner -->|"writes errors"| node_error_records
node_runner -->|"writes logs"| node_run_logs
node_runner -->|"renders results"| node_results_ui
node_results_ui -->|"shows outcome"| node_operator

click node_runner "https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/index.php"
click node_invoice_list "https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/invoices.json"
click node_invoice_loader "https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/index.php"
click node_session_login "https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/index.php"
click node_document_lookup "https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/index.php"
click node_ettn_map "https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/index.php"
click node_pdf_retrieval "https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/index.php"
click node_pdf_files "https://github.com/berkeboylu/boylu-elogo-bulk/tree/main/files"
click node_session_file "https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/files/logo-session"
click node_existing_scan "https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/index.php"
click node_error_records "https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/errors.json"
click node_run_logs "https://github.com/berkeboylu/boylu-elogo-bulk/tree/main/logs"
click node_results_ui "https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/index.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_runner,node_invoice_loader,node_session_login,node_document_lookup,node_ettn_map,node_pdf_retrieval,node_existing_scan toneBlue
class node_invoice_list,node_pdf_files,node_session_file,node_error_records,node_run_logs toneAmber
class node_results_ui toneMint
class node_operator,node_logo_service toneIndigo
```

## Components

### Download workflow

- [Download runner](https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/index.php): `index.php`
- [Invoice loading](https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/index.php): `index.php`
- [Session login](https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/index.php): `index.php`
- [Document lookup](https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/index.php): `index.php`
- [ETTN mapping](https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/index.php): `index.php`
- [PDF retrieval](https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/index.php): `index.php`
- [Existing-file scan](https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/index.php): `index.php`

### Local state

- [Invoice list](https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/invoices.json): `invoices.json`
- [Downloaded PDFs](https://github.com/berkeboylu/boylu-elogo-bulk/tree/main/files): `files`
- [Session file](https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/files/logo-session): `files/logo-session`
- [Error records](https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/errors.json): `errors.json`
- [Run logs](https://github.com/berkeboylu/boylu-elogo-bulk/tree/main/logs): `logs`

### Results

- [Results UI](https://github.com/berkeboylu/boylu-elogo-bulk/blob/main/index.php): `index.php`

### Other components

- **Operator**
- **E-Logo SOAP**

## Connections

- Operator → Download runner: starts (evidence: `README.md`)
- Download runner → Invoice loading: loads list (evidence: `index.php`)
- Invoice loading → Invoice list: reads (evidence: `index.php`)
- Download runner → Existing-file scan: checks files (evidence: `index.php`)
- Existing-file scan → Downloaded PDFs: scans (evidence: `README.md`)
- Download runner → Session login: gets session (evidence: `index.php`)
- Session login → E-Logo SOAP: logs in (evidence: `index.php`)
- Session login → Session file: stores session (evidence: `index.php`)
- Download runner → Document lookup: builds map (evidence: `index.php`)
- Document lookup → E-Logo SOAP: lists documents (evidence: `index.php`)
- Document lookup → ETTN mapping: maps ETTN (evidence: `index.php`)
- Download runner → PDF retrieval: fetches invoices (evidence: `index.php`)
- PDF retrieval → E-Logo SOAP: gets document (evidence: `index.php`)
- PDF retrieval → Downloaded PDFs: writes PDFs (evidence: `index.php`)
- Download runner → Error records: writes errors (evidence: `index.php`)
- Download runner → Run logs: writes logs (evidence: `index.php`)
- Download runner → Results UI: renders results (evidence: `index.php`)
- Results UI → Operator: shows outcome (evidence: `index.php`)
