# atomic09/chunker-batch-converter architecture

> Architecture diagram of the GitHub repository atomic09/chunker-batch-converter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/atomic09/chunker-batch-converter
- Repository: https://github.com/atomic09/chunker-batch-converter

## Overview

##### Project type and purpose
- This is a cross-platform desktop GUI application written in Python (main.py) that batches Minecraft world conversions between Java and Bedrock editions. It wraps the external Java-based Chunker CLI and provides a user-friendly PyQt6 interface. The auto_builder folder contains scripts and assets to package the app for macOS and Windows.

##### File structure
- Top‐level:
- main.py – the single entry point combining UI and business logic
- README.md, LICENSE, .gitignore – documentation and config
- auto_builder/build_mac – macOS packaging config (ChunkerBatchConverter.json) and build script
- auto_builder/build_windows – Windows packaging batch file
- No separate “frontend”/“backend” folders; UI (PyQt6) and logic live together in main.py. Packaging is handled by the auto_builder scripts.

##### README for additional insights
- Tech stack: Python 3.9+, PyQt6 for the GUI, requests for HTTP downloads, Java 17+ to run the Chunker JAR.
- Core features: JAR download management, batch conversion workflow, format/version selection.
- Usage flow: select or download JAR → choose Java binary → pick input/output dirs → configure target format → execute conversion.

##### Detailed capture of essential elements
- Step of the batch conversion workflow: JAR selection/download, Java process invocation per world, output directory writing
- How packaging scripts consume the same codebase and assets to produce executables for macOS and Windows

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Subgraph: Application Core
    subgraph "Application Core"
        direction TB
        GUI["PyQt6 GUI"]:::internal
        Download["Download Manager"]:::internal
        Controller["Conversion Controller"]:::internal
        FS["Filesystem I/O"]:::fs
    end

    %% Subgraph: External Services
    subgraph "External Services"
        direction TB
        GitHub["GitHub Releases API"]:::external
        Java["Java Runtime (Chunker CLI)"]:::external
    end

    %% Subgraph: Packaging Subsystem
    subgraph "Packaging Subsystem"
        direction TB
        Config["macOS Build Config"]:::packaging
        MacScript["macOS Build Script"]:::packaging
        WinScript["Windows Build Script"]:::packaging
        Asset["Application Icon Asset"]:::packaging
        Docs["Documentation & Metadata"]:::docs
    end

    %% Runtime Workflow
    GUI -->|"user actions"| Download
    GUI -->|"user actions"| Controller
    Download -->|"HTTP requests"| GitHub
    Controller -->|"spawn process"| Java
    Java -->|"write outputs"| FS
    Controller -->|"read/write"| FS
    Controller -->|"status updates"| GUI

    %% Packaging Workflow
    GUI -->|"source code"| Config
    GUI -->|"source code"| MacScript
    GUI -->|"source code"| WinScript
    Asset -->|"included in builds"| MacScript
    Asset -->|"included in builds"| Config
    Config -->|"produces installer"| Docs
    MacScript -->|"produces installer"| Docs
    WinScript -->|"produces installer"| Docs

    %% Documentation & Metadata links
    Docs --> READMEmd["README.md"]:::docs
    Docs --> License["LICENSE"]:::docs
    Docs --> Gitignore[".gitignore"]:::docs

    %% Click Events for component_mapping
    click GUI "https://github.com/atomic09/chunker-batch-converter/blob/master/main.py"
    click Download "https://github.com/atomic09/chunker-batch-converter/blob/master/main.py"
    click Controller "https://github.com/atomic09/chunker-batch-converter/blob/master/main.py"
    click FS "https://github.com/atomic09/chunker-batch-converter/blob/master/main.py"
    click Config "https://github.com/atomic09/chunker-batch-converter/blob/master/auto_builder/build_mac/ChunkerBatchConverter.json"
    click MacScript "https://github.com/atomic09/chunker-batch-converter/blob/master/auto_builder/build_mac/run_mac_builder.sh"
    click WinScript "https://github.com/atomic09/chunker-batch-converter/blob/master/auto_builder/build_windows/run_windows_builder.bat"
    click Asset "https://github.com/atomic09/chunker-batch-converter/blob/master/auto_builder/asset/mac-logo.icns"
    click READMEmd "https://github.com/atomic09/chunker-batch-converter/blob/master/README.md"
    click License "https://github.com/atomic09/chunker-batch-converter/tree/master/LICENSE"
    click Gitignore "https://github.com/atomic09/chunker-batch-converter/blob/master/.gitignore"

    %% Styles
    classDef internal fill:#D6EAF8,stroke:#1F618D,stroke-width:1px
    classDef external fill:#D5F5E3,stroke:#196F3D,stroke-width:1px
    classDef fs fill:#F2F3F4,stroke:#7B7D7D,stroke-width:1px
    classDef packaging fill:#F9E79F,stroke:#B7950B,stroke-width:1px
    classDef docs fill:#E8DAEF,stroke:#76448A,stroke-width:1px
```
