# maximvill/programming-languages architecture

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

- Interactive diagram: https://gitdiagram.com/maximvill/programming-languages
- Repository: https://github.com/maximvill/programming-languages

## Overview

##### Project Type and Purpose
- This is a simple Java console‐application (“Лабораторная работа” for a programming languages course).
- It contains a single entry point (src/Main.java) and a minimal build/CI configuration.

##### File Structure Analysis
- Top-level:
- .github/workflows – CI pipelines (build.yml, main.yml)
- sonar-project.properties – SonarQube analysis settings
- README.md – high-level project description
- src/Main.java – application entry point
- There are no frontend or separate backend modules; it’s pure Java code packaged and executed on the JVM.

##### Key Components to Display
a. Source Code
- Directory: src/Main.java
- Represents the main Java application logic.
b. Build System / CI Pipelines
- GitHub Actions workflows (.github/workflows/*.yml)
- Responsible for compilation, testing, packaging.
c. Code Quality Analysis
- SonarQube (configured via sonar-project.properties)
- Scans code, reports metrics.
d. Runtime
- Java Virtual Machine (JVM) where Main.java executes.
e. External Systems (optional)
- GitHub repository as the code host
- SonarQube server where analysis results are published

##### Relationships and Data Flows
- Developer pushes code → triggers GitHub Actions.
- Build job: checks out code → compiles with javac → runs any tests.
- On successful build:
- Artifacts can be archived (if configured).
- SonarQube analysis job connects to Sonar server using sonar-project.properties.
- If all checks pass, the jar (or class files) can be deployed or made available for execution on a JVM.

##### Architectural Patterns / Design Principles
- Single‐module CLI application.
- CI/CD pipeline enforced by GitHub Actions.
- Continuous code quality monitoring via SonarQube.

## Diagram (Mermaid)

```mermaid
flowchart TD
    Developer["Developer"]:::external
    GitHubRepo["GitHub Repo"]:::external

    subgraph "Repository (Source Code)"
        SourceREADME["README.md"]:::code
        SourceMain["src/Main.java"]:::code
        SonarProp["sonar-project.properties"]:::code
    end

    subgraph "CI/CD Pipeline"
        CI_DIR[".github/workflows/"]:::ci
        CI_Build["build.yml"]:::ci
        CI_Main["main.yml"]:::ci
    end

    JVM["JVM Execution"]:::runtime
    Sonar["SonarQube Server"]:::external

    Developer -->|"push code"| GitHubRepo
    GitHubRepo -->|"source"| SourceREADME
    GitHubRepo -->|"source"| SourceMain
    GitHubRepo -->|"config"| SonarProp

    GitHubRepo -->|"triggers build/test"| CI_DIR
    CI_DIR -->|"includes"| CI_Build
    CI_DIR -->|"includes"| CI_Main

    CI_DIR -->|"compile & test"| JVM
    CI_DIR -->|"analyze code"| Sonar

    click SourceREADME "https://github.com/maximvill/programming-languages/blob/master/README.md"
    click SourceMain "https://github.com/maximvill/programming-languages/blob/master/src/Main.java"
    click SonarProp "https://github.com/maximvill/programming-languages/blob/master/sonar-project.properties"
    click CI_DIR "https://github.com/maximvill/programming-languages/tree/master/.github/workflows/"
    click CI_Build "https://github.com/maximvill/programming-languages/blob/master/.github/workflows/build.yml"
    click CI_Main "https://github.com/maximvill/programming-languages/blob/master/.github/workflows/main.yml"

    classDef code fill:#9f6,stroke:#080;
    classDef ci fill:#6af,stroke:#048;
    classDef runtime fill:#9f6,stroke:#080;
    classDef external fill:#fa6,stroke:#c40;
```
