# florianmalsam/adventofcode2021 architecture

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

- Interactive diagram: https://gitdiagram.com/florianmalsam/adventofcode2021
- Repository: https://github.com/florianmalsam/adventofcode2021

## Overview

##### Project type and purpose
- This is a single-project C# console application whose sole purpose is to solve the Advent of Code 2021 puzzles.
- It reads puzzle inputs (from the Data folder), runs a solver for each day (in the Days folder), and prints results to the console.

##### File structure
- Top level:
- AdventOfCode.sln — Visual Studio solution
- AdventOfCode/AdventOfCode.csproj — C# project file
- README.md
- Under AdventOfCode/:
- Program.cs — application entry point and orchestrator
- Data/ — subfolders day4, day5, day6 containing raw puzzle input files
- Days/ — one solver class per day (DayFour.cs, DayFive.cs, DaySix.cs)
- No external services, no database, no web layer, no DI container—this is a simple monolith.

##### README for additional insights
- The README confirms it’s a code repo of solved puzzles.
- No further architectural commentary.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Project Definition
    subgraph "Project Definition"
        SLN["AdventOfCode.sln"]:::build
        CSPROJ["AdventOfCode/AdventOfCode.csproj"]:::build
        README["README.md"]:::doc
    end

    %% Orchestration
    ORCH["Console Host (Program.cs)"]:::orchestrator

    %% Input Components
    subgraph "Input Provider (Data Store)"
        D4["Data/day4"]:::input
        D5["Data/day5"]:::input
        D6["Data/day6"]:::input
    end

    %% Compute Components
    subgraph "Puzzle Solvers"
        SF4["DayFour Solver"]:::compute
        SF5["DayFive Solver"]:::compute
        SF6["DaySix Solver"]:::compute
    end

    %% Output Component
    OUT["Output Renderer (Console.WriteLine)"]:::output

    %% Flow
    D4 -->|"load input for Day 4"| ORCH
    D5 -->|"load input for Day 5"| ORCH
    D6 -->|"load input for Day 6"| ORCH

    ORCH -->|"invoke SolvePart1/Part2"| SF4
    ORCH -->|"invoke SolvePart1/Part2"| SF5
    ORCH -->|"invoke SolvePart1/Part2"| SF6

    SF4 -->|"return result"| ORCH
    SF5 -->|"return result"| ORCH
    SF6 -->|"return result"| ORCH

    ORCH -->|"print result"| OUT

    %% Click Events
    click ORCH "https://github.com/florianmalsam/adventofcode2021/blob/main/AdventOfCode/Program.cs"
    click D4 "https://github.com/florianmalsam/adventofcode2021/tree/main/AdventOfCode/Data/day4"
    click D5 "https://github.com/florianmalsam/adventofcode2021/tree/main/AdventOfCode/Data/day5"
    click D6 "https://github.com/florianmalsam/adventofcode2021/tree/main/AdventOfCode/Data/day6"
    click SF4 "https://github.com/florianmalsam/adventofcode2021/blob/main/AdventOfCode/Days/DayFour.cs"
    click SF5 "https://github.com/florianmalsam/adventofcode2021/blob/main/AdventOfCode/Days/DayFive.cs"
    click SF6 "https://github.com/florianmalsam/adventofcode2021/blob/main/AdventOfCode/Days/DaySix.cs"
    click CSPROJ "https://github.com/florianmalsam/adventofcode2021/blob/main/AdventOfCode/AdventOfCode.csproj"
    click SLN "https://github.com/florianmalsam/adventofcode2021/blob/main/AdventOfCode.sln"
    click README "https://github.com/florianmalsam/adventofcode2021/blob/main/README.md"

    %% Styles
    classDef build fill:#FFF0B3,stroke:#D4A017,stroke-width:1px;
    classDef doc fill:#F0F0F0,stroke:#888888,stroke-width:1px;
    classDef orchestrator fill:#FFE5CC,stroke:#FF9900,stroke-width:1px;
    classDef input fill:#CCE5FF,stroke:#3399FF,stroke-width:1px;
    classDef compute fill:#CCFFCC,stroke:#33CC33,stroke-width:1px;
    classDef output fill:#E0E0E0,stroke:#666666,stroke-width:1px;
```
