# michaeldim02/lykan architecture

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

- Interactive diagram: https://gitdiagram.com/michaeldim02/lykan
- Repository: https://github.com/michaeldim02/lykan

## Overview

##### Project type and purpose
- This is a command-line leak-analysis tool (“lykan”) written in C.
- It ingests raw password dumps, computes statistics (top passwords, character popularity, etc.), and uses gnuplot to render visual graphs.

##### File structure
- Top-level:
- main.c             — entry point, argument parsing, orchestrates workflow
- 2-million-password-leak.txt — sample input data for testing
- LICENSE, README.md
- src/:
- Makefile           — build and install targets
- lykan.c            — core statistics engine (data structures, aggregation)
- progressbar.c/.h   — console progress UI
- gnuplot.c/.h       — wrapper that formats statistics into gnuplot scripts or pipes
- No separate “backend”/“frontend”—this is a standalone CLI with modular C files.

##### README for additional insights
- Dependencies: GCC/Clang/TCC, Make, and gnuplot at runtime.
- Under development: likely a single-process, modular design.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Project Artifacts
    Doc["Documentation (README.md)"]:::doc
    License["License (LICENSE)"]:::doc

    %% Build System
    Build["Build System (Makefile)"]:::build

    %% Input and Output
    Input[(2-million-password-leak.txt)]:::io
    Output[(Output Graphs)]:::io

    %% Core Modules
    subgraph "Core Modules"
        CLI["CLI Interface (main.c)"]:::internal
        Parser["Parser & Data Loader (lykan.c)"]:::internal
        Stats["Statistics Engine (lykan.c)"]:::internal
        Progress["Progress Bar UI (progressbar.c/.h)"]:::internal
        Plotter["Plotting Module (gnuplot.c/.h)"]:::internal
    end

    %% External Tool
    Gnuplot(("External Tool: gnuplot")):::external

    %% Data Flow
    Input --> CLI
    CLI --> Parser
    Parser --> Stats
    Stats --> Progress
    Stats --> Plotter
    Plotter --> Gnuplot
    Gnuplot --> Output

    %% Build and Docs
    Build --> CLI
    Build --> Parser
    Build --> Stats
    Build --> Progress
    Build --> Plotter
    Doc --- CLI
    License --- CLI

    %% Click Events
    click CLI "https://github.com/michaeldim02/lykan/blob/main/main.c"
    click Parser "https://github.com/michaeldim02/lykan/blob/main/src/lykan.c"
    click Stats "https://github.com/michaeldim02/lykan/blob/main/src/lykan.c"
    click Progress "https://github.com/michaeldim02/lykan/blob/main/src/progressbar.c"
    click Plotter "https://github.com/michaeldim02/lykan/blob/main/src/gnuplot.c"
    click Build "https://github.com/michaeldim02/lykan/tree/main/src/Makefile"
    click Input "https://github.com/michaeldim02/lykan/blob/main/2-million-password-leak.txt"
    click Doc "https://github.com/michaeldim02/lykan/blob/main/README.md"
    click License "https://github.com/michaeldim02/lykan/tree/main/LICENSE"

    %% Styles
    classDef internal fill:#1f77b4,stroke:#000,color:#fff;
    classDef external fill:#2ca02c,stroke:#000,color:#fff;
    classDef io fill:#ff7f0e,stroke:#000,color:#000;
    classDef build fill:#d3d3d3,stroke:#000,color:#000;
    classDef doc fill:#f7b6d2,stroke:#000,color:#000;
```
