# sparklingbalz/advent_of_code_2023 architecture

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

- Interactive diagram: https://gitdiagram.com/sparklingbalz/advent_of_code_2023
- Repository: https://github.com/sparklingbalz/advent_of_code_2023

## Overview

##### Main Components

a. Solution Structure:
- Individual Day modules (Day 1 through Day 20)
- Input Processing System
- Solution Output System

**┌─────────────────────────────────────────┐**
- Advent of Code 2023            │
- ┘
- ↓                ↓
**┌────────────────┐  ┌─────────────────┐**
- Input Handler │  │ Solution Modules │
- ┘  └─────────────────┘
- ↘         ↙
- ┌──────────────┐
- Output    │
- ┘

##### Key Elements to Highlight

- Blue: Core system components
- Green: Input processing
- Yellow: Solution modules
- Purple: Output handling
- Gray: Support utilities (like Day_5/location_finder.py)

b. Component Types:
- Use rectangles for main modules

##### Specific Implementation Details

a. Module Patterns:
- Single solution files (e.g., Day_7/code.py)
- Dual solution files (e.g., Day_1/code_1.py and code_2.py)
- Special utility modules (e.g., Day_5/location_finder.py)

b. Data Flow:
**Input File → Input Handler → Solution Module → Output**

**Symbols:**
**→ : Data flow direction**
**⇢ : Module dependency**
**□ : Main component**
**○ : Support utility**
**▽ : Input/Output**

##### Special Notes

- That inputs are not included in the repository (as stated in README)
- Python-centric nature of the solutions
- A note about the progressive nature of the solutions (Day 1-20)

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Core
        AOC[Advent of Code 2023]:::main
        IH[Input Handler]:::input
        OM[Output Manager]:::output
    end

    subgraph DualSolutions
        D1[Day 1]:::solution
        D2[Day 2]:::solution
        D4[Day 4]:::solution
        D14[Day 14]:::solution
        D15[Day 15]:::solution
    end

    subgraph SingleSolutions
        D7[Day 7]:::solution
        D9[Day 9]:::solution
        D10[Day 10]:::solution
        D12[Day 12]:::solution
        D13[Day 13]:::solution
    end

    subgraph Utilities
        LF[Location Finder]:::utility
        TI[Test Input]:::input
        GI[".gitignore"]:::config
    end

    %% Core connections
    AOC --> IH
    AOC --> OM

    %% Input handler connections
    IH --> D1
    IH --> D2
    IH --> D4
    IH --> D7
    IH --> D9
    IH --> D10
    IH --> D12
    IH --> D13
    IH --> D14
    IH --> D15

    %% Solution output connections
    D1 --> OM
    D2 --> OM
    D4 --> OM
    D7 --> OM
    D9 --> OM
    D10 --> OM
    D12 --> OM
    D13 --> OM
    D14 --> OM
    D15 --> OM

    %% Utility connections
    TI -.-> IH
    LF -.-> D4

    %% Click events
    click AOC "https://github.com/SparklingBalz/Advent_Of_Code_2023/blob/hohoho/README.md"
    click D1 "https://github.com/SparklingBalz/Advent_Of_Code_2023/blob/hohoho/Day_1/code_1.py"
    click D2 "https://github.com/SparklingBalz/Advent_Of_Code_2023/blob/hohoho/Day_2/code_1.py"
    click D4 "https://github.com/SparklingBalz/Advent_Of_Code_2023/blob/hohoho/Day_4/code_1.py"
    click D7 "https://github.com/SparklingBalz/Advent_Of_Code_2023/blob/hohoho/Day_7/code.py"
    click D9 "https://github.com/SparklingBalz/Advent_Of_Code_2023/blob/hohoho/Day_9/code.py"
    click D10 "https://github.com/SparklingBalz/Advent_Of_Code_2023/blob/hohoho/Day_10/code.py"
    click D12 "https://github.com/SparklingBalz/Advent_Of_Code_2023/blob/hohoho/Day_12/code.py"
    click D13 "https://github.com/SparklingBalz/Advent_Of_Code_2023/blob/hohoho/Day_13/code.py"
    click D14 "https://github.com/SparklingBalz/Advent_Of_Code_2023/blob/hohoho/Day_14/code.py"
    click D15 "https://github.com/SparklingBalz/Advent_Of_Code_2023/blob/hohoho/Day_15/code.py"
    click LF "https://github.com/SparklingBalz/Advent_Of_Code_2023/blob/hohoho/Day_5/location_finder.py"
    click TI "https://github.com/SparklingBalz/Advent_Of_Code_2023/blob/hohoho/Day_1/testInput.txt"
    click GI "https://github.com/SparklingBalz/Advent_Of_Code_2023/blob/hohoho/.gitignore"

    %% Styling
    classDef main fill:#3498db,stroke:#2980b9,color:white
    classDef input fill:#2ecc71,stroke:#27ae60,color:white
    classDef output fill:#9b59b6,stroke:#8e44ad,color:white
    classDef solution fill:#f1c40f,stroke:#f39c12,color:black
    classDef utility fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef config fill:#34495e,stroke:#2c3e50,color:white

    %% Legend
    subgraph Legend
        L1[Main Component]:::main
        L2[Input Component]:::input
        L3[Output Component]:::output
        L4[Solution Module]:::solution
        L5[Utility]:::utility
        L6[Configuration]:::config
    end
```
