# jonoricci/advent-of-code-python architecture

> Architecture diagram of the GitHub repository jonoricci/advent-of-code-python, 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/jonoricci/advent-of-code-python
- Repository: https://github.com/jonoricci/advent-of-code-python

## Overview

##### Main Components Structure

a) Create three main vertical layers:
- Helper Layer (Top)
- Year Solutions Layer (Middle)
- Infrastructure Layer (Bottom)

##### Component Details

a) Helper Layer (jono_aoc_helpers):
- Input Management (load_input.py, request_input.py)
- Logging System (logger.py)
- Argument Parser (arguments.py)
- Performance Monitoring (timing.py)

b) Year Solutions Layer:
- Each year container should show:
- Day solution modules
- Year-specific configuration
- Dependencies
- Use a template pattern indicator showing relationship to day_00_template

c) Infrastructure Layer:
- Virtual Environment Management
- Make automation
- Documentation system

##### Interactions and Flow

- Solution modules ↔ Helper module interactions
- Template inheritance patterns
- Configuration flow from year level to day solutions
- Input/Output data flow

**┌─────────────────── Helper Layer ───────────────────┐**
- jono_aoc_helpers                         │
- ┌─────────┐ ┌────────┐ ┌─────────┐ ┌─────────┐  │
- Input   │ │Logger  │ │Arguments│ │ Timing  │  │
- ┘ └────────┘ └─────────┘ └─────────┘  │
- ┬─────────────────────────────┘
- ↓
**┌─────────────── Year Solutions ──────────────────┐**
- ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐      │
- 2024 │ │2023 │ │2022 │ │2021 │ │2020 │ ...  │
- ┬──┘ └──┬──┘ └──┬──┘ └──┬──┘ └──┬──┘      │
- ┴───────┴───────┴───────┘         │
- ┬─────────────────────────────┘
- ↓
**┌─────────────── Infrastructure ──────────────────┐**
- ┌─────────┐ ┌────────────┐ ┌───────────────┐  │
- PyEnv   │ │ Makefiles  │ │ Documentation │  │
- ┘ └────────────┘ └───────────────┘  │
- ┘

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles
    classDef helper fill:#b3d9ff,stroke:#333
    classDef solution fill:#90EE90,stroke:#333
    classDef infra fill:#FFE5B4,stroke:#333
    classDef template fill:#D3D3D3,stroke:#333

    %% Helper Layer
    subgraph HelperLayer
        Helpers["jono_aoc_helpers"]:::helper
        subgraph HelperModules
            InputMgmt["Input Management"]:::helper
            Logger["Logging System"]:::helper
            ArgParser["Argument Parser"]:::helper
            PerfMon["Performance Monitoring"]:::helper
        end
        Helpers --> HelperModules
    end

    %% Year Solutions Layer
    subgraph SolutionsLayer
        Template["Solution Template"]:::template
        subgraph YearSolutions
            Y2024["2024 Solutions"]:::solution
            Y2023["2023 Solutions"]:::solution
            Y2022["2022 Solutions"]:::solution
            Y2021["2021 Solutions"]:::solution
            Y2020["2020 Solutions"]:::solution
            Y2015["2015 Solutions"]:::solution
        end
        Template --> YearSolutions
    end

    %% Infrastructure Layer
    subgraph InfraLayer
        VEnv["Virtual Environment"]:::infra
        Make["Make Automation"]:::infra
        Docs["Documentation"]:::infra
        Tests["Testing Framework"]:::infra
        Config["Configuration"]:::infra
    end

    %% Connections
    HelperLayer --> SolutionsLayer
    SolutionsLayer --> InfraLayer

    %% Click Events
    click InputMgmt "https://github.com/jonoricci/advent-of-code-python/blob/main/jono_aoc_helpers/load_input.py"
    click Logger "https://github.com/jonoricci/advent-of-code-python/blob/main/jono_aoc_helpers/logger.py"
    click ArgParser "https://github.com/jonoricci/advent-of-code-python/blob/main/jono_aoc_helpers/arguments.py"
    click PerfMon "https://github.com/jonoricci/advent-of-code-python/blob/main/jono_aoc_helpers/timing.py"
    click Template "https://github.com/jonoricci/advent-of-code-python/blob/main/2024/day_00_template/solution.py"
    click Y2024 "https://github.com/jonoricci/advent-of-code-python/tree/main/2024/"
    click Y2023 "https://github.com/jonoricci/advent-of-code-python/tree/main/2023/"
    click Y2022 "https://github.com/jonoricci/advent-of-code-python/tree/main/2022/"
    click Y2021 "https://github.com/jonoricci/advent-of-code-python/tree/main/2021/"
    click Y2020 "https://github.com/jonoricci/advent-of-code-python/tree/main/2020/"
    click Y2015 "https://github.com/jonoricci/advent-of-code-python/tree/main/2015/"
    click VEnv "https://github.com/jonoricci/advent-of-code-python/blob/main/2024/.python-version"
    click Make "https://github.com/jonoricci/advent-of-code-python/tree/main/2024/Makefile"
    click Docs "https://github.com/jonoricci/advent-of-code-python/tree/main/docs/"
    click Tests "https://github.com/jonoricci/advent-of-code-python/blob/main/2022/day_01/test_day_01.py"
    click Config "https://github.com/jonoricci/advent-of-code-python/blob/main/jono_aoc_helpers/requirements.txt"

    %% Legend
    subgraph Legend
        L1["Helper Components"]:::helper
        L2["Solution Modules"]:::solution
        L3["Infrastructure"]:::infra
        L4["Templates"]:::template
    end
```
