# mickyloo/adventofcode architecture

> Architecture diagram of the GitHub repository mickyloo/adventofcode, 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/mickyloo/adventofcode
- Repository: https://github.com/mickyloo/adventofcode

## Overview

##### Main Components Structure

**[Year-Based Solutions]**
- ↓
**[Language-Specific Implementations]**
- ↓
**[Common Utilities & Patterns]**

##### Component Details

- Python implementations (2015-2019) → Blue zone
- Java implementation (2020) → Orange zone
- Kotlin implementations (2021-2023) → Green zone

b) For each year, show:
- Input handling mechanism
- Solution structure
- Build system (where applicable)

##### Implementation Patterns

Three main architectural patterns:

**[Simple Python Solutions]**
- Direct file input
- Single solution.py files
- No build system

**[Java Implementation]**
- Gradle build system
- Structured src/main layout
- Utility classes

**[Modern Kotlin Solutions]**
- Gradle (Kotlin DSL)
- Common utilities package
- Standardized day structure

- [Common Utilities]
- Grid operations
- Math utilities
- Parsing utilities

- [Input Handling]
- ↓
- [Daily Solution]
- ↓
- [Output Generation]

##### Specific Implementation Details

Create subsections showing:
- File organization patterns
- Build tool integration
- Common utility usage
- Input/output flow

**[Top Level]**
**Year Containers (2015-2023)**
- ↓
**[Middle Level]**
**Language-Specific Implementations**
- ↓
**[Bottom Level]**
**Shared Utilities and Resources**

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Legend
        direction TB
        L1[Python Solutions]:::python
        L2[Java Solutions]:::java
        L3[Kotlin Solutions]:::kotlin
        L4[Build Systems]:::build
        L5[Common Utilities]:::utils
        L6[Resources]:::resources
    end

    subgraph "Python Era (2015-2019)"
        direction TB
        PY2015["2015 Solutions"]:::python
        click PY2015 "https://github.com/mickyloo/adventofcode/tree/master/2015/"
        PY2016["2016 Solutions"]:::python
        click PY2016 "https://github.com/mickyloo/adventofcode/tree/master/2016/"
        PY2017["2017 Notebook"]:::python
        click PY2017 "https://github.com/mickyloo/adventofcode/blob/master/2017/adventofcode2017.ipynb"
        PY2019["2019 Notebook"]:::python
        click PY2019 "https://github.com/mickyloo/adventofcode/blob/master/2019/adventofcode2019.ipynb"
        
        InputPY["Input Files"]:::resources
        PY2015 --> InputPY
        PY2016 --> InputPY
        PY2017 --> InputPY
        PY2019 --> InputPY
    end

    subgraph "Java Implementation (2020)"
        direction TB
        JavaSol["Java Solutions"]:::java
        click JavaSol "https://github.com/mickyloo/adventofcode/tree/master/2020/src/main/java/"
        JavaUtils["Input Utils"]:::utils
        click JavaUtils "https://github.com/mickyloo/adventofcode/blob/master/2020/src/main/java/Utils/InputUtils.java"
        JavaBuild["Gradle Build"]:::build
        click JavaBuild "https://github.com/mickyloo/adventofcode/blob/master/2020/build.gradle"
        JavaRes["Resources"]:::resources
        click JavaRes "https://github.com/mickyloo/adventofcode/tree/master/2020/src/main/resources/"
        
        JavaSol --> JavaUtils
        JavaUtils --> JavaRes
        JavaBuild --> JavaSol
    end

    subgraph "Kotlin Era (2021-2023)"
        direction TB
        KT2021["2021 Solutions"]:::kotlin
        click KT2021 "https://github.com/mickyloo/adventofcode/tree/master/2021/src/main/kotlin/"
        KT2022["2022 Solutions"]:::kotlin
        click KT2022 "https://github.com/mickyloo/adventofcode/tree/master/2022/src/main/kotlin/"
        KT2023["2023 Solutions"]:::kotlin
        click KT2023 "https://github.com/mickyloo/adventofcode/tree/master/2023/src/main/kotlin/"
        
        KTBuild2021["Gradle KTS"]:::build
        click KTBuild2021 "https://github.com/mickyloo/adventofcode/blob/master/2021/build.gradle.kts"
        KTBuild2022["Gradle KTS"]:::build
        click KTBuild2022 "https://github.com/mickyloo/adventofcode/blob/master/2022/build.gradle.kts"
        KTBuild2023["Gradle KTS"]:::build
        click KTBuild2023 "https://github.com/mickyloo/adventofcode/blob/master/2023/build.gradle.kts"
        
        CommonUtils["Common Utilities"]:::utils
        click CommonUtils "https://github.com/mickyloo/adventofcode/tree/master/2023/src/main/kotlin/common/"
        
        GridOps["Grid Operations"]:::utils
        click GridOps "https://github.com/mickyloo/adventofcode/blob/master/2022/src/main/kotlin/common/grid.kt"
        MathUtils["Math Utilities"]:::utils
        click MathUtils "https://github.com/mickyloo/adventofcode/blob/master/2022/src/main/kotlin/common/math.kt"
        ParseUtils["Parsing Utilities"]:::utils
        click ParseUtils "https://github.com/mickyloo/adventofcode/blob/master/2022/src/main/kotlin/common/parser.kt"
        
        KT2021 --> CommonUtils
        KT2022 --> CommonUtils
        KT2023 --> CommonUtils
        
        CommonUtils --> GridOps
        CommonUtils --> MathUtils
        CommonUtils --> ParseUtils
        
        KTBuild2021 --> KT2021
        KTBuild2022 --> KT2022
        KTBuild2023 --> KT2023
    end

    classDef python fill:#3572A5,color:white
    classDef java fill:#B07219,color:white
    classDef kotlin fill:#A97BFF,color:white
    classDef build fill:#F7DF1E,color:black
    classDef utils fill:#2ECC71,color:white
    classDef resources fill:#95A5A6,color:white
```
