# jaskejaske1/c-fundamentals architecture

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

- Interactive diagram: https://gitdiagram.com/jaskejaske1/c-fundamentals
- Repository: https://github.com/jaskejaske1/c-fundamentals

## Overview

##### Project Type and Purpose
- This is an **educational/portfolio repository** containing C exercises for a “C Programming Fundamentals” course.
- It is **not** a multi-tier web app or microservice; rather, it’s a **monorepo** of Visual Studio solutions and matching Linux C source trees, plus CI build scripts.

##### File Structure Analysis
- Top-level:
- `.github/workflows/` → GitHub Actions CI configurations (windows build, linux build, msbuild).
- `C_Fundamentals_Exercises/` → Windows Visual Studio solution (`.sln`) with many C projects (`.vcxproj`).
- `C_Fundamentals_Exercises_linux/` → Mirror of exercises as raw `.c` files for Linux.
- `Les_<date>/` and `Lessen_week_<date>/` → Additional dated lesson solutions (.sln + projects).
- `LightingProgram/` → A separate solution (possibly demo or test).
- `README.md`, `.gitignore`, export scripts, etc.
- Pattern: **monorepo** segmented by course sections, with **per-exercise** project folders.

##### README Insights
- Confirms it’s **portfolio and study material**.
- Mentions **no license** (usage constraints).
- Notes that each Visual Studio solution maps to a course part.

##### Main Components
a. **Version Control System (VCS)**
- Git on GitHub (monorepo)
b. **Continuous Integration (CI) Layer**
- GitHub Actions workflows:
- Windows build (`msbuild.yml`)
- Linux build (`build.yml`)
c. **Code Modules**
- Solutions (.sln) as containers:
- `C_Fundamentals_Exercises`
- `C_Fundamentals_Exercises_linux`
- `Les_<date>`, `LightingProgram`, etc.
- Inside each solution: multiple **C project folders** with `.vcxproj` or `.c` files.
d. **Build Toolchains**
- Windows: MSBuild / Visual Studio compiler
- Linux: gcc (or make via CI script)
e. **Artifacts**
- Executables per exercise
f. **Supporting Scripts**
- `Export-OefeningenLinux.ps1`

##### Relationships and Data Flow
- **Developer → GitHub Repo** : push commits.
- **GitHub Actions** triggers on push/PR:
- Windows CI job checks out code → runs MSBuild on each solution → publishes success/failure.
- Linux CI job checks out code → compiles `.c` files in `C_Fundamentals_Exercises_linux` → publishes results.
- **Artifacts** (optional) could be stored or simply tested.

##### Architectural Patterns and Principles
- **Monorepo**: single repository hosting all course content.
- **Separation by Platform**: Windows VS solutions vs raw Linux C source.
- **Modularity**: each exercise isolated in its own project/folder.
- **CI as Code**: workflows defined declaratively in `.github/workflows`.

