# h8000572003/commons-all architecture

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

- Interactive diagram: https://gitdiagram.com/h8000572003/commons-all
- Repository: https://github.com/h8000572003/commons-all

## Overview

##### Project type and purpose
- This is a multi-module Maven project (“共用元件整合包”) that bundles a suite of reusable Java libraries/components.
- Each sub-directory (commons-base, commons-design, commons-thread, coomon-prooptics, hcp, hcp-start, telegram, commons-textcut, commons-check, commons-generator, zip, etc.) is its own Maven module producing a JAR.

##### File structure
- Top-level pom.xml orchestrates all child modules.
- commons-base: foundational utilities (exceptions, objects).
- commons-design: design-pattern implementations (concurrent pools, event buses, state machines, observer).
- commons-thread: parallel task abstractions (group tasks, segment groups).
- coomon-prooptics: property-service and caching abstractions.
- commons-textcut: text-splitting/parsing rules (string/byte/Excel).
- commons-check: data validation framework (CheckService, ValidationService).
- commons-generator: code-generation engine (FreeMarker templates, SQL/DTO generator).
- hcp & hcp-start: Hitachi Content Platform client plus Spring-Boot autoconfigure starter.
- telegram: Telegram-bot command framework.
- zip: zipping/unzipping utilities with strategy patterns.
- Each module has standard Maven layout (src/main/java, resources, tests), some include application.properties or spring.factories.

##### README
- Confirms the list of modules and their high-level purpose.

##### Essential elements
- That hcp-start is a Spring-Boot starter wrapping hcp.
- That commons-generator is a standalone engine leveraging templates and resolvers.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Core Layer
    subgraph "Core Layer"
        CB["commons-base\nFoundation utilities"]:::core
    end

    %% Design Layer
    subgraph "Design Layer"
        CD["commons-design\nDesign patterns"]:::design
    end

    %% Utility Layer
    subgraph "Utility Layer"
        CT["commons-thread\nParallel tasks"]:::util
        CO["coomon-prooptics\nProperty & caching"]:::util
        TC["commons-textcut\nText parsing"]:::util
        ZP["zip\nZip/Unzip utilities"]:::util
    end

    %% Validation Layer
    subgraph "Validation Layer"
        CC["commons-check\nData validation"]:::validation
    end

    %% Generation Layer
    subgraph "Generation Layer"
        CG["commons-generator\nCode generation"]:::generation
    end

    %% Integration Layer
    subgraph "Integration Layer"
        HCP["hcp\nHCP client"]:::integration
        HS["hcp-start\nSpring-Boot starter"]:::integration
        TG["telegram\nTelegram bot framework"]:::integration
    end

    %% Dependencies
    CD -->|"depends on"| CB
    CT -->|"depends on"| CB
    CT -->|"builds on"| CD
    CO -->|"depends on"| CB
    TC -->|"depends on"| CB
    ZP -->|"depends on"| CB
    CC -->|"depends on"| CB
    CG -->|"depends on"| CB

    CO -->|"uses patterns from"| CD
    TC -->|"uses patterns from"| CD
    ZP -->|"uses strategies"| CD
    CC -->|"leverages validation patterns"| CD
    CG -->|"leverages templates"| CD

    HCP -->|"depends on"| CB
    HS -->|"wraps"| HCP
    HS -->|"depends on"| CB
    TG -->|"depends on"| CB

    %% Click Events
    click CB "https://github.com/h8000572003/commons-all/tree/master/commons-base/src/main/java/io/github/h800572003"
    click CD "https://github.com/h8000572003/commons-all/tree/master/commons-design/src/main/java/io/github/h800572003/concurrent"
    click CD "https://github.com/h8000572003/commons-all/tree/master/commons-design/src/main/java/io/github/h800572003/eventbuus"
    click CD "https://github.com/h8000572003/commons-all/tree/master/commons-design/src/main/java/io/github/h800572003/machine"
    click CD "https://github.com/h8000572003/commons-all/tree/master/commons-design/src/main/java/io/github/h800572003/observer"
    click CT "https://github.com/h8000572003/commons-all/tree/master/commons-thread/src/main/java/io/github/h800572003/concurrent/group"
    click CO "https://github.com/h8000572003/commons-all/tree/master/coomon-prooptics/src/main/java/io/github/h800572003/properties"
    click TC "https://github.com/h8000572003/commons-all/tree/master/commons-textcut/src/main/java/io/github/h800572003/textcut"
    click TC "https://github.com/h8000572003/commons-all/tree/master/commons-textcut/src/main/java/io/github/h800572003/textcut/paser"
    click CC "https://github.com/h8000572003/commons-all/tree/master/commons-check/src/main/java/io/github/h800572003/check"
    click CG "https://github.com/h8000572003/commons-all/tree/master/commons-generator/src/main/java/io/github/h800572003/generator"
    click CG "https://github.com/h8000572003/commons-all/tree/master/commons-generator/src/main/resources/templates"
    click HCP "https://github.com/h8000572003/commons-all/tree/master/hcp/src/main/java/io/github/h800572003/hcp"
    click HS "https://github.com/h8000572003/commons-all/tree/master/hcp-start/src/main/java/io/github/h800572003/hcp/start"
    click HS "https://github.com/h8000572003/commons-all/blob/master/hcp-start/src/main/resources/META-INF/spring.factories"
    click TG "https://github.com/h8000572003/commons-all/tree/master/telegram/src/main/java/io/github/h800572003/telegram"

    %% Styles
    classDef core fill:#bbdefb,stroke:#1e88e5,color:#0d47a1;
    classDef design fill:#c8e6c9,stroke:#43a047,color:#1b5e20;
    classDef util fill:#ffe0b2,stroke:#fb8c00,color:#e65100;
    classDef validation fill:#d1c4e9,stroke:#8e24aa,color:#4a148c;
    classDef generation fill:#d1c4e9,stroke:#8e24aa,color:#4a148c;
    classDef integration fill:#ffcdd2,stroke:#e53935,color:#b71c1c;
```
