# ahmedkhaleel2004/advent-of-code architecture

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

- Interactive diagram: https://gitdiagram.com/ahmedkhaleel2004/advent-of-code
- Repository: https://github.com/ahmedkhaleel2004/advent-of-code

## Overview

##### Project Type and Purpose
- This repository is a personal tracking/logging project where each day’s Advent of Code challenge is solved separately.
- The README tells us the purpose is "Tracking my progress through the Advent of Code", so the focus is on modular daily challenges.

##### File Structure
- Top-Level Components:
- Two main directories representing challenge years: “2023” and “2024”.
- Each of these contains subdirectories for individual days (e.g., “Day 1”, “Day 2”, etc.).
- Inside each day’s folder you typically have an input file (e.g., input.txt or in.txt) and a solution script (main.py or solution.py). In the 2024 folders, some challenges also include a test file (test.txt) indicating testing support.
- Additional Files:
- A README.md file gives project context.
- runscript.ps1, which may be used to execute or orchestrate the solutions.

##### Main Components
- Repository Level: “Advent of Code Repo”
- Contains metadata (README.md) and utility scripts (runscript.ps1).
- Year Directories:
- “2023” Directory: Contains Day X folders each with input.txt and main.py.
- “2024” Directory: Contains Day X folders each with in.txt, solution.py, and some with test.txt.
- Individual Day Folders (Modules):
- Each day is self-contained and represents a module. They follow a similar structure:
- Input Data File: Provides the problem input.
- Code File: Implements the challenge solution.
- (Optional) Test File: For validating the solution in some cases.

b. Within this, branch out into two primary nodes labeled “2023” and “2024”.
c. Under each year node, represent several child nodes for each “Day X” folder.
d. Inside each “Day X” node, indicate the individual files (Input Data, Code File, and where available, Test File).
e. Runscript.ps1 as an entry or management utility that might interface with multiple day solutions.

##### Architectural Patterns and Design Principles
- Modularity: Each day’s challenge is an independent module with separate input and processing; illustrate this isolation.
- Consistency and Extensibility: Although file naming changes slightly between years (main.py vs solution.py, input.txt vs in.txt), the conceptual pattern remains, suggesting that similar architectural patterns are reused across modules.
- Simple I/O Flow: Data is read from input files, processed by a solution script, and results are produced (perhaps printed to standard output or otherwise validated via test files).

## Diagram (Mermaid)

```mermaid
graph TD
    Advent["Advent of Code Repo"]:::repo
    Metadata["README.md"]:::file
    Utility["runscript.ps1"]:::file

    Advent --> Metadata
    Advent --> Utility

    D2023_directory["2023"]:::directory
    D2024_directory["2024"]:::directory

    Advent --> D2023_directory
    Advent --> D2024_directory

    subgraph "2023 Challenges"
        D1_2023["Day 1"]:::module
        D1_2023_input["input.txt"]:::file
        D1_2023_main["main.py"]:::file
        D2023_directory --> D1_2023
        D1_2023 --> D1_2023_input
        D1_2023_input --> D1_2023_main
    end

    subgraph "2024 Challenges"
        D1_2024["Day 1"]:::module
        D1_2024_in["in.txt"]:::file
        D1_2024_sol["solution.py"]:::file
        D2024_directory --> D1_2024
        D1_2024 --> D1_2024_in
        D1_2024_in --> D1_2024_sol

        D2_2024["Day 2"]:::module
        D2_2024_in["in.txt"]:::file
        D2_2024_sol["solution.py"]:::file
        D2_2024_test["test.txt"]:::file
        D2024_directory --> D2_2024
        D2_2024 --> D2_2024_in
        D2_2024_in --> D2_2024_sol
        D2_2024_sol --> D2_2024_test
    end

    Utility --> D1_2023
    Utility --> D1_2024
    Utility --> D2_2024

    classDef repo fill:#ffcc00,stroke:#333,stroke-width:2px;
    classDef directory fill:#ccccff,stroke:#333,stroke-width:2px;
    classDef module fill:#ccffcc,stroke:#333,stroke-width:2px;
    classDef file fill:#ffcccc,stroke:#333,stroke-width:2px;

click Metadata "https://github.com/ahmedkhaleel2004/advent-of-code/blob/main/README.md"
click Utility "https://github.com/ahmedkhaleel2004/advent-of-code/blob/main/runscript.ps1"
click D2023_directory "https://github.com/ahmedkhaleel2004/advent-of-code/tree/main/2023"
click D2024_directory "https://github.com/ahmedkhaleel2004/advent-of-code/tree/main/2024"
click D1_2023_input "https://github.com/ahmedkhaleel2004/advent-of-code/blob/main/2023/Day 1/input.txt"
click D1_2023_main "https://github.com/ahmedkhaleel2004/advent-of-code/blob/main/2023/Day 1/main.py"
click D1_2024_in "https://github.com/ahmedkhaleel2004/advent-of-code/blob/main/2024/Day 1/in.txt"
click D1_2024_sol "https://github.com/ahmedkhaleel2004/advent-of-code/blob/main/2024/Day 1/solution.py"
click D2_2024_in "https://github.com/ahmedkhaleel2004/advent-of-code/blob/main/2024/Day 2/in.txt"
click D2_2024_sol "https://github.com/ahmedkhaleel2004/advent-of-code/blob/main/2024/Day 2/solution.py"
click D2_2024_test "https://github.com/ahmedkhaleel2004/advent-of-code/blob/main/2024/Day 2/test.txt"
```