2. Inside, place sub-containers:
– “C Fundamentals VS Solutions”
– “C Fundamentals Linux Exercises”
– “Lessons by Date”
– “LightingProgram”
5. Finally, from build tools to “Compiled Binaries / Test Results.”

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Actors and Infra
    Dev((Developer)):::actor
    Repo["GitHub Repository"]:::infra
    Dev -->|"push commits"| Repo

    %% CI Pipelines
    WinCI["Windows CI Pipeline\n(msbuild.yml)"]:::infra
    LinCI["Linux CI Pipeline\n(build.yml)"]:::infra
    Repo -->|"trigger on push/PR"| WinCI
    Repo -->|"trigger on push/PR"| LinCI

    %% Build Toolchains
    MSBuild["MSBuild / VS Compiler"]:::windows
    GCC["gcc (Linux)"]:::linux
    WinCI -->|"runs MSBuild"| MSBuild
    LinCI -->|"runs gcc"| GCC

    %% Artifacts
    Artifacts["Compiled Binaries /\nTest Results"]:::artifact
    MSBuild -->|"produces executables"| Artifacts
    GCC -->|"produces executables"| Artifacts

    %% Repository Contents
    subgraph "Monorepo Contents"
        direction TB
        subgraph "Windows VS Solutions"
            direction TB
            CFVS["C_Fundamentals_Exercises.sln"]:::windows
        end
        subgraph "Linux C Exercises"
            direction TB
            CFLinux["C_Fundamentals_Exercises_linux"]:::linux
        end
        subgraph "Lesson Solutions"
            direction TB
            Les2025_09_22["Les_2025_09_22.sln"]:::windows
            Les2025_09_29["Les_2025_09_29.sln"]:::windows
            Les2025_09_30["Les_2025_09_30.sln"]:::windows
            Les2025_10_06["Les_2025_10_06.sln"]:::windows
            Les2025_10_07["Les_2025_10_07.sln"]:::windows
            Les2025_10_13["Les_2025_10_13.sln"]:::windows
            LessenWeek2025_10_20["Lessen_week_2025_10_20.sln"]:::windows
        end
        Lighting["LightingProgram.sln"]:::windows
        ExportScript["Export-OefeningenLinux.ps1"]:::infra
        WorkflowsDir[".github/workflows/"]:::infra
    end

    Repo --> Monorepo

    %% Click Events
    click Repo "https://github.com/jaskejaske1/c-fundamentals/tree/main//"
    click WinCI "https://github.com/jaskejaske1/c-fundamentals/blob/main/.github/workflows/msbuild.yml.bak"
    click LinCI "https://github.com/jaskejaske1/c-fundamentals/blob/main/.github/workflows/build.yml"
    click CFVS "https://github.com/jaskejaske1/c-fundamentals/blob/main/C_Fundamentals_Exercises/C_Fundamentals_Exercises.sln"
    click CFLinux "https://github.com/jaskejaske1/c-fundamentals/tree/main/C_Fundamentals_Exercises_linux/"
    click Les2025_09_22 "https://github.com/jaskejaske1/c-fundamentals/blob/main/Les_2025_09_22/Les_2025_09_22.sln"
    click Les2025_09_29 "https://github.com/jaskejaske1/c-fundamentals/blob/main/Les_2025_09_29/Les_2025_09_29.sln"
    click Les2025_09_30 "https://github.com/jaskejaske1/c-fundamentals/blob/main/Les_2025_09_30/Les_2025_09_30.sln"
    click Les2025_10_06 "https://github.com/jaskejaske1/c-fundamentals/blob/main/Les_2025_10_06/Les_2025_10_06.sln"
    click Les2025_10_07 "https://github.com/jaskejaske1/c-fundamentals/blob/main/Les_2025_10_07/Les_2025_10_07.sln"
    click Les2025_10_13 "https://github.com/jaskejaske1/c-fundamentals/blob/main/Les_2025_10_13/Les_2025_10_13.sln"
    click LessenWeek2025_10_20 "https://github.com/jaskejaske1/c-fundamentals/blob/main/Lessen_week_2025_10_20/Lessen_week_2025_10_20.sln"
    click Lighting "https://github.com/jaskejaske1/c-fundamentals/blob/main/LightingProgram/LightingProgram.sln"
    click ExportScript "https://github.com/jaskejaske1/c-fundamentals/blob/main/Export-OefeningenLinux.ps1"
    click WorkflowsDir "https://github.com/jaskejaske1/c-fundamentals/tree/main/.github/workflows/"

    %% Styles
    classDef actor fill:#f9f,stroke:#333,stroke-width:1px,shape:circle;
    classDef infra fill:#ddd,stroke:#555,stroke-width:1px;
    classDef windows fill:#bbdefb,stroke:#1e88e5,stroke-width:1px;
    classDef linux fill:#c8e6c9,stroke:#2e7d32,stroke-width:1px;
    classDef artifact fill:#ffe0b2,stroke:#ef6c00,stroke-width:1px;
```
