# alexeycreator/labsprohorov architecture

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

- Interactive diagram: https://gitdiagram.com/alexeycreator/labsprohorov
- Repository: https://github.com/alexeycreator/labsprohorov

## Overview

This repository is an optical-fiber laboratory application: a Windows Forms UI accepts lab inputs, performs calculations, and writes lab data/results as JSON; a separate Python script uses the lab-2 configuration to display an interactive chart. The sampled UI shows calculation and JSON-generation calls, but its lab-3–6 handlers primarily validate inputs in the excerpt. Calculation internals and several wiring details were not fully sampled, so the graph omits unshown execution paths.

Main entry points: [`Backend/WinApp/Shared/Helpers/Generation.cs`](https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/Helpers/Generation.cs) (JSON generation), [`Backend/WinApp/Shared/Calculate/Calculation.cs`](https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/Calculate/Calculation.cs) (Lab calculations), [`Backend/WinApp/WinApp/Form1.cs`](https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/WinApp/Form1.cs) (Lab form), [`Backend/WinApp/Shared/WorkWithFile/JsonWriter.cs`](https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/WorkWithFile/JsonWriter.cs) (JSON writer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_program["Application entry<br/>[Program.cs]"]
  node_form["Lab form<br/>[Form1.cs]"]
end

subgraph group_compute["Lab calculations"]
  node_calculation["Lab calculations<br/>[Calculation.cs]"]
end

subgraph group_data["Lab data and output"]
  node_lab4["Lab 4 result<br/>[Lab4Result.cs]"]
  node_lab5["Lab 5 result<br/>[Lab5Result.cs]"]
  node_lab6["Lab 6 result<br/>[Lab6Result.cs]"]
  node_generation["JSON generation<br/>[Generation.cs]"]
  node_root["Labs document model<br/>[Root.cs]"]
  node_labdata["Lab data model<br/>[LabData.cs]"]
  node_writer["JSON writer<br/>[JsonWriter.cs]"]
  node_labsjson[("Labs JSON file<br/>[Labs.json]")]
end

subgraph group_charts["Python chart"]
  node_chart["Lab 2 chart<br/>[lab2_chart.py]"]
end

node_user(("Lab user"))
node_viewer(("Chart viewer"))

node_user -->|"starts app"| node_program
node_program -->|"runs form"| node_form
node_user -->|"enters inputs"| node_form
node_form -->|"calculates values"| node_calculation
node_form -->|"generates lab data"| node_generation
node_calculation -->|"returns result"| node_lab4
node_calculation -->|"uses result model"| node_lab5
node_calculation -->|"uses result model"| node_lab6
node_generation -->|"serializes result"| node_lab4
node_generation -->|"serializes result"| node_lab5
node_generation -->|"serializes result"| node_lab6
node_generation -->|"builds document"| node_root
node_generation -->|"builds lab entries"| node_labdata
node_generation -->|"writes JSON"| node_writer
node_writer -->|"serializes model"| node_root
node_writer -->|"writes file"| node_labsjson
node_chart -->|"reads lab settings"| node_labsjson
node_chart -->|"shows chart"| node_viewer

click node_program "https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/WinApp/Program.cs"
click node_form "https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/WinApp/Form1.cs"
click node_calculation "https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/Calculate/Calculation.cs"
click node_lab4 "https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/Models/Lab4Result.cs"
click node_lab5 "https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/Models/Lab5Result.cs"
click node_lab6 "https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/Models/Lab6Result.cs"
click node_generation "https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/Helpers/Generation.cs"
click node_root "https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/Models/Root.cs"
click node_labdata "https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/Models/LabData.cs"
click node_writer "https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/WorkWithFile/JsonWriter.cs"
click node_labsjson "https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/WinApp/Files/Labs.json"
click node_chart "https://github.com/alexeycreator/labsprohorov/blob/main/Frontend/python_charts/labs/lab2_chart.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_program,node_form,node_user,node_viewer toneBlue
class node_calculation toneAmber
class node_lab4,node_lab5,node_lab6,node_generation,node_root,node_labdata,node_writer,node_labsjson toneMint
class node_chart toneRose
```

## Components

### Desktop interface

- [Application entry](https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/WinApp/Program.cs): `Backend/WinApp/WinApp/Program.cs`
- [Lab form](https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/WinApp/Form1.cs): `Backend/WinApp/WinApp/Form1.cs`

### Lab calculations

- [Lab calculations](https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/Calculate/Calculation.cs): `Backend/WinApp/Shared/Calculate/Calculation.cs`

### Lab data and output

- [Lab 4 result](https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/Models/Lab4Result.cs): `Backend/WinApp/Shared/Models/Lab4Result.cs`
- [Lab 5 result](https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/Models/Lab5Result.cs): `Backend/WinApp/Shared/Models/Lab5Result.cs`
- [Lab 6 result](https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/Models/Lab6Result.cs): `Backend/WinApp/Shared/Models/Lab6Result.cs`
- [JSON generation](https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/Helpers/Generation.cs): `Backend/WinApp/Shared/Helpers/Generation.cs`
- [Labs document model](https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/Models/Root.cs): `Backend/WinApp/Shared/Models/Root.cs`
- [Lab data model](https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/Models/LabData.cs): `Backend/WinApp/Shared/Models/LabData.cs`
- [JSON writer](https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/Shared/WorkWithFile/JsonWriter.cs): `Backend/WinApp/Shared/WorkWithFile/JsonWriter.cs`
- [Labs JSON file](https://github.com/alexeycreator/labsprohorov/blob/main/Backend/WinApp/WinApp/Files/Labs.json): `Backend/WinApp/WinApp/Files/Labs.json`

### Python chart

- [Lab 2 chart](https://github.com/alexeycreator/labsprohorov/blob/main/Frontend/python_charts/labs/lab2_chart.py): `Frontend/python_charts/labs/lab2_chart.py`

### Other components

- **Lab user**
- **Chart viewer**

## Connections

- Lab user → Application entry: starts app (evidence: `Backend/WinApp/WinApp/Program.cs`)
- Application entry → Lab form: runs form (evidence: `Backend/WinApp/WinApp/Program.cs`)
- Lab user → Lab form: enters inputs (evidence: `Backend/WinApp/WinApp/Form1.cs`)
- Lab form → Lab calculations: calculates values (evidence: `Backend/WinApp/WinApp/Form1.cs`)
- Lab form → JSON generation: generates lab data (evidence: `Backend/WinApp/WinApp/Form1.cs`)
- Lab calculations → Lab 4 result: returns result (evidence: `Backend/WinApp/Shared/Calculate/Calculation.cs`)
- Lab calculations → Lab 5 result: uses result model (evidence: `Backend/WinApp/Shared/Calculate/Calculation.cs`)
- Lab calculations → Lab 6 result: uses result model (evidence: `Backend/WinApp/Shared/Calculate/Calculation.cs`)
- JSON generation → Lab 4 result: serializes result (evidence: `Backend/WinApp/Shared/Helpers/Generation.cs`)
- JSON generation → Lab 5 result: serializes result (evidence: `Backend/WinApp/Shared/Helpers/Generation.cs`)
- JSON generation → Lab 6 result: serializes result (evidence: `Backend/WinApp/Shared/Helpers/Generation.cs`)
- JSON generation → Labs document model: builds document (evidence: `Backend/WinApp/Shared/Helpers/Generation.cs`)
- JSON generation → Lab data model: builds lab entries (evidence: `Backend/WinApp/Shared/Helpers/Generation.cs`)
- JSON generation → JSON writer: writes JSON (evidence: `Backend/WinApp/Shared/Helpers/Generation.cs`)
- JSON writer → Labs document model: serializes model (evidence: `Backend/WinApp/Shared/WorkWithFile/JsonWriter.cs`)
- JSON writer → Labs JSON file: writes file
- Lab 2 chart → Labs JSON file: reads lab settings (evidence: `Frontend/python_charts/labs/lab2_chart.py`)
- Lab 2 chart → Chart viewer: shows chart (evidence: `Frontend/python_charts/labs/lab2_chart.py`)
