# deadpyxel/l33tspeak architecture

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

- Interactive diagram: https://gitdiagram.com/deadpyxel/l33tspeak
- Repository: https://github.com/deadpyxel/l33tspeak

## Overview

##### Main Components

a. Input Handlers
- STDIN Pipeline Handler
- Command-line Arguments Handler

b. Core Processing
- L33t Converter Engine
- Probability Controller

c. Output Handler
- STDOUT Writer

##### Component Details

a. Input Layer:
- Two parallel input paths:
1. STDIN pipe
2. CLI arguments
- A merger point where these inputs converge

b. Processing Layer:
- Probability controller (-p flag handler)
- Core l33t conversion engine
- Character mapping logic

c. Output Layer:
- STDOUT writer
- Formatting/string composition

##### Additional Elements

A small configuration section showing:
- Go module configuration
- Test files location
- GitHub Actions workflow

##### Technical Details to Note

Annotations for:
- Go version requirement
- Binary size (~2.2MiB)
- Cross-platform compatibility
- Test coverage information

## Diagram (Mermaid)

```mermaid
graph TB
    %% Input Layer
    subgraph Input
        STDIN["STDIN Pipeline"]:::input
        CLI["CLI Arguments"]:::input
        InputMerger{"Input Source"}:::decision
    end

    %% Processing Layer
    subgraph Processing
        ProbController["Probability Controller"]:::process
        L33tEngine["L33t Conversion Engine"]:::process
        CharMapper["Character Mapping"]:::process
    end

    %% Output Layer
    subgraph Output
        STDOut["STDOUT Writer"]:::output
    end

    %% Configuration Layer
    subgraph Configuration
        GoMod["Go Module Config"]:::config
        TestFiles["Test Suite"]:::test
        GHActions["GitHub Actions"]:::ci
        BugReport["Bug Reports"]:::support
        FeatureReq["Feature Requests"]:::support
    end

    %% Flow Connections
    STDIN --> InputMerger
    CLI --> InputMerger
    InputMerger --> ProbController
    ProbController --> L33tEngine
    L33tEngine --> CharMapper
    CharMapper --> STDOut

    %% Component Relationships
    GoMod -.-> L33tEngine
    TestFiles -.-> L33tEngine
    GHActions -.-> TestFiles

    %% Click Events
    click L33tEngine "https://github.com/deadpyxel/l33tspeak/blob/main/main.go"
    click TestFiles "https://github.com/deadpyxel/l33tspeak/blob/main/main_test.go"
    click GoMod "https://github.com/deadpyxel/l33tspeak/blob/main/go.mod"
    click GHActions "https://github.com/deadpyxel/l33tspeak/blob/main/.github/workflows/go-ci.yml"
    click BugReport "https://github.com/deadpyxel/l33tspeak/blob/main/.github/ISSUE_TEMPLATE/bug_report.md"
    click FeatureReq "https://github.com/deadpyxel/l33tspeak/blob/main/.github/ISSUE_TEMPLATE/feature_request.md"

    %% Styling
    classDef input fill:#a2d2ff,stroke:#333,stroke-width:2px
    classDef process fill:#90be6d,stroke:#333,stroke-width:2px
    classDef output fill:#f9c74f,stroke:#333,stroke-width:2px
    classDef decision fill:#f94144,stroke:#333,stroke-width:2px
    classDef config fill:#577590,stroke:#333,stroke-width:2px
    classDef test fill:#277da1,stroke:#333,stroke-width:2px
    classDef ci fill:#4d908e,stroke:#333,stroke-width:2px
    classDef support fill:#43aa8b,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        L1["Input Component"]:::input
        L2["Processing Component"]:::process
        L3["Output Component"]:::output
        L4{"Decision Point"}:::decision
        L5["Configuration"]:::config
        L6["Test Component"]:::test
        L7["CI/CD"]:::ci
        L8["Support"]:::support
    end
```
