# briancheldelin/go-advent-of-code architecture

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

## Overview

##### Main Components

a. Core Structure:
- Daily Challenge Modules (day1 through day6)
- Utility Package
- Grid Package
- GUI Package

##### Specific Implementation Details

a. Component Representation:
- Use rectangles for each day's solution module (Day 1-6)
- Use hexagons for utility packages
- Use rounded rectangles for the Grid and GUI packages

b. Layout Structure:
**[Main Project Container]**
- [Daily Challenges]
- [Day 1] → main.go, tests
- [Day 2] → main.go, tests
- [Day 3] → main.go, tests
- [Day 4] → main.go, gui.go, tests
- [Day 5] → main.go, tests
- [Day 6] → main.go, tests

- [Utility Layer]
- [Core Utilities]
- [Grid Package]
- [GUI Package]

- Bidirectional relationships where appropriate (especially for GUI interactions)

##### Additional Elements
- Version control elements (.gitignore, LICENSE)
- Development container configuration (.devcontainer)

##### Notes
- Keep the focus on the modular structure of the solutions
- Reusable utility components
- How the project maintains separation of concerns while sharing common utilities
- Test coverage representation for quality assurance

Remember to maintain a balance between showing the independent nature of each day's solution and their connections to the shared utility code. This will help developers understand both the overall architecture and how to add new daily solutions effectively.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Project["Go Advent of Code Project"]
        subgraph DailyChallenges["Daily Challenge Modules"]
            Day1["Day 1"]:::daily
            Day2["Day 2"]:::daily
            Day3["Day 3"]:::daily
            Day4["Day 4"]:::daily
            Day5["Day 5"]:::daily
            Day6["Day 6"]:::daily
        end

        subgraph UtilityLayer["Utility Layer"]
            CoreUtils["Core Utilities"]:::utility
            GridPkg["Grid Package"]:::specialized
            GUIPkg["GUI Package"]:::specialized
        end

        subgraph Config["Project Configuration"]
            DevContainer[".devcontainer"]:::config
            GitIgnore[".gitignore"]:::config
            License["LICENSE"]:::config
            ReadMe["README.md"]:::config
            GoMod["go.mod"]:::config
        end

        subgraph Testing["Test Components"]
            GridTest["Grid Tests"]:::test
            GUITest["GUI Tests"]:::test
            Day1Test["Day 1 Tests"]:::test
            Day2Test["Day 2 Tests"]:::test
            Day3Test["Day 3 Tests"]:::test
            Day5Test["Day 5 Tests"]:::test
            Day6Test["Day 6 Tests"]:::test
        end
    end

    %% Relationships
    Day1 --> CoreUtils
    Day2 --> CoreUtils
    Day3 --> CoreUtils
    Day4 --> CoreUtils
    Day5 --> CoreUtils
    Day6 --> CoreUtils

    Day4 --> GUIPkg
    
    CoreUtils --> GridPkg
    CoreUtils --> GUIPkg

    %% Test Relationships
    GridTest -.-> GridPkg
    GUITest -.-> GUIPkg
    Day1Test -.-> Day1
    Day2Test -.-> Day2
    Day3Test -.-> Day3
    Day5Test -.-> Day5
    Day6Test -.-> Day6

    %% Click Events
    click Day1 "https://github.com/briancheldelin/go-advent-of-code/tree/main/aoc24/day1/"
    click Day2 "https://github.com/briancheldelin/go-advent-of-code/tree/main/aoc24/day2/"
    click Day3 "https://github.com/briancheldelin/go-advent-of-code/tree/main/aoc24/day3/"
    click Day4 "https://github.com/briancheldelin/go-advent-of-code/tree/main/aoc24/day4/"
    click Day5 "https://github.com/briancheldelin/go-advent-of-code/tree/main/aoc24/day5/"
    click Day6 "https://github.com/briancheldelin/go-advent-of-code/tree/main/aoc24/day6/"
    click CoreUtils "https://github.com/briancheldelin/go-advent-of-code/blob/main/aoc24/utility/utility.go"
    click GridPkg "https://github.com/briancheldelin/go-advent-of-code/blob/main/aoc24/utility/grid/grid.go"
    click GUIPkg "https://github.com/briancheldelin/go-advent-of-code/blob/main/aoc24/utility/gui/gui.go"
    click DevContainer "https://github.com/briancheldelin/go-advent-of-code/blob/main/.devcontainer/devcontainer.json"
    click GitIgnore "https://github.com/briancheldelin/go-advent-of-code/blob/main/.gitignore"
    click License "https://github.com/briancheldelin/go-advent-of-code/tree/main/LICENSE"
    click ReadMe "https://github.com/briancheldelin/go-advent-of-code/blob/main/README.md"
    click GoMod "https://github.com/briancheldelin/go-advent-of-code/blob/main/aoc24/go.mod"
    click GridTest "https://github.com/briancheldelin/go-advent-of-code/blob/main/aoc24/utility/grid/grid_test.go"
    click GUITest "https://github.com/briancheldelin/go-advent-of-code/blob/main/aoc24/utility/gui/gui_test.go"
    click Day1Test "https://github.com/briancheldelin/go-advent-of-code/blob/main/aoc24/day1/main_test.go"
    click Day2Test "https://github.com/briancheldelin/go-advent-of-code/blob/main/aoc24/day2/main_test.go"
    click Day3Test "https://github.com/briancheldelin/go-advent-of-code/blob/main/aoc24/day3/main_test.go"
    click Day5Test "https://github.com/briancheldelin/go-advent-of-code/blob/main/aoc24/day5/main_test.go"
    click Day6Test "https://github.com/briancheldelin/go-advent-of-code/blob/main/aoc24/day6/main_test.go"

    %% Styling
    classDef daily fill:#3498db,stroke:#2980b9,color:white
    classDef utility fill:#2ecc71,stroke:#27ae60,color:white
    classDef specialized fill:#e67e22,stroke:#d35400,color:white
    classDef test fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef config fill:#34495e,stroke:#2c3e50,color:white

    %% Legend
    subgraph Legend
        L1["Daily Challenge"]:::daily
        L2["Utility Package"]:::utility
        L3["Specialized Package"]:::specialized
        L4["Test Component"]:::test
        L5["Configuration"]:::config
    end
```
