# mattravenhall/adventofcode architecture

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

- Interactive diagram: https://gitdiagram.com/mattravenhall/adventofcode
- Repository: https://github.com/mattravenhall/adventofcode

## Overview

##### Project Type Analysis
This is a coding challenge solutions repository containing solutions for Advent of Code problems across multiple years (2018-2024). The project is primarily implemented in Python with some Julia solutions and a recent addition of Rust solutions.

The system architecture should be represented as follows:

A. Main Components:
1. Year-based Solution Groups (2018-2024)
2. Language-specific Implementation Modules
3. Testing Infrastructure
4. Solution Runner System

B. Component Relationships:

**[Top Level Organization]**

- [Year Containers (2018-2024)]

- [Daily Challenge Modules]
- Solution Implementation (A/B Parts)
- Test Cases

- [Language-Specific Implementations]
- Python Solutions
- Julia Solutions (2018)
- Rust Solutions (2024)

- [Common Infrastructure]
- Testing Framework

##### Implementation Details

- File naming conventions (solveA.py, solveB.py, test.txt)
- Language-specific solution patterns
- Test data organization
- The relationship between solution files and their corresponding test files

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Legend
        direction TB
        L1[Python Solution]:::python
        L2[Julia Solution]:::julia
        L3[Rust Solution]:::rust
        L4[(Test Data)]:::test
        L5[Infrastructure]:::infra
    end

    subgraph Project["Advent of Code Solutions"]
        direction TB
        
        subgraph Years["Year-based Solutions"]
            direction TB
            Y2018["2018"]:::year
            Y2020["2020"]:::year
            Y2021["2021"]:::year
            Y2022["2022"]:::year
            Y2023["2023"]:::year
            Y2024["2024"]:::year
        end

        subgraph Implementation["Solution Implementation Pattern"]
            direction TB
            DayModule["Daily Challenge Module"]:::module
            SolA["Part A Solution"]:::python
            SolB["Part B Solution"]:::python
            TestData[(Test Files)]:::test
            
            DayModule --> SolA
            DayModule --> SolB
            TestData --> SolA
            TestData --> SolB
        end

        subgraph Languages["Language Implementations"]
            direction TB
            Python["Python Solutions"]:::python
            Julia["Julia Solutions"]:::julia
            Rust["Rust Solutions"]:::rust
        end

        subgraph Infrastructure["Common Infrastructure"]
            direction TB
            TestFramework["Testing Framework"]:::infra
            RustRunner["Rust Runner"]:::rust
            SolutionModule["Solution Module"]:::module
        end
    end

    %% Click events for component mapping
    click Y2018 "https://github.com/mattravenhall/AdventOfCode/tree/master/2018/"
    click Y2020 "https://github.com/mattravenhall/AdventOfCode/tree/master/2020/"
    click Y2021 "https://github.com/mattravenhall/AdventOfCode/tree/master/2021/"
    click Y2022 "https://github.com/mattravenhall/AdventOfCode/tree/master/2022/"
    click Y2023 "https://github.com/mattravenhall/AdventOfCode/tree/master/2023/"
    click Y2024 "https://github.com/mattravenhall/AdventOfCode/tree/master/2024/"
    click Julia "https://github.com/mattravenhall/AdventOfCode/blob/master/2018/Day_01/solveA.jl"
    click Rust "https://github.com/mattravenhall/AdventOfCode/tree/master/2024/RustSolutions/src/solve/"
    click RustRunner "https://github.com/mattravenhall/AdventOfCode/blob/master/2024/RustSolutions/src/main.rs"
    click SolutionModule "https://github.com/mattravenhall/AdventOfCode/blob/master/2024/RustSolutions/src/solve.rs"
    click TestData "https://github.com/mattravenhall/AdventOfCode/blob/master/2024/Day_02/test.txt"

    %% Styling
    classDef python fill:#3776AB,color:white
    classDef julia fill:#389826,color:white
    classDef rust fill:#DEA584,color:black
    classDef test fill:#666666,color:white
    classDef infra fill:#FFD700,color:black
    classDef year fill:#4B0082,color:white
    classDef module fill:#2F4F4F,color:white
```
