# kangmoo/javautils architecture

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

- Interactive diagram: https://gitdiagram.com/kangmoo/javautils
- Repository: https://github.com/kangmoo/javautils

## Overview

##### Project Type Analysis
This is a modular Java utility library consisting of multiple specialized utility packages. The project follows a multi-module Maven structure, with each module providing specific functionality.

##### Main Components

Core Utility Modules (Group these by functionality):

a. Data Processing & Serialization Layer:
- JSON Utils (serialization/json)
- XML Utils (serialization/xml)
- Binary Utils (serialization/binary)

b. Configuration Management Layer:
- Config Module (supporting INI, JSON, YAML formats)
- System Environment handling

c. Network & Communication Layer:
- Network utilities (TCP/UDP/RTP)
- PCAP handling
- SSH functionality
- Kafka integration
- RabbitMQ (RMQ) support

d. Media Processing Layer:
- Audio processing (PCM, G711)
- SDP handling

e. Language & Text Processing:
- Hangul (Korean language) processing
- Validation utilities

f. Cloud Integration:
- GCP utilities (Speech-to-Text, Text-to-Speech)

g. Core Infrastructure:
- Promise implementation
- Reflection utilities
- Scheduler
- Common utilities

**→ Direct Dependency**
**⇢ Optional Dependency**
**□ Core Module**
**◇ Service Module**
**○ External Integration**

- [External Systems]
- ↑
- [Integration Layer]
- ┌─────────────────┼─────────────────┐
- GCP Utils         Kafka Utils       RMQ Utils
- ┼─────────────────┘
- [Service Layer]
- ┌─────────────────────────────────────────┐
- Network   Media    Config    Hangul    │
- Utils    Utils    Utils     Utils     │
- ┘
- [Core Layer]
- ┌─────────────────────────────────────────┐
- Common   Reflection   Promise  Scheduler │
- Utils     Utils      Utils    Utils    │
- ┘

##### Implementation Details to Highlight

- Resource management patterns (ManagedResourcePool)
- Configuration injection mechanisms
- Network protocol support
- Media format conversion capabilities
- Validation frameworks
- Promise-based asynchronous operations

## Diagram (Mermaid)

