# greamown/obfuscate-pyfile architecture

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

- Interactive diagram: https://gitdiagram.com/greamown/obfuscate-pyfile
- Repository: https://github.com/greamown/obfuscate-pyfile

## Overview

##### Main Components

a) Input Layer:
- Command-line interface component
- File system interaction for input files
- Argument parser (-p parameter handling)

b) Core Processing Layer:
- Obfuscation engine (encrypt.py)
- Utility functions (common/utils.py)

c) Output Layer:
- Obfuscated file writer
- File system interaction for output files

d) Docker Environment:
- Container runtime
- Dependencies management

**[Input Files] → [Docker Container] → [Obfuscated Files]**
- ↓
- [Core Components]

**[CLI Interface] → [File Scanner] → [Obfuscation Engine] → [File Writer]**
- ↑                   ↑
- [File System]    [Utility Functions]

##### Specific Elements

- Blue: Core processing components (encrypt.py)
- Green: Utility components (common/utils.py)
- Gray: Infrastructure components (Docker container)
- Yellow: I/O components (file system interactions)

- Direction of file processing flow

c) Boundaries:
- Core processing boundary
- I/O boundary

##### Important Details to Highlight

- Docker container as an encompassing boundary
- File processing pipeline
- Command-line interface entry point
- Relationship between encrypt.py and common/utils.py
- Where configuration and requirements are loaded

##### Technical Specifications to Note

- Python-based implementation
- Docker containerization
- File system interactions
- Command-line interface

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Docker["Docker Environment"]
        direction TB
        subgraph Input["Input Layer"]
            CLI["Command Line Interface"]:::cli
            FSI["File System Input"]:::io
            ArgP["Argument Parser"]:::cli
        end

        subgraph Core["Core Processing Layer"]
            direction TB
            ObfEng["Obfuscation Engine"]:::core
            Utils["Utility Functions"]:::util
        end

        subgraph Output["Output Layer"]
            FSO["File System Output"]:::io
            FileW["File Writer"]:::io
        end

        subgraph Dependencies["Dependencies Layer"]
            DockerConfig["Docker Configuration"]:::docker
            ReqFile["Requirements File"]:::docker
            InstallScript["Installation Script"]:::docker
            BuildScript["Build Script"]:::docker
            RunScript["Runtime Script"]:::docker
        end

        CLI --> ArgP
        ArgP --> FSI
        FSI --> ObfEng
        ObfEng --> FileW
        FileW --> FSO
        Utils --> ObfEng
        Utils --> FSI
        Utils --> FSO
    end

    subgraph Testing["Testing Layer"]
        TestImpl["Test Implementation"]:::test
    end

    TestImpl -.-> Docker

    %% Click Events
    click CLI "https://github.com/greamown/obfuscate-pyfile/blob/master/encrypt.py"
    click ObfEng "https://github.com/greamown/obfuscate-pyfile/blob/master/encrypt.py"
    click Utils "https://github.com/greamown/obfuscate-pyfile/blob/master/common/utils.py"
    click DockerConfig "https://github.com/greamown/obfuscate-pyfile/tree/master/docker/Dockerfile"
    click ReqFile "https://github.com/greamown/obfuscate-pyfile/blob/master/docker/requirements.txt"
    click BuildScript "https://github.com/greamown/obfuscate-pyfile/blob/master/docker/build.sh"
    click RunScript "https://github.com/greamown/obfuscate-pyfile/blob/master/docker/run.sh"
    click InstallScript "https://github.com/greamown/obfuscate-pyfile/blob/master/docker/install.sh"
    click TestImpl "https://github.com/greamown/obfuscate-pyfile/blob/master/test/script.py"

    %% Styles
    classDef cli fill:#f9f,stroke:#333,stroke-width:2px
    classDef io fill:#ff9,stroke:#333,stroke-width:2px
    classDef core fill:#9cf,stroke:#333,stroke-width:2px
    classDef util fill:#9f9,stroke:#333,stroke-width:2px
    classDef docker fill:#ddd,stroke:#333,stroke-width:2px
    classDef test fill:#f99,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        CLI_L["Command Line Interface"]:::cli
        IO_L["I/O Components"]:::io
        Core_L["Core Components"]:::core
        Util_L["Utility Components"]:::util
        Docker_L["Docker Components"]:::docker
        Test_L["Testing Components"]:::test
    end
```
