# frno10/advent-of-code-2020 architecture

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

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

## Overview

##### Main Components

a. Core Application Structure:
- An "Interface Layer" showing IDay.cs
- A "Day Implementation" container showing the pattern of individual day solutions
- A "Logging System" component for the Serilog implementation
- A "Utility Services" section for supporting components

b. Data Flow Components:
- Input data handlers (for .txt files)
- Output/logging streams
- Command-line argument processor

##### Relationship Representation

a. Primary Components (Use rectangles):
- ┌─────────────────┐
- Program Runner │
- ┘

- Day*.cs classes to IDay interface

- How input files (.txt) connect to their respective day implementations
- Demonstrate logging flow from components to Logger

##### Detailed Component Breakdown

Create sections for:

a. Core Runtime:
- Command-line argument processor
- Day resolver (IntToNameConverter)
- Feature switch handler (newFeatureSwitchSettings.json)

b. Challenge Implementation:
- IDay interface
- Day-XX implementations
- Associated data files

c. Logging Infrastructure:
- Logger component
- Log level configuration
- Output streams

##### Specific Implementation Details

Key relationships:
- Program.cs → IDay (interface implementation)
- IDay → Day[N].cs (concrete implementations)
- Day[N].cs → Day[N]Data.txt (data consumption)
- All components → Logger.cs (logging flow)

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Core
        PR["Program Runner"]
        IL["Interface Layer"]
        DR["Day Resolver"]
        FSH["Feature Switch Handler"]
    end

    subgraph DayImplementations
        D1["Day One"]
        D2["Day Two"]
        D3["Day Three"]
        D4["Day Four"]
        D5["Day Five"]
        D6["Day Six"]
        D7["Day Seven"]
        D8["Day Eight"]
        D9["Day Nine"]
        D10["Day Ten"]
        D99["Day Ninety Nine"]
    end

    subgraph DataFiles
        DF1["Day One Data"]
        DF2["Day Two Data"]
        DF3["Day Three Data"]
        DF4["Day Four Data"]
        DF5["Day Five Data"]
        DF6["Day Six Data"]
        DF7["Day Seven Data"]
        DF8["Day Eight Data"]
        DF9["Day Nine Data"]
        DF10["Day Ten Data"]
        DF99["Day Ninety Nine Data"]
    end

    subgraph Logging
        L["Logger"]
    end

    %% Core relationships
    PR --> IL
    PR --> DR
    PR --> FSH
    PR --> L

    %% Day implementations to interface
    IL --> D1
    IL --> D2
    IL --> D3
    IL --> D4
    IL --> D5
    IL --> D6
    IL --> D7
    IL --> D8
    IL --> D9
    IL --> D10
    IL --> D99

    %% Data file relationships
    DF1 -.-> D1
    DF2 -.-> D2
    DF3 -.-> D3
    DF4 -.-> D4
    DF5 -.-> D5
    DF6 -.-> D6
    DF7 -.-> D7
    DF8 -.-> D8
    DF9 -.-> D9
    DF10 -.-> D10
    DF99 -.-> D99

    %% Logging relationships
    D1 -.-> L
    D2 -.-> L
    D3 -.-> L
    D4 -.-> L
    D5 -.-> L
    D6 -.-> L
    D7 -.-> L
    D8 -.-> L
    D9 -.-> L
    D10 -.-> L
    D99 -.-> L

    %% Click events
    click PR "https://github.com/frno10/Advent-of-Code-2020/blob/master/Program.cs"
    click IL "https://github.com/frno10/Advent-of-Code-2020/blob/master/IDay.cs"
    click DR "https://github.com/frno10/Advent-of-Code-2020/blob/master/IntToNameConverter.cs"
    click FSH "https://github.com/frno10/Advent-of-Code-2020/blob/master/newFeatureSwitchSettings.json"
    click L "https://github.com/frno10/Advent-of-Code-2020/blob/master/Logger.cs"
    click D1 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-01/DayOne.cs"
    click D2 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-02/DayTwo.cs"
    click D3 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-03/DayThree.cs"
    click D4 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-04/DayFour.cs"
    click D5 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-05/DayFive.cs"
    click D6 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-06/DaySix.cs"
    click D7 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-07/DaySeven.cs"
    click D8 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-08/DayEight.cs"
    click D9 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-09/DayNine.cs"
    click D10 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-10/DayTen.cs"
    click D99 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-99/DayNinetyNine.cs"
    click DF1 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-01/DayOneData.txt"
    click DF2 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-02/DayTwoData.txt"
    click DF3 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-03/DayThreeData.txt"
    click DF4 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-04/DayFourData.txt"
    click DF5 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-05/DayFiveData.txt"
    click DF6 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-06/DaySixData.txt"
    click DF7 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-07/DaySevenData.txt"
    click DF8 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-08/DayEightData.txt"
    click DF9 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-09/DayNineData.txt"
    click DF10 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-10/DayTenData.txt"
    click DF99 "https://github.com/frno10/Advent-of-Code-2020/blob/master/Day-99/DayNinetyNineData.txt"

    classDef core fill:#2374ab
    classDef implementation fill:#48a9a6
    classDef data fill:#e4cc37
    classDef logging fill:#9b6b9e
    
    class PR,IL,DR,FSH core
    class D1,D2,D3,D4,D5,D6,D7,D8,D9,D10,D99 implementation
    class DF1,DF2,DF3,DF4,DF5,DF6,DF7,DF8,DF9,DF10,DF99 data
    class L logging
```
