# dottox/lab-pavz-2025 architecture

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

- Interactive diagram: https://gitdiagram.com/dottox/lab-pavz-2025
- Repository: https://github.com/dottox/lab-pavz-2025

## Overview

##### Project Type and Purpose
- This is a C++ lab project for advanced programming. Its primary purpose is educational: to create, test, and validate small functionalities, including compiling and automated testing integrations.
- The README emphasizes branch management for new functionalities and testing, while the file tree shows a “lab-1” directory containing the exercise’s source files (e.g., main.cpp, Lab 1.pdf) and a dedicated testing subfolder with test.cpp and a makefile.
- Additionally, the project integrates CI workflows (located under .github/workflows) to automatically run tests on branch pushes.

##### Main Components to be Represented
a. Lab Module:
- "lab-1" directory: Contains the main source code (main.cpp) and related documentation (Lab 1.pdf).
b. Testing Module:
- "lab-1/testing": Includes the testing code (test.cpp) and a makefile to compile tests. This is a crucial part because the lab guidelines detail how tests must be written and updated.
c. Continuous Integration Infrastructure:
- ".github/workflows": Contains CI definitions (e.g., check-branch.yml, testing-cpp.yml) that automatically compile and run tests.
d. Version Control & Collaboration:
- Implicit from the README and branch instructions—branches represent functionalities and testing aspects. This isn’t a runtime component, but it’s important to show how development flows (e.g., working locally, pushing to remote, and triggering CI).

##### Relationships and Interactions
- The Lab Module (source code) is developed independently, but each change is coupled with appropriate tests in the Testing Module.
- When new code is pushed to a feature branch, the CI workflows in the .github folder are triggered, compiling both main and test code via the provided makefile.
- The testing code interacts with the main code indirectly through the makefile, ensuring that all new functionalities are validated.

##### Architectural Patterns and Design Principles
- Although this is a relatively straightforward lab project, it applies separation of concerns: clear distinction between application logic (lab-1/main.cpp) and testing (lab-1/testing).
- The workflow orchestration through GitHub Actions reflects CI/CD principles, ensuring quality assurance prior to merging changes.
- The branch and commit practices mentioned in the README imply a structured, modular approach to extending and testing functionality.

## Diagram (Mermaid)

```mermaid
graph TD
    subgraph "Development"
        Developer["Developer"]:::developer
        Feature["Feature Branch"]:::branch
        Developer -->|"commits"| Feature
    end

    subgraph "Lab Module (Source Code)"
        MainApp["Main Application"]:::code
        Doc["Documentation"]:::doc
        MainApp --- Doc
    end

    subgraph "Testing Module (lab-1/testing)"
        TestDir["Testing Directory"]:::test
        TestCode["Test Code (test.cpp)"]:::file
        Makefile["Makefile"]:::file
        TestDir --> TestCode
        TestDir --> Makefile
    end

    subgraph "CI/CD"
        CI["CI Workflows"]:::ci
    end

    subgraph "Build & Test Process"
        Build["Build & Test (via makefile)"]:::build
    end

    Feature -->|"push_triggers"| CI
    CI -->|"initiates"| Build
    Build -->|"compiles"| MainApp
    Build -->|"runs_tests"| TestDir
    CI -->|"feedback"| Developer

    click MainApp "https://github.com/dottox/lab-pavz-2025/blob/main/lab-1/main.cpp"
    click Doc "https://github.com/dottox/lab-pavz-2025/blob/main/lab-1/Lab 1.pdf"
    click TestDir "https://github.com/dottox/lab-pavz-2025/tree/main/lab-1/testing"
    click TestCode "https://github.com/dottox/lab-pavz-2025/blob/main/lab-1/testing/test.cpp"
    click Makefile "https://github.com/dottox/lab-pavz-2025/tree/main/lab-1/testing/makefile"
    click CI "https://github.com/dottox/lab-pavz-2025/tree/main/.github/workflows"

    classDef developer fill:#ffe6e6,stroke:#cc0000,stroke-width:2px;
    classDef branch fill:#e6ffe6,stroke:#008000,stroke-width:2px;
    classDef code fill:#e6f7ff,stroke:#0077b6,stroke-width:2px;
    classDef doc fill:#e0e0ff,stroke:#4444aa,stroke-width:2px;
    classDef test fill:#fce4ec,stroke:#d81b60,stroke-width:2px;
    classDef file fill:#fff0f5,stroke:#c71585,stroke-width:2px;
    classDef ci fill:#fff9c4,stroke:#fbc02d,stroke-width:2px;
    classDef build fill:#e8f5e9,stroke:#43a047,stroke-width:2px;
```
