# abcel-thomas/sma architecture

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

- Interactive diagram: https://gitdiagram.com/abcel-thomas/sma
- Repository: https://github.com/abcel-thomas/sma

## Overview

The checkout presents a file-renaming desktop application: users select a folder, preview or run processing, and can inspect security and duplicate-analysis views. The shown batch entry point scans, renames, then organizes files; the GUI excerpt shows worker-backed preview, report, and dashboard actions. The README describes two optimization pipelines, but their implementation paths are absent from the supplied tree, so they are not represented as runtime components. Core processing modules imported by the entry point are likewise not present here; relationships to their implementations are omitted.

Main entry points: [`gui.py`](https://github.com/abcel-thomas/sma/blob/main/gui.py) (Rename UI), [`main.py`](https://github.com/abcel-thomas/sma/blob/main/main.py) (Batch runner), [`config.py`](https://github.com/abcel-thomas/sma/blob/main/config.py) (Path and security settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Desktop interface"]
  node_gui["Rename UI<br/>[gui.py]"]
  node_folder_view["Folder browser<br/>[gui.py]"]
  node_preview["Preview worker<br/>[gui.py]"]
  node_file_report["File report worker<br/>[gui.py]"]
  node_dashboard["Security dashboard<br/>[gui.py]"]
  node_duplicate_scan["Duplicate scan<br/>[gui.py]"]
end

subgraph group_processing["File processing"]
  node_batch_entry["Batch runner<br/>[main.py]"]
end

subgraph group_support["Configuration and data"]
  node_settings["Path and security settings<br/>[config.py]"]
  node_training_examples["Filename category examples<br/>[training_data.py]"]
end

node_user(("User"))

node_user -->|"uses"| node_gui
node_gui -->|"browses folders"| node_folder_view
node_gui -->|"starts preview"| node_preview
node_gui -->|"requests report"| node_file_report
node_gui -->|"requests metrics"| node_dashboard
node_gui -->|"starts scan"| node_duplicate_scan
node_user -->|"runs batch"| node_batch_entry
node_batch_entry -->|"reads defaults"| node_settings

click node_gui "https://github.com/abcel-thomas/sma/blob/main/gui.py"
click node_folder_view "https://github.com/abcel-thomas/sma/blob/main/gui.py"
click node_preview "https://github.com/abcel-thomas/sma/blob/main/gui.py"
click node_file_report "https://github.com/abcel-thomas/sma/blob/main/gui.py"
click node_dashboard "https://github.com/abcel-thomas/sma/blob/main/gui.py"
click node_duplicate_scan "https://github.com/abcel-thomas/sma/blob/main/gui.py"
click node_batch_entry "https://github.com/abcel-thomas/sma/blob/main/main.py"
click node_settings "https://github.com/abcel-thomas/sma/blob/main/config.py"
click node_training_examples "https://github.com/abcel-thomas/sma/blob/main/training_data.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_gui,node_folder_view,node_preview,node_file_report,node_dashboard,node_duplicate_scan,node_user toneBlue
class node_batch_entry toneAmber
class node_settings,node_training_examples toneMint
```

## Components

### Desktop interface

- [Rename UI](https://github.com/abcel-thomas/sma/blob/main/gui.py): `gui.py`
- [Folder browser](https://github.com/abcel-thomas/sma/blob/main/gui.py): `gui.py`
- [Preview worker](https://github.com/abcel-thomas/sma/blob/main/gui.py): `gui.py`
- [File report worker](https://github.com/abcel-thomas/sma/blob/main/gui.py): `gui.py`
- [Security dashboard](https://github.com/abcel-thomas/sma/blob/main/gui.py): `gui.py`
- [Duplicate scan](https://github.com/abcel-thomas/sma/blob/main/gui.py): `gui.py`

### File processing

- [Batch runner](https://github.com/abcel-thomas/sma/blob/main/main.py): `main.py`

### Configuration and data

- [Path and security settings](https://github.com/abcel-thomas/sma/blob/main/config.py): `config.py`
- [Filename category examples](https://github.com/abcel-thomas/sma/blob/main/training_data.py): `training_data.py`

### Other components

- **User**

## Connections

- User → Rename UI: uses (evidence: `gui.py`)
- Rename UI → Folder browser: browses folders (evidence: `gui.py`)
- Rename UI → Preview worker: starts preview (evidence: `gui.py`)
- Rename UI → File report worker: requests report (evidence: `gui.py`)
- Rename UI → Security dashboard: requests metrics (evidence: `gui.py`)
- Rename UI → Duplicate scan: starts scan (evidence: `gui.py`)
- User → Batch runner: runs batch (evidence: `main.py`)
- Batch runner → Path and security settings: reads defaults (evidence: `main.py`)
