# phagenlocher/advent-of-code-2024 architecture

> Architecture diagram of the GitHub repository phagenlocher/advent-of-code-2024, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/phagenlocher/advent-of-code-2024
- Repository: https://github.com/phagenlocher/advent-of-code-2024

## Overview

- Main → Command Router → Individual Commands
- Commands → Data Management (for input/output)
- Commands → Solution Management (for execution)

- Data Management → Solution Management
- Solution Management → Benchmarking System
- Benchmarking System → Results Tracking

- .cargo/config.toml → Runner System
- CI/CD workflows → Build/Test Process

##### Elements

b. Version/Environment Information (Top-right corner):
- Rust version
- Project version
- Required dependencies

##### Additional Details

- Benchmark timing flows
- How the template system works
- File I/O paths
- Async operations (if any)

Remember to indicate the project's primary purpose: managing and running Advent of Code solutions with benchmarking capabilities and automated README updates.

This structure will give a clear picture of how the project works as a solution runner and management system for Advent of Code challenges, while showing the sophisticated benchmarking and automation features built into it.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Core["Core Runner System"]
        Main["Main Entry Point"]
        LibCore["Library Core"]
        Runner["Runner Infrastructure"]
    end

    subgraph Commands["Command Management System"]
        CmdRouter["Command Router"]
        Download["Download Command"]
        Scaffold["Scaffold Command"]
        Solve["Solve Command"]
        Time["Time Command"]
        Read["Read Command"]
        All["All Command"]
    end

    subgraph Solutions["Solution Management"]
        DaySolutions["Day Solutions"]
        Benchmark["Benchmarking System"]
        Results["Results Tracking"]
    end

    subgraph Data["Data Management"]
        Inputs["Input Data Storage"]
        Examples["Example Data Storage"]
        Puzzles["Puzzle Storage"]
    end

    subgraph Config["Configuration"]
        CargoConfig["Cargo Config"]
        CICD["CI/CD Workflows"]
    end

    %% Core relationships
    Main --> CmdRouter
    Main --> Runner
    LibCore --> Runner

    %% Command relationships
    CmdRouter --> Download
    CmdRouter --> Scaffold
    CmdRouter --> Solve
    CmdRouter --> Time
    CmdRouter --> Read
    CmdRouter --> All

    %% Command to Data/Solutions flows
    Download -.-> Inputs
    Download -.-> Puzzles
    Scaffold -.-> DaySolutions
    Solve --> DaySolutions
    Time --> Benchmark
    Read --> Puzzles
    All --> DaySolutions

    %% Solution flows
    DaySolutions --> Benchmark
    Benchmark --> Results

    %% Data flows
    Inputs -.-> DaySolutions
    Examples -.-> DaySolutions
    
    %% Config flows
    CargoConfig -.- Runner
    CICD -.- Runner

    %% Click events
    click Main "https://github.com/phagenlocher/advent-of-code-2024/blob/main/src/main.rs"
    click LibCore "https://github.com/phagenlocher/advent-of-code-2024/blob/main/src/lib.rs"
    click Runner "https://github.com/phagenlocher/advent-of-code-2024/blob/main/src/template/runner.rs"
    click CmdRouter "https://github.com/phagenlocher/advent-of-code-2024/blob/main/src/template/commands/mod.rs"
    click Download "https://github.com/phagenlocher/advent-of-code-2024/blob/main/src/template/commands/download.rs"
    click Scaffold "https://github.com/phagenlocher/advent-of-code-2024/blob/main/src/template/commands/scaffold.rs"
    click Solve "https://github.com/phagenlocher/advent-of-code-2024/blob/main/src/template/commands/solve.rs"
    click Time "https://github.com/phagenlocher/advent-of-code-2024/blob/main/src/template/commands/time.rs"
    click Read "https://github.com/phagenlocher/advent-of-code-2024/blob/main/src/template/commands/read.rs"
    click All "https://github.com/phagenlocher/advent-of-code-2024/blob/main/src/template/commands/all.rs"
    click DaySolutions "https://github.com/phagenlocher/advent-of-code-2024/tree/main/src/bin"
    click Benchmark "https://github.com/phagenlocher/advent-of-code-2024/blob/main/src/template/timings.rs"
    click Results "https://github.com/phagenlocher/advent-of-code-2024/blob/main/src/template/readme_benchmarks.rs"
    click Inputs "https://github.com/phagenlocher/advent-of-code-2024/tree/main/data/inputs"
    click Examples "https://github.com/phagenlocher/advent-of-code-2024/tree/main/data/examples"
    click Puzzles "https://github.com/phagenlocher/advent-of-code-2024/tree/main/data/puzzles"
    click CargoConfig "https://github.com/phagenlocher/advent-of-code-2024/blob/main/.cargo/config.toml"
    click CICD "https://github.com/phagenlocher/advent-of-code-2024/blob/main/.github/workflows/ci.yml"

    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef command fill:#2ecc71,stroke:#27ae60,color:white
    classDef solution fill:#e67e22,stroke:#d35400,color:white
    classDef data fill:#9b59b6,stroke:#8e44ad,color:white
    classDef config fill:#95a5a6,stroke:#7f8c8d,color:white

    class Main,LibCore,Runner core
    class CmdRouter,Download,Scaffold,Solve,Time,Read,All command
    class DaySolutions,Benchmark,Results solution
    class Inputs,Examples,Puzzles data
    class CargoConfig,CICD config
```
