# euribates/advent_of_code_2024 architecture

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

- Interactive diagram: https://gitdiagram.com/euribates/advent_of_code_2024
- Repository: https://github.com/euribates/advent_of_code_2024

## Overview

##### Main Components

a. Template System:
- Cookiecutter-aoc template directory as a central component
- How it generates the structure for new daily challenges

b. Daily Solution Structure (repeated pattern):
- Core Module (core.py)
- Part One Solution (part_one.py)
- Part Two Solution (part_two.py)
- Test Components (test_core.py)
- Input/Sample Data Management

c. Special Components:
- Godot integration (specifically for day_04)
- Demo scripts (found in day_15 and day_16)

**[Project Root]**

- [Template System]
- [Day Template Structure]

- [Common Pattern]
- [Core Logic]
- [Part Solutions]
- [Testing Framework]

- [Daily Implementations]
- [Standard Days]
- [Special Days]

##### Relationships

- Template generation flow (cookiecutter → daily structure)
- Dependency relationships between core.py and part solutions
- Test coverage relationships
- Data flow from input files to solutions

##### Important Details to Highlight

a. File Structure Pattern:
- How each day follows the same basic structure
- Modular approach with separate core logic and solutions

b. Testing Framework:
- How test files relate to core implementation
- Sample data usage in testing

c. Special Cases:
- Day_04's Godot integration
- Demo implementations for days 15-16

##### Special implementations and variations

Remember to include a notes section explaining:
- The encrypted nature of input files (.gpg)
- The relationship between sample files and test cases
- Any day-specific variations or special requirements

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Project
        Root["Project Root"]
        
        subgraph TemplateSystem["Template System"]
            Template["Cookiecutter Template"]:::template
            DayTemplate["Day Template Structure"]:::template
            TemplateConfig["Template Config"]:::config
        end

        subgraph CommonPattern["Common Solution Pattern"]
            CoreLogic["Core Logic Module"]:::core
            PartOne["Part One Solution"]:::solution
            PartTwo["Part Two Solution"]:::solution
            TestFramework["Test Framework"]:::test
            InputData["Input Data (.gpg)"]:::data
            SampleData["Sample Data"]:::data
        end

        subgraph DailyImpl["Daily Implementations"]
            StandardDays["Standard Days"]:::implementation
            
            subgraph SpecialDays["Special Implementations"]
                GodotDay["Day 04 - Godot"]:::special
                DemoDay15["Day 15 - Demo"]:::special
                DemoDay16["Day 16 - Demo"]:::special
            end
        end
    end

    %% Relationships
    Template --> DayTemplate
    TemplateConfig --> Template
    DayTemplate --> StandardDays
    DayTemplate --> SpecialDays

    CoreLogic --> PartOne
    CoreLogic --> PartTwo
    TestFramework --> CoreLogic
    InputData --> CoreLogic
    SampleData --> TestFramework

    %% Click events
    click Template "https://github.com/euribates/advent_of_code_2024/tree/main/cookiecutter-aoc/day_{{cookiecutter.__num}}/"
    click TemplateConfig "https://github.com/euribates/advent_of_code_2024/blob/main/cookiecutter-aoc/cookiecutter.json"
    click CoreLogic "https://github.com/euribates/advent_of_code_2024/blob/main/day_*/core.py"
    click PartOne "https://github.com/euribates/advent_of_code_2024/blob/main/day_*/part_one.py"
    click PartTwo "https://github.com/euribates/advent_of_code_2024/blob/main/day_*/part_two.py"
    click TestFramework "https://github.com/euribates/advent_of_code_2024/blob/main/day_*/test_core.py"
    click InputData "https://github.com/euribates/advent_of_code_2024/blob/main/day_*/input.gpg"
    click SampleData "https://github.com/euribates/advent_of_code_2024/tree/main/day_*/sample"
    click GodotDay "https://github.com/euribates/advent_of_code_2024/tree/main/day_04/godot04/"
    click DemoDay15 "https://github.com/euribates/advent_of_code_2024/blob/main/day_15/demo.py"
    click DemoDay16 "https://github.com/euribates/advent_of_code_2024/blob/main/day_16/demo.py"

    %% Styling
    classDef template fill:#3498db
    classDef core fill:#2ecc71
    classDef solution fill:#27ae60
    classDef test fill:#f1c40f
    classDef data fill:#e67e22
    classDef config fill:#95a5a6
    classDef implementation fill:#34495e
    classDef special fill:#9b59b6

    %% Legend
    subgraph Legend
        L1["Template Components"]:::template
        L2["Core Logic"]:::core
        L3["Solutions"]:::solution
        L4["Testing"]:::test
        L5["Data Files"]:::data
        L6["Configuration"]:::config
        L7["Implementation"]:::implementation
        L8["Special Cases"]:::special
    end
```
