# fire-eggs/darkthumbs architecture

> Architecture diagram of the GitHub repository fire-eggs/darkthumbs, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fire-eggs/darkthumbs
- Repository: https://github.com/fire-eggs/darkthumbs

## Overview

##### Main Components Identification

The system consists of three main components:
- CBXManager: The management UI application
- CBXShell: The core shell extension component
- Setup Projects: Deployment components (x86 and x64 variants)

##### Component Relationships

- Data flow from Windows Explorer to CBXShell
- Communication between CBXShell and format handlers
- Registry interaction between CBXManager and system
- Thumbnail data flow back to Explorer

##### Important Details

a. COM Interface:
- COM registration/communication path
- Shell extension entry points

b. File Format Support:
- Supported formats by type (ebooks vs archives)
- Connection to respective processing libraries

c. Configuration Flow:
- Registry settings path
- Management interface connection

##### Technical Specifications

A technical notes section showing:
- Windows SDK dependencies
- 64-bit architecture support
- Minimum OS requirements
- Third-party library dependencies

##### Deployment View

Separate deployment paths for:
- x64 installation
- x86 installation
- Shell extension registration

This design should emphasize the shell extension nature of the project while showing how it integrates with both Windows Explorer and the various file format handlers.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Windows["Windows Environment"]
        Explorer["Windows Explorer"]
    end

    subgraph ShellExt["Shell Extension Layer"]
        COM["COM Interface"]:::com
        ShellImpl["Shell Implementation"]:::shell
    end

    subgraph Core["Core Processing Layer"]
        direction TB
        Common["Common Utilities"]:::core
        
        subgraph Handlers["Format Handlers"]
            direction TB
            EPUB["EPUB Handler"]:::handler
            FB["FB/FB2 Handler"]:::handler
            MOBI["MOBI/AZW Handler"]:::handler
            
            subgraph Archive["Archive Handlers"]
                ZIP["ZIP Handler"]:::handler
                RAR["RAR Handler"]:::handler
                SEVENZ["7Z Handler"]:::handler
            end
        end
        
        subgraph Services["Common Services"]
            ThumbnailGen["Thumbnail Generator"]:::service
            ArchiveExtract["Archive Extractor"]:::service
        end
    end

    subgraph Management["Management Layer"]
        CBXManager["CBX Manager UI"]:::ui
        RegMgr["Registry Manager"]:::mgmt
        Settings["User Settings"]:::mgmt
    end

    subgraph Deploy["Deployment"]
        Setup64["x64 Setup"]:::deploy
        Setup86["x86 Setup"]:::deploy
    end

    subgraph Test["Testing Framework"]
        Tester["Main Tester"]:::test
        ArchTest["Archive Testing"]:::test
    end

    Explorer --> COM
    COM --> ShellImpl
    ShellImpl --> Common
    Common --> Handlers
    Handlers --> Services
    Services --> ShellImpl
    CBXManager --> RegMgr
    RegMgr --> ShellImpl
    Settings --> CBXManager
    ShellImpl --> Explorer

    classDef com fill:#6495ED,stroke:#333,stroke-width:2px
    classDef shell fill:#4169E1,stroke:#333,stroke-width:2px
    classDef core fill:#32CD32,stroke:#333,stroke-width:2px
    classDef handler fill:#98FB98,stroke:#333,stroke-width:2px
    classDef service fill:#90EE90,stroke:#333,stroke-width:2px
    classDef ui fill:#FFA500,stroke:#333,stroke-width:2px
    classDef mgmt fill:#FFB84D,stroke:#333,stroke-width:2px
    classDef deploy fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef test fill:#F0E68C,stroke:#333,stroke-width:2px

    click COM "https://github.com/fire-eggs/darkthumbs/blob/V1.1/CBXShell/CBXShell.idl"
    click ShellImpl "https://github.com/fire-eggs/darkthumbs/blob/V1.1/CBXShell/CBXShellClass.cpp"
    click EPUB "https://github.com/fire-eggs/darkthumbs/blob/V1.1/CBXShell/epub.cpp"
    click FB "https://github.com/fire-eggs/darkthumbs/blob/V1.1/CBXShell/fb.cpp"
    click MOBI "https://github.com/fire-eggs/darkthumbs/blob/V1.1/mobi/libmobi.lib"
    click ZIP "https://github.com/fire-eggs/darkthumbs/blob/V1.1/CBXShell/cunzip.h"
    click RAR "https://github.com/fire-eggs/darkthumbs/blob/V1.1/CBXShell/unrar.h"
    click CBXManager "https://github.com/fire-eggs/darkthumbs/blob/V1.1/CBXManager/MainDlg.cpp"
    click RegMgr "https://github.com/fire-eggs/darkthumbs/blob/V1.1/CBXManager/RegManager.h"
    click Setup64 "https://github.com/fire-eggs/darkthumbs/blob/V1.1/DarkThumbsSetup_x64/DarkThumbsSetup_x64.vdproj"
    click Setup86 "https://github.com/fire-eggs/darkthumbs/blob/V1.1/DarkThumbsSetup_x86/DarkThumbsSetup_x86.vdproj"
    click Common "https://github.com/fire-eggs/darkthumbs/blob/V1.1/CBXShell/common.cpp"
    click Tester "https://github.com/fire-eggs/darkthumbs/blob/V1.1/tester/Tester.cpp"
    click ArchTest "https://github.com/fire-eggs/darkthumbs/blob/V1.1/tester/testCbr.cpp"
```
