# andymememe/jziptoolx architecture

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

- Interactive diagram: https://gitdiagram.com/andymememe/jziptoolx
- Repository: https://github.com/andymememe/jziptoolx

## Overview

##### Main Components

a. User Interface Layer:
- JavaFX-based GUI (represented by main.fxml)

b. Controller Layer:
- Controller.java as the main mediator
- App.java as the application entry point

c. Core Functionality Layer:
- Zipper Package (file manipulation)
- Treer Package (file tree handling)

##### Component Relationships

**[JavaFX GUI] ←→ [Controller]**
- ↓
- ┌──────────┴───────────┐
- ↓                      ↓
**[Tree Manipulation]    [File Manipulation]**
- ↓
- [Supported Formats]
- (ZIP/TAR/Compress)

##### Specific Implementation Details

- Rectangle with rounded corners for GUI components (blue)
- Regular rectangles for core logic components (green)
- Hexagons for file manipulation components (orange)

##### Component Descriptions

a. GUI Layer:
- "JavaFX GUI (main.fxml)" - User interface implementation
- Interaction with Controller

b. Controller Layer:
- "Controller.java" - Handles user interactions and orchestrates operations
- "App.java" - Application bootstrap and JavaFX initialization

c. Manipulation Layer:
- "TreeManipulator" - Handles file system tree operations
- "ComManipulator" - Handles compressed file operations
- "TarManipulator" - Handles TAR file operations
- "ZipManipulator" - Handles ZIP file operations

##### Additional Elements

A technical stack sidebar:
- Java
- JavaFX
- Apache Commons Compress

##### Data Flow Indicators

- User input flow from GUI to Controller
- File operation requests from Controller to Manipulators
- Results and updates flowing back to GUI

##### Notes for Implementation

- Clear separation of concerns between UI, control, and file operations
- The modular nature of the file manipulation components
- The central role of the Controller in coordinating operations

Keep the abstraction level focused on the architectural components while showing the key relationships between the GUI, controller, and file manipulation modules. This will help developers understand both the high-level structure and the specific implementation details of the JZipToolX tool.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef gui fill:#a8d1f0,stroke:#3a87c4,stroke-width:2px
    classDef controller fill:#90EE90,stroke:#006400,stroke-width:2px
    classDef manipulator fill:#FFB347,stroke:#FF8C00,stroke-width:2px
    classDef tech fill:#E6E6FA,stroke:#483D8B,stroke-width:2px

    %% Main Components
    GUI["JavaFX GUI Interface"]:::gui
    APP["App.java<br/>(Entry Point)"]:::controller
    CTRL["Controller.java"]:::controller
    TREE["Tree Manipulator"]:::manipulator
    
    %% File Manipulators
    subgraph FileManipulators["File Manipulation Layer"]
        COM["Compress<br/>Manipulator"]:::manipulator
        TAR["TAR<br/>Manipulator"]:::manipulator
        ZIP["ZIP<br/>Manipulator"]:::manipulator
    end

    %% Tech Stack
    subgraph TechStack["Technical Stack"]
        JAVA["Java"]:::tech
        JAVAFX["JavaFX"]:::tech
        APACHE["Apache Commons<br/>Compress"]:::tech
    end

    %% Relationships
    GUI <--> CTRL
    APP --> CTRL
    CTRL --> TREE
    CTRL --> FileManipulators
    
    %% Click Events
    click GUI "https://github.com/andymememe/JZipToolX/blob/master/jziptoolx/src/main/resources/com/andymememe/jziptoolx/main.fxml"
    click APP "https://github.com/andymememe/JZipToolX/blob/master/jziptoolx/src/main/java/com/andymememe/jziptoolx/App.java"
    click CTRL "https://github.com/andymememe/JZipToolX/blob/master/jziptoolx/src/main/java/com/andymememe/jziptoolx/Controller.java"
    click TREE "https://github.com/andymememe/JZipToolX/blob/master/jziptoolx/src/main/java/com/andymememe/jziptoolx/treer/TreeManipulator.java"
    click COM "https://github.com/andymememe/JZipToolX/blob/master/jziptoolx/src/main/java/com/andymememe/jziptoolx/zipper/ComManipulator.java"
    click TAR "https://github.com/andymememe/JZipToolX/blob/master/jziptoolx/src/main/java/com/andymememe/jziptoolx/zipper/TarManipulator.java"
    click ZIP "https://github.com/andymememe/JZipToolX/blob/master/jziptoolx/src/main/java/com/andymememe/jziptoolx/zipper/ZipManipulator.java"

    %% Legend
    subgraph Legend
        L1["GUI Component"]:::gui
        L2["Controller Component"]:::controller
        L3["File Manipulator"]:::manipulator
        L4["Technology"]:::tech
    end
```