```mermaid
graph TB
    %% Style Definitions
    classDef core fill:#b3d9ff,stroke:#333,stroke-width:2px
    classDef network fill:#90EE90,stroke:#333,stroke-width:2px
    classDef media fill:#FFB366,stroke:#333,stroke-width:2px
    classDef cloud fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef config fill:#FFE5B4,stroke:#333,stroke-width:2px
    classDef text fill:#FFB6C1,stroke:#333,stroke-width:2px
    classDef external fill:#E6E6E6,stroke:#333,stroke-width:2px

    %% External Systems
    ExternalSystems["External Systems"]:::external

    %% Integration Layer
    subgraph IntegrationLayer["Integration Layer"]
        GCP["GCP Utils"]:::cloud
        Kafka["Kafka Utils"]:::network
        RMQ["RabbitMQ Utils"]:::network
        
        subgraph GCPServices["GCP Services"]
            STT["Speech-to-Text"]:::cloud
            TTS["Text-to-Speech"]:::cloud
        end
    end

    %% Service Layer
    subgraph ServiceLayer["Service Layer"]
        subgraph NetworkUtils["Network & Communication"]
            NetCore["Network Core"]:::network
            PCAP["PCAP Handler"]:::network
            RTP["RTP Utils"]:::network
            UDP["UDP Utils"]:::network
            SSH["SSH Utils"]:::network
        end

        subgraph MediaUtils["Media Processing"]
            Audio["Audio Processing"]:::media
            SDP["SDP Handler"]:::media
        end

        subgraph ConfigUtils["Configuration"]
            INIConfig["INI Config"]:::config
            JSONConfig["JSON Config"]:::config
            YAMLConfig["YAML Config"]:::config
            SysEnv["System Environment"]:::config
        end

        subgraph TextUtils["Text Processing"]
            Hangul["Hangul Processing"]:::text
            Validation["Validation Utils"]:::text
        end
    end

    %% Core Layer
    subgraph CoreLayer["Core Infrastructure"]
        Common["Common Utils"]:::core
        Promise["Promise Utils"]:::core
        Reflection["Reflection Utils"]:::core
        Scheduler["Scheduler"]:::core

        subgraph Serialization["Data Processing & Serialization"]
            JSON["JSON Utils"]:::core
            XML["XML Utils"]:::core
            Binary["Binary Utils"]:::core
        end
    end

    %% Relationships
    ExternalSystems --> IntegrationLayer
    GCP --> GCPServices
    STT & TTS --> ServiceLayer
    Kafka & RMQ --> NetworkUtils
    NetworkUtils --> CoreLayer
    MediaUtils --> CoreLayer
    ConfigUtils --> CoreLayer
    TextUtils --> CoreLayer

    %% Click Events
    click GCP "https://github.com/KangMoo/JavaUtils/tree/master/utility/gcp/"
    click STT "https://github.com/KangMoo/JavaUtils/tree/master/utility/gcp/src/main/java/com/github/kangmoo/utils/gcp/stt/"
    click TTS "https://github.com/KangMoo/JavaUtils/tree/master/utility/gcp/src/main/java/com/github/kangmoo/utils/gcp/tts/"
    click Kafka "https://github.com/KangMoo/JavaUtils/tree/master/utility/kafka/"
    click RMQ "https://github.com/KangMoo/JavaUtils/tree/master/utility/rmq/"
    click NetCore "https://github.com/KangMoo/JavaUtils/tree/master/utility/network/"
    click PCAP "https://github.com/KangMoo/JavaUtils/tree/master/utility/network/src/main/java/com/github/kangmoo/utils/pcap/"
    click RTP "https://github.com/KangMoo/JavaUtils/tree/master/utility/network/src/main/java/com/github/kangmoo/utils/rtp/"
    click UDP "https://github.com/KangMoo/JavaUtils/tree/master/utility/network/src/main/java/com/github/kangmoo/utils/udp/"
    click SSH "https://github.com/KangMoo/JavaUtils/tree/master/utility/ssh/"
    click Audio "https://github.com/KangMoo/JavaUtils/tree/master/utility/media/src/main/java/com/github/kangmoo/utils/audio/"
    click SDP "https://github.com/KangMoo/JavaUtils/tree/master/utility/sdp/"
    click INIConfig "https://github.com/KangMoo/JavaUtils/tree/master/utility/config/src/main/java/com/github/kangmoo/utils/config/ini/"
    click JSONConfig "https://github.com/KangMoo/JavaUtils/tree/master/utility/config/src/main/java/com/github/kangmoo/utils/config/json/"
    click YAMLConfig "https://github.com/KangMoo/JavaUtils/tree/master/utility/config/src/main/java/com/github/kangmoo/utils/config/yaml/"
    click SysEnv "https://github.com/KangMoo/JavaUtils/blob/master/utility/config/src/main/java/com/github/kangmoo/utils/config/SysEnv.java"
    click Hangul "https://github.com/KangMoo/JavaUtils/tree/master/utility/hangul/"
    click Validation "https://github.com/KangMoo/JavaUtils/tree/master/utility/validation/"
    click Common "https://github.com/KangMoo/JavaUtils/tree/master/utility/common/"
    click Promise "https://github.com/KangMoo/JavaUtils/tree/master/utility/promise/"
    click Reflection "https://github.com/KangMoo/JavaUtils/tree/master/utility/reflection/"
    click Scheduler "https://github.com/KangMoo/JavaUtils/tree/master/utility/scheduler/"
    click JSON "https://github.com/KangMoo/JavaUtils/tree/master/utility/serialization/src/main/java/com/github/kangmoo/utils/json/"
    click XML "https://github.com/KangMoo/JavaUtils/tree/master/utility/serialization/src/main/java/com/github/kangmoo/utils/xml/"
    click Binary "https://github.com/KangMoo/JavaUtils/tree/master/utility/serialization/src/main/java/com/github/kangmoo/utils/binary/"
```
