# adityachandak287/aoc-2024 architecture

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

- Interactive diagram: https://gitdiagram.com/adityachandak287/aoc-2024
- Repository: https://github.com/adityachandak287/aoc-2024

## Overview

##### Main Components

a) Solution Structure Layer
- Day's solution as a separate module
- Language separation (Python vs. Go solutions)
- Input handling components

b) Common Patterns Layer
- Input file processors
- Test case handlers (sample files)
- Part A/B solution splits

**Top Level:**
**┌─────────────────────────────────────────┐**
- AOC 2024 Solutions            │
- ┘
- ↙               ↘
**┌─────────────┐     ┌─────────────┐**
- Python    │     │     Go      │
- Solutions  │     │  Solutions  │
- ┘     └─────────────┘

##### Component Representation

- Rounded rectangles for solution files
- Hexagons for input/sample files

##### Detailed Structure

For each day's solution, show:
**┌─────────── Day XX ───────────┐**

- ┌─────────┐    ┌─────────┐ │
- Part A  │    │ Part B  │ │
- ┘    └─────────┘ │
- ↓           ↓       │
- ┌─────────────────┐      │
- Input Handler │      │
- ┘      │
- ↙        ↘          │
- ┌─────────┐  ┌─────────┐  │
- Input  │  │ Sample  │  │
- ┘  └─────────┘  │
- ┘

**┌─────── Day 06 ─────┐**
- ┌─────────┐    │
- main.go │    │
- ┬────┘    │
- ↓         │
- ┌───────────────┐ │
- solution package│ │
- ┘ │
- ┘

##### Additional Elements

- A version/language indicator (Go modules from go.mod)
- Separation between different days clearly
- Dual-part nature of AOC problems (Part A/B)

##### Implementation Notes

- Maintain consistent spacing and alignment
- Use clear, readable fonts and appropriate sizing

- The modular nature of daily solutions
- The multi-language approach
- The consistent pattern of input handling
- The separation between solution logic and input processing
- The relationship between sample files and solution files

This structure will help other developers understand the organization and flow of the AOC solutions while maintaining clarity about the different implementation approaches used across days.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph AOC["AOC 2024 Solutions"]
        direction TB
        
        subgraph PY["Python Solutions"]
            direction TB
            Day01PY["Day 01"]
            Day03PY["Day 03"]
            Day07PY["Day 07"]
        end

        subgraph GO["Go Solutions"]
            direction TB
            Day04GO["Day 04"]
            Day05GO["Day 05"]
            Day06GO["Day 06"]
        end

        subgraph Day01["Day 01 Structure"]
            direction TB
            D1A["Part A"]:::python
            D1B["Part B"]:::python
            D1Input[("Input")]:::input
            D1Sample[("Sample")]:::sample
            D1A & D1B --> D1Input & D1Sample
        end

        subgraph Day03["Day 03 Structure"]
            direction TB
            D3A["Part A"]:::python
            D3B["Part B"]:::python
            D3Input[("Input")]:::input
            D3SampleA[("Sample A")]:::sample
            D3SampleB[("Sample B")]:::sample
            D3A & D3B --> D3Input & D3SampleA & D3SampleB
        end

        subgraph Day04["Day 04 Structure"]
            direction TB
            D4Main["main.go"]:::go
            D4Input[("Input")]:::input
            D4Sample[("Sample")]:::sample
            D4Main --> D4Input & D4Sample
        end

        subgraph Day05["Day 05 Structure"]
            direction TB
            D5Main["main.go"]:::go
            D5Input[("Input")]:::input
            D5Sample[("Sample")]:::sample
            D5Main --> D5Input & D5Sample
        end

        subgraph Day06["Day 06 Structure"]
            direction TB
            D6Main["main.go"]:::go
            D6Solution["solution package"]:::go
            D6Input[("Input")]:::input
            D6Sample[("Sample")]:::sample
            D6Main --> D6Solution
            D6Solution --> D6Input & D6Sample
        end

        subgraph Day07["Day 07 Structure"]
            direction TB
            D7Solution["solution.py"]:::python
            D7Input[("Input")]:::input
            D7Sample[("Sample")]:::sample
            D7Solution --> D7Input & D7Sample
        end

        Day01PY --> Day01
        Day03PY --> Day03
        Day04GO --> Day04
        Day05GO --> Day05
        Day06GO --> Day06
        Day07PY --> Day07

        Config["Project Config"]:::config
    end

    %% Click events for file navigation
    click D1A "https://github.com/adityachandak287/aoc-2024/blob/main/day-01/a.py"
    click D1B "https://github.com/adityachandak287/aoc-2024/blob/main/day-01/b.py"
    click D1Input "https://github.com/adityachandak287/aoc-2024/blob/main/day-01/input.txt"
    click D1Sample "https://github.com/adityachandak287/aoc-2024/blob/main/day-01/sample.txt"
    
    click D3A "https://github.com/adityachandak287/aoc-2024/blob/main/day-03/a.py"
    click D3B "https://github.com/adityachandak287/aoc-2024/blob/main/day-03/b.py"
    click D3Input "https://github.com/adityachandak287/aoc-2024/blob/main/day-03/input.txt"
    click D3SampleA "https://github.com/adityachandak287/aoc-2024/blob/main/day-03/sample-a.txt"
    click D3SampleB "https://github.com/adityachandak287/aoc-2024/blob/main/day-03/sample-b.txt"
    
    click D4Main "https://github.com/adityachandak287/aoc-2024/blob/main/day-04/main.go"
    click D4Input "https://github.com/adityachandak287/aoc-2024/blob/main/day-04/input.txt"
    click D4Sample "https://github.com/adityachandak287/aoc-2024/blob/main/day-04/sample.txt"
    
    click D5Main "https://github.com/adityachandak287/aoc-2024/blob/main/day-05/main.go"
    click D5Input "https://github.com/adityachandak287/aoc-2024/blob/main/day-05/input.txt"
    click D5Sample "https://github.com/adityachandak287/aoc-2024/blob/main/day-05/sample.txt"
    
    click D6Main "https://github.com/adityachandak287/aoc-2024/blob/main/day-06/main.go"
    click D6Solution "https://github.com/adityachandak287/aoc-2024/blob/main/day-06/solution/solution.go"
    click D6Input "https://github.com/adityachandak287/aoc-2024/blob/main/day-06/input.txt"
    click D6Sample "https://github.com/adityachandak287/aoc-2024/blob/main/day-06/sample.txt"
    
    click D7Solution "https://github.com/adityachandak287/aoc-2024/blob/main/day-07/solution.py"
    click D7Input "https://github.com/adityachandak287/aoc-2024/blob/main/day-07/input.txt"
    click D7Sample "https://github.com/adityachandak287/aoc-2024/blob/main/day-07/sample.txt"
    
    click Config "https://github.com/adityachandak287/aoc-2024/blob/main/go.mod"

    %% Styling
    classDef python fill:#3776AB,color:white
    classDef go fill:#00ADD8,color:white
    classDef input fill:#FFA500,color:black
    classDef sample fill:#98FB98,color:black
    classDef config fill:#808080,color:white
```
