# wangtengda0310/gobee architecture

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

- Interactive diagram: https://gitdiagram.com/wangtengda0310/gobee
- Repository: https://github.com/wangtengda0310/gobee

## Overview

##### Project type and purpose
- This “gobee” repository is a monorepo of multiple Go-based CLI tools, libraries, and services. Each top-level folder (agent, cache, lvan, memshare, merkle, realm, reflectparam, snowflow_treemap, wangtengda, wow, etc.) is its own Go module with commands (`cmd`), internal implementations (`internal`), public packages (`pkg`), tests, and possibly README/docs.
- The global goal is to collect reusable utilities (caching strategies, command runners, coverage exporters, memory-sharing mechanisms, cryptographic proxies, etc.) under one umbrella.

##### File structure
- Top-level directories:
- agent – a CLI agent with subcommands (dir, time)
- cache – a caching facade selecting among bigcache, freecache, ristretto, etc.
- compare – a small CLI for comparing data
- lvan – a more complex CLI with multiple subcommands (coverage, exporter, merkle, mp, utf8) and shared `pkg` libraries (batch, cron, logger, merkle, utf8)
- memshare – inter-process communication via shared memory or pipes (provider & consumer)
- merkle – standalone Merkle-tree computation
- realm – SRP authentication functions and a WoW login proxy
- reflectparam – a reflection-based parameter inspection tool
- snowflow_treemap – a Treemap CLI for Snowflow data
- wangtengda, wow – small Go packages/tests
- Each module has its own `go.mod`/`go.sum`, so they compile independently.
- Several folders contain tests, CLI docs, sample inputs, and code-quality CI (e.g., Qodana).

##### README
- You must infer that this is a toolkit library monorepo with standalone Go executables and shared packages.

