# accclarkson177-svg/deslib architecture

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

- Interactive diagram: https://gitdiagram.com/accclarkson177-svg/deslib
- Repository: https://github.com/accclarkson177-svg/deslib

## Overview

Deslib is a frameless desktop PDF-reading widget. Its main workflow is to accept dropped PDFs, import them in background workers while saving a first-page cover, display those covers in an interactive bookshelf dock, and open the selected PDF through the operating system. The implementation is concentrated in main.py; the excerpts show key components but omit some wiring, so edges are limited to documented or excerpt-supported relationships.

Main entry points: [`main.py`](https://github.com/accclarkson177-svg/deslib/blob/main/main.py) (Bookshelf Window)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_import["PDF Import"]
  node_drop["PDF Drop Zone<br/>[main.py]"]
  node_worker["Import Worker<br/>[main.py]"]
  node_pdf["PDF Files"]
  node_covers["Cover Images"]
end

subgraph group_shelf["Bookshelf Dock"]
  node_shelf["Bookshelf Window<br/>[main.py]"]
  node_surface["Dock Surface<br/>[main.py]"]
  node_book["Book Widget<br/>[main.py]"]
  node_preview["Cover Preview<br/>[main.py]"]
  node_open["PDF Opener<br/>[main.py]"]
end

subgraph group_app["Desktop Application"]
  node_desktop["Operating System"]
  node_app["Application Entry<br/>[main.py]"]
end

node_reader(("Reader"))

node_reader -->|"drops PDFs"| node_drop
node_drop -->|"signals paths"| node_shelf
node_shelf -->|"starts imports"| node_worker
node_worker -->|"copies PDF"| node_pdf
node_worker -->|"renders page"| node_covers
node_shelf -.->|"loads covers"| node_covers
node_shelf -.->|"hosts"| node_surface
node_shelf -->|"adds widgets"| node_book
node_book -->|"shows preview"| node_preview
node_book -->|"requests opening"| node_shelf
node_shelf -.->|"opens selection"| node_open
node_open -->|"launches PDF"| node_desktop
node_app -->|"creates window"| node_shelf

click node_drop "https://github.com/accclarkson177-svg/deslib/blob/main/main.py"
click node_worker "https://github.com/accclarkson177-svg/deslib/blob/main/main.py"
click node_shelf "https://github.com/accclarkson177-svg/deslib/blob/main/main.py"
click node_surface "https://github.com/accclarkson177-svg/deslib/blob/main/main.py"
click node_book "https://github.com/accclarkson177-svg/deslib/blob/main/main.py"
click node_preview "https://github.com/accclarkson177-svg/deslib/blob/main/main.py"
click node_open "https://github.com/accclarkson177-svg/deslib/blob/main/main.py"
click node_app "https://github.com/accclarkson177-svg/deslib/blob/main/main.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_drop,node_worker,node_pdf,node_covers toneBlue
class node_shelf,node_surface,node_book,node_preview,node_open toneAmber
class node_desktop,node_app toneMint
class node_reader toneIndigo
```

## Components

### PDF Import

- [PDF Drop Zone](https://github.com/accclarkson177-svg/deslib/blob/main/main.py): `main.py`
- [Import Worker](https://github.com/accclarkson177-svg/deslib/blob/main/main.py): `main.py`
- **PDF Files**
- **Cover Images**

### Bookshelf Dock

- [Bookshelf Window](https://github.com/accclarkson177-svg/deslib/blob/main/main.py): `main.py`
- [Dock Surface](https://github.com/accclarkson177-svg/deslib/blob/main/main.py): `main.py`
- [Book Widget](https://github.com/accclarkson177-svg/deslib/blob/main/main.py): `main.py`
- [Cover Preview](https://github.com/accclarkson177-svg/deslib/blob/main/main.py): `main.py`
- [PDF Opener](https://github.com/accclarkson177-svg/deslib/blob/main/main.py): `main.py`

### Desktop Application

- **Operating System**
- [Application Entry](https://github.com/accclarkson177-svg/deslib/blob/main/main.py): `main.py`

### Other components

- **Reader**

## Connections

- Reader → PDF Drop Zone: drops PDFs (evidence: `main.py`)
- PDF Drop Zone → Bookshelf Window: signals paths (evidence: `main.py`)
- Bookshelf Window → Import Worker: starts imports (evidence: `main.py`)
- Import Worker → PDF Files: copies PDF (evidence: `main.py`)
- Import Worker → Cover Images: renders page (evidence: `main.py`)
- Bookshelf Window → Cover Images: loads covers
- Bookshelf Window → Dock Surface: hosts (evidence: `main.py`)
- Bookshelf Window → Book Widget: adds widgets (evidence: `main.py`)
- Book Widget → Cover Preview: shows preview (evidence: `main.py`)
- Book Widget → Bookshelf Window: requests opening (evidence: `main.py`)
- Bookshelf Window → PDF Opener: opens selection (evidence: `main.py`)
- PDF Opener → Operating System: launches PDF (evidence: `main.py`)
- Application Entry → Bookshelf Window: creates window (evidence: `main.py`)
