# deklonis/etl-panpline_public architecture

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

- Interactive diagram: https://gitdiagram.com/deklonis/etl-panpline_public
- Repository: https://github.com/deklonis/etl-panpline_public

## Overview

Contacts ETL is a PyQt desktop application that turns a conference Word table into reviewed contact records and loads new people and companies into SQLite. The main flow is file selection, extraction and transformation with duplicate checks, operator review, then load; drafts can be resumed later. The graph preserves documented parsing, morphology, matching, and storage responsibilities. Some subsystem links rely on README or SOURCE INDEX references because their implementations were not excerpted; those limits are reflected by omitted or dashed links.

Main entry points: [`main_function.py`](https://github.com/deklonis/etl-panpline_public/blob/main/main_function.py) (Word extraction), [`main.py`](https://github.com/deklonis/etl-panpline_public/blob/main/main.py) (Review window), [`components/to_main_db.py`](https://github.com/deklonis/etl-panpline_public/blob/main/components/to_main_db.py) (CRM loader), [`select_file_window.py`](https://github.com/deklonis/etl-panpline_public/blob/main/select_file_window.py) (File selector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_intake["File intake"]
  node_selector["File selector"]
end

subgraph group_transform["Data transformation"]
  node_extract["Word extraction<br/>[main_function.py]"]
  node_cleanup["Text cleanup<br/>[del_space.py]"]
  node_job_terms["Job-term dictionary<br/>[all_first_word.py]"]
  node_contacts["Contact parsing<br/>[phonedetector.py]"]
  node_email["Email parsing<br/>[emaildetector.py]"]
  node_name_forms["Name forms<br/>[morfology_name.py]"]
  node_job_forms["Job forms<br/>[morfology_comp.py]"]
  node_company_normalizer["Company normalization<br/>[to_norm_vid.py]"]
  node_name_address["Salutation<br/>[name_lastname.py]"]
end

subgraph group_review["Review and drafts"]
  node_review_window["Review window<br/>[main.py]"]
  node_review_ui["Review interface<br/>[main_ui.py]"]
  node_person_editor["Person editor"]
end

subgraph group_storage["Matching and storage"]
  node_duplicate_match["Duplicate matching<br/>[find_in_base.py]"]
  node_draft_access["Draft access<br/>[workwithdb.py]"]
  node_draft_store[("Draft table<br/>[draft_table.py]")]
  node_settings["Resume settings<br/>[settings.py]"]
  node_loader["CRM loader<br/>[to_main_db.py]"]
  node_main_store[("Contact database<br/>[db.db]")]
end

node_operator(("Operator"))
node_file["Word file"]

node_operator -->|"chooses file"| node_selector
node_file -->|"provides input"| node_selector
node_selector -->|"opens review"| node_review_window
node_review_window -->|"converts file"| node_extract
node_extract -->|"cleans cells"| node_cleanup
node_extract -->|"finds job terms"| node_job_terms
node_extract -->|"extracts phone"| node_contacts
node_extract -->|"extracts email"| node_email
node_extract -->|"inflects names"| node_name_forms
node_extract -->|"inflects jobs"| node_job_forms
node_extract -->|"normalizes company"| node_company_normalizer
node_extract -->|"formats salutation"| node_name_address
node_extract -->|"checks duplicates"| node_duplicate_match
node_duplicate_match -->|"reads contacts"| node_main_store
node_review_window -->|"renders review"| node_review_ui
node_review_window -->|"creates editors"| node_person_editor
node_operator -->|"checks records"| node_review_window
node_review_window -->|"saves or restores"| node_draft_access
node_draft_access -->|"reads and writes"| node_draft_store
node_review_window -->|"stores resume info"| node_settings
node_operator -->|"sends records"| node_loader
node_review_window -->|"loads approved data"| node_loader
node_loader -->|"inserts contacts"| node_main_store
node_loader -->|"checks company"| node_duplicate_match
node_draft_store -.->|"shares SQLite file"| node_main_store

click node_selector "https://github.com/deklonis/etl-panpline_public/blob/main/select_file_window.py"
click node_extract "https://github.com/deklonis/etl-panpline_public/blob/main/main_function.py"
click node_cleanup "https://github.com/deklonis/etl-panpline_public/blob/main/components/del_space.py"
click node_job_terms "https://github.com/deklonis/etl-panpline_public/blob/main/components/all_first_word.py"
click node_contacts "https://github.com/deklonis/etl-panpline_public/blob/main/components/phonedetector.py"
click node_email "https://github.com/deklonis/etl-panpline_public/blob/main/components/emaildetector.py"
click node_name_forms "https://github.com/deklonis/etl-panpline_public/blob/main/morfy/morfology_name.py"
click node_job_forms "https://github.com/deklonis/etl-panpline_public/blob/main/morfy/morfology_comp.py"
click node_company_normalizer "https://github.com/deklonis/etl-panpline_public/blob/main/components/to_norm_vid.py"
click node_name_address "https://github.com/deklonis/etl-panpline_public/blob/main/components/name_lastname.py"
click node_duplicate_match "https://github.com/deklonis/etl-panpline_public/blob/main/components/find_in_base.py"
click node_review_window "https://github.com/deklonis/etl-panpline_public/blob/main/main.py"
click node_review_ui "https://github.com/deklonis/etl-panpline_public/blob/main/ui/main_ui.py"
click node_person_editor "https://github.com/deklonis/etl-panpline_public/blob/main/popele_conteiner.py"
click node_draft_access "https://github.com/deklonis/etl-panpline_public/blob/main/component_to_db/workwithdb.py"
click node_draft_store "https://github.com/deklonis/etl-panpline_public/blob/main/component_to_db/draft_table.py"
click node_settings "https://github.com/deklonis/etl-panpline_public/blob/main/settings/settings.py"
click node_loader "https://github.com/deklonis/etl-panpline_public/blob/main/components/to_main_db.py"
click node_main_store "https://github.com/deklonis/etl-panpline_public/blob/main/components/db.db"

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_selector toneBlue
class node_extract,node_cleanup,node_job_terms,node_contacts,node_email,node_name_forms,node_job_forms,node_company_normalizer,node_name_address toneAmber
class node_review_window,node_review_ui,node_person_editor toneMint
class node_duplicate_match,node_draft_access,node_draft_store,node_settings,node_loader,node_main_store toneRose
class node_operator,node_file toneIndigo
```

## Components

### File intake

- [File selector](https://github.com/deklonis/etl-panpline_public/blob/main/select_file_window.py): `select_file_window.py`

### Data transformation

- [Word extraction](https://github.com/deklonis/etl-panpline_public/blob/main/main_function.py): `main_function.py`
- [Text cleanup](https://github.com/deklonis/etl-panpline_public/blob/main/components/del_space.py): `components/del_space.py`
- [Job-term dictionary](https://github.com/deklonis/etl-panpline_public/blob/main/components/all_first_word.py): `components/all_first_word.py`
- [Contact parsing](https://github.com/deklonis/etl-panpline_public/blob/main/components/phonedetector.py): `components/phonedetector.py`
- [Email parsing](https://github.com/deklonis/etl-panpline_public/blob/main/components/emaildetector.py): `components/emaildetector.py`
- [Name forms](https://github.com/deklonis/etl-panpline_public/blob/main/morfy/morfology_name.py): `morfy/morfology_name.py`
- [Job forms](https://github.com/deklonis/etl-panpline_public/blob/main/morfy/morfology_comp.py): `morfy/morfology_comp.py`
- [Company normalization](https://github.com/deklonis/etl-panpline_public/blob/main/components/to_norm_vid.py): `components/to_norm_vid.py`
- [Salutation](https://github.com/deklonis/etl-panpline_public/blob/main/components/name_lastname.py): `components/name_lastname.py`

### Review and drafts

- [Review window](https://github.com/deklonis/etl-panpline_public/blob/main/main.py): `main.py`
- [Review interface](https://github.com/deklonis/etl-panpline_public/blob/main/ui/main_ui.py): `ui/main_ui.py`
- [Person editor](https://github.com/deklonis/etl-panpline_public/blob/main/popele_conteiner.py): `popele_conteiner.py`

### Matching and storage

- [Duplicate matching](https://github.com/deklonis/etl-panpline_public/blob/main/components/find_in_base.py): `components/find_in_base.py`
- [Draft access](https://github.com/deklonis/etl-panpline_public/blob/main/component_to_db/workwithdb.py): `component_to_db/workwithdb.py`
- [Draft table](https://github.com/deklonis/etl-panpline_public/blob/main/component_to_db/draft_table.py): `component_to_db/draft_table.py`
- [Resume settings](https://github.com/deklonis/etl-panpline_public/blob/main/settings/settings.py): `settings/settings.py`
- [CRM loader](https://github.com/deklonis/etl-panpline_public/blob/main/components/to_main_db.py): `components/to_main_db.py`
- [Contact database](https://github.com/deklonis/etl-panpline_public/blob/main/components/db.db): `components/db.db`

### Other components

- **Operator**
- **Word file**

## Connections

- Operator → File selector: chooses file (evidence: `README.md`)
- Word file → File selector: provides input (evidence: `README.md`)
- File selector → Review window: opens review (evidence: `select_file_window.py`)
- Review window → Word extraction: converts file (evidence: `main.py`)
- Word extraction → Text cleanup: cleans cells (evidence: `main_function.py`)
- Word extraction → Job-term dictionary: finds job terms (evidence: `main_function.py`)
- Word extraction → Contact parsing: extracts phone (evidence: `main_function.py`)
- Word extraction → Email parsing: extracts email (evidence: `main_function.py`)
- Word extraction → Name forms: inflects names (evidence: `main_function.py`)
- Word extraction → Job forms: inflects jobs (evidence: `main_function.py`)
- Word extraction → Company normalization: normalizes company (evidence: `main_function.py`)
- Word extraction → Salutation: formats salutation (evidence: `main_function.py`)
- Word extraction → Duplicate matching: checks duplicates (evidence: `main_function.py`)
- Duplicate matching → Contact database: reads contacts (evidence: `components/find_in_base.py`)
- Review window → Review interface: renders review (evidence: `main.py`)
- Review window → Person editor: creates editors (evidence: `main.py`)
- Operator → Review window: checks records (evidence: `README.md`)
- Review window → Draft access: saves or restores (evidence: `main.py`)
- Draft access → Draft table: reads and writes (evidence: `component_to_db/workwithdb.py`)
- Review window → Resume settings: stores resume info (evidence: `main.py`)
- Operator → CRM loader: sends records (evidence: `README.md`)
- Review window → CRM loader: loads approved data (evidence: `main.py`)
- CRM loader → Contact database: inserts contacts (evidence: `components/to_main_db.py`)
- CRM loader → Duplicate matching: checks company (evidence: `components/to_main_db.py`)
- Draft table → Contact database: shares SQLite file