##### Detail
- Every top-level module appears.
- Facade implementations in cache.
- That lvan’s `coverage` subcommand orchestrates testing, profiling, HTTP calls, and notifications.
- Memshare’s two execution modes (pipe vs. shared memory) as two parallel consumer/provider flows.
- Shared utilities in lvan/pkg used by multiple subcommands.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Caching Tools
    subgraph "Caching Tools"
        CacheFacade["cache/cache.go"]:::pkg
        CacheInterface["cache/internal/Cache.go"]:::internal
        BigCache["cache/internal/bigcache.go"]:::internal
        FreeCache["cache/internal/freecache.go"]:::internal
        GoCache["cache/internal/go-cache.go"]:::internal
        Gocache["cache/internal/gocache.go"]:::internal
        GroupCache["cache/internal/groupcache.go"]:::internal
        Ristretto["cache/internal/ristretto.go"]:::internal
    end
    CacheFacade --> CacheInterface
    CacheInterface -->|implements| BigCache
    CacheInterface -->|implements| FreeCache
    CacheInterface -->|implements| GoCache
    CacheInterface -->|implements| Gocache
    CacheInterface -->|implements| GroupCache
    CacheInterface -->|implements| Ristretto

    %% Agent Tools
    subgraph "Agent (CLI Tools)"
        AgentDir["agent/cmd/dir/main.go"]:::cli
        AgentTime["agent/cmd/time/time.go"]:::cli
    end

    %% Compare Tool
    CompareCLI["compare/compare.go"]:::cli

    %% Code Analysis Tools (lvan)
    subgraph "Code Analysis Tools (lvan)"
        CMDCoverage["lvan/cmd/coverage/main.go"]:::cli
        CoverageExec["lvan/cmd/coverage/internal/coverage.go"]:::internal
        DingDing["lvan/cmd/coverage/internal/dingding.go"]:::internal
        FileStorage["lvan/cmd/coverage/internal/fileStorage.go"]:::internal
        FlagParse["lvan/cmd/coverage/internal/flag.go"]:::internal
        GoTestProfile["lvan/cmd/coverage/internal/goTestCoverProfile.go"]:::internal
        GoToolCover["lvan/cmd/coverage/internal/gotoolcover.go"]:::internal
        SummaryCov["lvan/cmd/coverage/internal/summaryPackageCoverage.go"]:::internal

        CMDCSV2MP["lvan/cmd/csv2mp/main.go"]:::cli
        CMDExporter["lvan/cmd/exporter/main.go"]:::cli
        ExporterAPI["lvan/cmd/exporter/api"]:::internal
        CMDJSON2MP["lvan/cmd/json2mp/main.go"]:::cli
        CMDMerkle["lvan/cmd/merkle/main.go"]:::cli
        CMDMP["lvan/cmd/mp/main.go"]:::cli
        CMDUTF8["lvan/cmd/utf8/main.go"]:::cli

        ExecuteCore["lvan/internal/execute"]:::internal
        SimpleLocker["lvan/internal/simple_file_locker.go"]:::internal
        TaskCleaner["lvan/internal/simple_task_cleaner.go"]:::internal

        BatchPkg["lvan/pkg/batch/batch.go"]:::pkg
        CronPkg["lvan/pkg/cron/cron.go"]:::pkg
        LoggerPkg["lvan/pkg/logger/logger.go"]:::pkg
        LoggerIO["lvan/pkg/logger/io.go"]:::pkg
        MerklePkg["lvan/pkg/merkle/merkle.go"]:::pkg
        UTF8Pkg["lvan/pkg/utf8/utf8.go"]:::pkg
    end

    %% Memshare IPC Tools
    subgraph "IPC Tools (memshare)"
        ProviderSM["memshare/provider_shared_memory.go"]:::cli
        ProviderPipe["memshare/provider_pipe.go"]:::cli
        ConsumerSM["memshare/consumer_shared_memory.go"]:::cli
        ConsumerPipe["memshare/consumer_pipe.go"]:::cli
    end

    %% Data Structures
    subgraph "Data Structures"
        MerkleStandalone["merkle/merkle.go"]:::pkg
        SnowflowCLI["snowflow_treemap/main.go"]:::cli
    end

    %% Crypto & Proxy
    subgraph "Crypto & Proxy (realm)"
        SRPOpen["realm/srpfunc/opencoff.go"]:::internal
        SRPVoynic["realm/srpfunc/voynic.go"]:::internal
        ProxyWOW["realm/proxy/wow_login_proxy.go"]:::internal
    end

    %% Utility Libraries
    subgraph "Utility Libraries"
        ReflectMain["reflectparam/main/main.go"]:::cli
        ReflectCore["reflectparam/reflect_param.go"]:::internal
        RankUtil["wangtengda/Rank.go"]:::pkg
        WowMsg["wow/msg.go"]:::pkg
    end

    %% Relationships
    CMDCoverage --> CoverageExec
    CMDCoverage --> DingDing
    CMDCoverage --> FileStorage
    CMDCoverage --> FlagParse
    CMDCoverage --> GoTestProfile
    CMDCoverage --> GoToolCover
    CMDCoverage --> SummaryCov

    SummaryCov --> BatchPkg
    CoverageExec --> LoggerPkg
    CoverageExec --> CronPkg
    CoverageExec --> ExecuteCore

    CMDExporter --> ExporterAPI
    CMDExporter --> LoggerPkg

    CMDMP --> ExecuteCore
    CMDCSV2MP --> ExecuteCore
    CMDJSON2MP --> ExecuteCore
    CMDMerkle --> MerklePkg
    CMDUTF8 --> UTF8Pkg

    ProviderSM --> ConsumerSM
    ProviderPipe --> ConsumerPipe

    ReflectMain --> ReflectCore

    %% Click Events
    click AgentDir "https://github.com/wangtengda0310/gobee/blob/main/agent/cmd/dir/main.go"
    click AgentTime "https://github.com/wangtengda0310/gobee/blob/main/agent/cmd/time/time.go"
    click CacheFacade "https://github.com/wangtengda0310/gobee/blob/main/cache/cache.go"
    click CacheInterface "https://github.com/wangtengda0310/gobee/blob/main/cache/internal/Cache.go"
    click BigCache "https://github.com/wangtengda0310/gobee/blob/main/cache/internal/bigcache.go"
    click FreeCache "https://github.com/wangtengda0310/gobee/blob/main/cache/internal/freecache.go"
    click GoCache "https://github.com/wangtengda0310/gobee/blob/main/cache/internal/go-cache.go"
    click Gocache "https://github.com/wangtengda0310/gobee/blob/main/cache/internal/gocache.go"
    click GroupCache "https://github.com/wangtengda0310/gobee/blob/main/cache/internal/groupcache.go"
    click Ristretto "https://github.com/wangtengda0310/gobee/blob/main/cache/internal/ristretto.go"
    click CompareCLI "https://github.com/wangtengda0310/gobee/blob/main/compare/compare.go"
    click CMDCoverage "https://github.com/wangtengda0310/gobee/blob/main/lvan/cmd/coverage/main.go"
    click CoverageExec "https://github.com/wangtengda0310/gobee/blob/main/lvan/cmd/coverage/internal/coverage.go"
    click DingDing "https://github.com/wangtengda0310/gobee/blob/main/lvan/cmd/coverage/internal/dingding.go"
    click FileStorage "https://github.com/wangtengda0310/gobee/blob/main/lvan/cmd/coverage/internal/fileStorage.go"
    click FlagParse "https://github.com/wangtengda0310/gobee/blob/main/lvan/cmd/coverage/internal/flag.go"
    click GoTestProfile "https://github.com/wangtengda0310/gobee/blob/main/lvan/cmd/coverage/internal/goTestCoverProfile.go"
    click GoToolCover "https://github.com/wangtengda0310/gobee/blob/main/lvan/cmd/coverage/internal/gotoolcover.go"
    click SummaryCov "https://github.com/wangtengda0310/gobee/blob/main/lvan/cmd/coverage/internal/summaryPackageCoverage.go"
    click CMDCSV2MP "https://github.com/wangtengda0310/gobee/blob/main/lvan/cmd/csv2mp/main.go"
    click CMDExporter "https://github.com/wangtengda0310/gobee/blob/main/lvan/cmd/exporter/main.go"
    click ExporterAPI "https://github.com/wangtengda0310/gobee/tree/main/lvan/cmd/exporter/api"
    click CMDJSON2MP "https://github.com/wangtengda0310/gobee/blob/main/lvan/cmd/json2mp/main.go"
    click CMDMerkle "https://github.com/wangtengda0310/gobee/blob/main/lvan/cmd/merkle/main.go"
    click CMDMP "https://github.com/wangtengda0310/gobee/blob/main/lvan/cmd/mp/main.go"
    click CMDUTF8 "https://github.com/wangtengda0310/gobee/blob/main/lvan/cmd/utf8/main.go"
    click ExecuteCore "https://github.com/wangtengda0310/gobee/tree/main/lvan/internal/execute"
    click SimpleLocker "https://github.com/wangtengda0310/gobee/blob/main/lvan/internal/simple_file_locker.go"
    click TaskCleaner "https://github.com/wangtengda0310/gobee/blob/main/lvan/internal/simple_task_cleaner.go"
    click BatchPkg "https://github.com/wangtengda0310/gobee/blob/main/lvan/pkg/batch/batch.go"
    click CronPkg "https://github.com/wangtengda0310/gobee/blob/main/lvan/pkg/cron/cron.go"
    click LoggerPkg "https://github.com/wangtengda0310/gobee/blob/main/lvan/pkg/logger/logger.go"
    click LoggerIO "https://github.com/wangtengda0310/gobee/blob/main/lvan/pkg/logger/io.go"
    click MerklePkg "https://github.com/wangtengda0310/gobee/blob/main/lvan/pkg/merkle/merkle.go"
    click UTF8Pkg "https://github.com/wangtengda0310/gobee/blob/main/lvan/pkg/utf8/utf8.go"
    click ProviderSM "https://github.com/wangtengda0310/gobee/blob/main/memshare/provider_shared_memory.go"
    click ProviderPipe "https://github.com/wangtengda0310/gobee/blob/main/memshare/provider_pipe.go"
    click ConsumerSM "https://github.com/wangtengda0310/gobee/blob/main/memshare/consumer_shared_memory.go"
    click ConsumerPipe "https://github.com/wangtengda0310/gobee/blob/main/memshare/consumer_pipe.go"
    click MerkleStandalone "https://github.com/wangtengda0310/gobee/blob/main/merkle/merkle.go"
    click SnowflowCLI "https://github.com/wangtengda0310/gobee/blob/main/snowflow_treemap/main.go"
    click SRPOpen "https://github.com/wangtengda0310/gobee/blob/main/realm/srpfunc/opencoff.go"
    click SRPVoynic "https://github.com/wangtengda0310/gobee/blob/main/realm/srpfunc/voynic.go"
    click ProxyWOW "https://github.com/wangtengda0310/gobee/blob/main/realm/proxy/wow_login_proxy.go"
    click ReflectMain "https://github.com/wangtengda0310/gobee/blob/main/reflectparam/main/main.go"
    click ReflectCore "https://github.com/wangtengda0310/gobee/blob/main/reflectparam/reflect_param.go"
    click RankUtil "https://github.com/wangtengda0310/gobee/blob/main/wangtengda/Rank.go"
    click WowMsg "https://github.com/wangtengda0310/gobee/blob/main/wow/msg.go"

    %% Styles
    classDef cli fill:#D0E6FF,stroke:#0366d6,color:#0366d6
    classDef internal fill:#E6FFE6,stroke:#228B22,color:#228B22
    classDef pkg fill:#FFF8C6,stroke:#DAA520,color:#DAA520
    classDef external fill:#F0F0F0,stroke:#999999,color:#999999
```
