# mendeleev258/trpo-vsu architecture

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

- Interactive diagram: https://gitdiagram.com/mendeleev258/trpo-vsu
- Repository: https://github.com/mendeleev258/trpo-vsu

## Overview

This repository is a collection of paired “bad” and “good” C# examples illustrating SOLID design principles, rather than one integrated application. The fullest user-to-result workflow is the robot console: a user chooses a robot and commands, the application delegates movement or construction, and the robot/domain model supplies results for display. Other examples demonstrate appliance management, radio-filter reporting, car capabilities and appointment notifications. The README is empty; links for unsampled examples rely on the SOURCE INDEX, so uncertain runtime relationships are omitted.

Main entry points: [`solid-examples/design-problems/good/Application/ConsoleRobotApplication.cs`](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/design-problems/good/Application/ConsoleRobotApplication.cs) (Robot application), [`solid-examples/single-responsibility/good/Services/FilterReportFormatter.cs`](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/single-responsibility/good/Services/FilterReportFormatter.cs) (Report formatter), [`solid-examples/design-problems/good/Robots/IRobot.cs`](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/design-problems/good/Robots/IRobot.cs) (Robot contracts), [`solid-examples/single-responsibility/good/Models/RadioFilter.cs`](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/single-responsibility/good/Models/RadioFilter.cs) (Radio filter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_robot["Robot design"]
  node_robot_program["Composition root<br/>[Program.cs]"]
  node_robot_app["Robot application"]
  node_robot_factory["Robot factory<br/>[RobotFactory.cs]"]
  node_robot_movement["Movement controller"]
  node_robot_construction["Construction controller"]
  node_robot_contracts["Robot contracts<br/>[IRobot.cs]"]
  node_robot_position["Position model<br/>[Position.cs]"]
  node_robot_building["Building model<br/>[Building.cs]"]
end

subgraph group_srp["Responsibility"]
  node_srp_bad["Combined report example"]
  node_srp_filter["Radio filter<br/>[RadioFilter.cs]"]
  node_srp_calculator["Frequency calculator"]
  node_srp_formatter["Report formatter"]
  node_srp_printer["Console printer"]
  node_srp_saver["File saver<br/>[FileReportSaver.cs]"]
end

subgraph group_ocp["Extension design"]
  node_ocp_bad["Type-switch controller"]
  node_ocp_manager["Appliance manager"]
  node_ocp_contract["Appliance contract<br/>[IAppliance.cs]"]
end

subgraph group_cars["Car design"]
  node_cars_isp["Capability interfaces<br/>[IDrivable.cs]"]
  node_cars_models["Capability-based cars"]
  node_cars_lsp_bad["Shared AWD base"]
  node_cars_lsp_contract["AWD contract"]
  node_cars_touge["Touge setup<br/>[TougeSetup.cs]"]
end

subgraph group_dip["Dependency inversion"]
  node_dip_bad["Concrete notifier example"]
  node_dip_service["Appointment service"]
  node_dip_contract["Notifier interface"]
  node_dip_sms["SMS notifier"]
end

node_user(("Console user"))

node_user -->|"enters commands"| node_robot_app
node_robot_program -->|"starts"| node_robot_app
node_robot_app -->|"creates robot"| node_robot_factory
node_robot_app -->|"delegates movement"| node_robot_movement
node_robot_app -->|"delegates building"| node_robot_construction
node_robot_movement -->|"moves robot"| node_robot_contracts
node_robot_construction -->|"returns building"| node_robot_building
node_robot_factory -->|"creates implementations"| node_robot_contracts
node_robot_contracts -->|"exposes position"| node_robot_position
node_robot_building -->|"records location"| node_robot_position
node_srp_filter -->|"provides input"| node_srp_calculator
node_srp_filter -->|"provides report data"| node_srp_formatter
node_srp_calculator -->|"supplies frequency"| node_srp_formatter
node_srp_formatter -->|"formats for output"| node_srp_printer
node_srp_formatter -->|"formats for saving"| node_srp_saver
node_ocp_manager -->|"manages appliances"| node_ocp_contract
node_ocp_bad -.->|"starts appliance"| node_user
node_cars_models -->|"implements capabilities"| node_cars_isp
node_cars_lsp_bad -.->|"illustrates substitution flaw"| node_user
node_cars_touge -.->|"uses AWD contract"| node_cars_lsp_contract
node_dip_service -->|"depends on abstraction"| node_dip_contract
node_dip_sms -.->|"implements notifier"| node_dip_contract
node_dip_bad -.->|"contrasts concrete dependency"| node_dip_sms

click node_robot_program "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/design-problems/good/Program.cs"
click node_robot_app "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/design-problems/good/Application/ConsoleRobotApplication.cs"
click node_robot_factory "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/design-problems/good/Robots/RobotFactory.cs"
click node_robot_movement "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/design-problems/good/Controllers/MovementController.cs"
click node_robot_construction "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/design-problems/good/Controllers/ConstructionController.cs"
click node_robot_contracts "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/design-problems/good/Robots/IRobot.cs"
click node_robot_position "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/design-problems/good/Domain/Position.cs"
click node_robot_building "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/design-problems/good/Domain/Building.cs"
click node_srp_bad "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/single-responsibility/bad/RadioFilterReport.cs"
click node_srp_filter "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/single-responsibility/good/Models/RadioFilter.cs"
click node_srp_calculator "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/single-responsibility/good/Services/CutoffFrequencyCalculator.cs"
click node_srp_formatter "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/single-responsibility/good/Services/FilterReportFormatter.cs"
click node_srp_printer "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/single-responsibility/good/Services/ConsoleReportPrinter.cs"
click node_srp_saver "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/single-responsibility/good/Services/FileReportSaver.cs"
click node_ocp_bad "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/open-closed/bad/Services/ApplianceController.cs"
click node_ocp_manager "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/open-closed/good/Services/ApplianceManager.cs"
click node_ocp_contract "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/open-closed/good/Interfaces/IAppliance.cs"
click node_cars_isp "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/interface-segregation/good/Interfaces/IDrivable.cs"
click node_cars_models "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/interface-segregation/good/Models/NissanStagea260Rs.cs"
click node_cars_lsp_bad "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/liskov-substitution/bad/Models/AllWheelDriveJdmCar.cs"
click node_cars_lsp_contract "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/liskov-substitution/good/Interfaces/IAllWheelDriveCar.cs"
click node_cars_touge "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/liskov-substitution/good/Services/TougeSetup.cs"
click node_dip_bad "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/dependency-inversion/bad/Services/AppointmentService.cs"
click node_dip_service "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/dependency-inversion/good/Services/AppointmentService.cs"
click node_dip_contract "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/dependency-inversion/good/Interfaces/IAppointmentNotifier.cs"
click node_dip_sms "https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/dependency-inversion/good/Services/SmsAppointmentNotifier.cs"

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_robot_program,node_robot_app,node_robot_factory,node_robot_movement,node_robot_construction,node_robot_contracts,node_robot_position,node_robot_building,node_user toneBlue
class node_srp_bad,node_srp_filter,node_srp_calculator,node_srp_formatter,node_srp_printer,node_srp_saver toneAmber
class node_ocp_bad,node_ocp_manager,node_ocp_contract toneMint
class node_cars_isp,node_cars_models,node_cars_lsp_bad,node_cars_lsp_contract,node_cars_touge toneRose
class node_dip_bad,node_dip_service,node_dip_contract,node_dip_sms toneIndigo
```

## Components

### Robot design

- [Composition root](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/design-problems/good/Program.cs): `solid-examples/design-problems/good/Program.cs`
- [Robot application](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/design-problems/good/Application/ConsoleRobotApplication.cs): `solid-examples/design-problems/good/Application/ConsoleRobotApplication.cs`
- [Robot factory](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/design-problems/good/Robots/RobotFactory.cs): `solid-examples/design-problems/good/Robots/RobotFactory.cs`
- [Movement controller](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/design-problems/good/Controllers/MovementController.cs): `solid-examples/design-problems/good/Controllers/MovementController.cs`
- [Construction controller](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/design-problems/good/Controllers/ConstructionController.cs): `solid-examples/design-problems/good/Controllers/ConstructionController.cs`
- [Robot contracts](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/design-problems/good/Robots/IRobot.cs): `solid-examples/design-problems/good/Robots/IRobot.cs`
- [Position model](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/design-problems/good/Domain/Position.cs): `solid-examples/design-problems/good/Domain/Position.cs`
- [Building model](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/design-problems/good/Domain/Building.cs): `solid-examples/design-problems/good/Domain/Building.cs`

### Responsibility

- [Combined report example](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/single-responsibility/bad/RadioFilterReport.cs): `solid-examples/single-responsibility/bad/RadioFilterReport.cs`
- [Radio filter](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/single-responsibility/good/Models/RadioFilter.cs): `solid-examples/single-responsibility/good/Models/RadioFilter.cs`
- [Frequency calculator](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/single-responsibility/good/Services/CutoffFrequencyCalculator.cs): `solid-examples/single-responsibility/good/Services/CutoffFrequencyCalculator.cs`
- [Report formatter](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/single-responsibility/good/Services/FilterReportFormatter.cs): `solid-examples/single-responsibility/good/Services/FilterReportFormatter.cs`
- [Console printer](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/single-responsibility/good/Services/ConsoleReportPrinter.cs): `solid-examples/single-responsibility/good/Services/ConsoleReportPrinter.cs`
- [File saver](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/single-responsibility/good/Services/FileReportSaver.cs): `solid-examples/single-responsibility/good/Services/FileReportSaver.cs`

### Extension design

- [Type-switch controller](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/open-closed/bad/Services/ApplianceController.cs): `solid-examples/open-closed/bad/Services/ApplianceController.cs`
- [Appliance manager](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/open-closed/good/Services/ApplianceManager.cs): `solid-examples/open-closed/good/Services/ApplianceManager.cs`
- [Appliance contract](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/open-closed/good/Interfaces/IAppliance.cs): `solid-examples/open-closed/good/Interfaces/IAppliance.cs`

### Car design

- [Capability interfaces](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/interface-segregation/good/Interfaces/IDrivable.cs): `solid-examples/interface-segregation/good/Interfaces/IDrivable.cs`
- [Capability-based cars](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/interface-segregation/good/Models/NissanStagea260Rs.cs): `solid-examples/interface-segregation/good/Models/NissanStagea260Rs.cs`
- [Shared AWD base](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/liskov-substitution/bad/Models/AllWheelDriveJdmCar.cs): `solid-examples/liskov-substitution/bad/Models/AllWheelDriveJdmCar.cs`
- [AWD contract](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/liskov-substitution/good/Interfaces/IAllWheelDriveCar.cs): `solid-examples/liskov-substitution/good/Interfaces/IAllWheelDriveCar.cs`
- [Touge setup](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/liskov-substitution/good/Services/TougeSetup.cs): `solid-examples/liskov-substitution/good/Services/TougeSetup.cs`

### Dependency inversion

- [Concrete notifier example](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/dependency-inversion/bad/Services/AppointmentService.cs): `solid-examples/dependency-inversion/bad/Services/AppointmentService.cs`
- [Appointment service](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/dependency-inversion/good/Services/AppointmentService.cs): `solid-examples/dependency-inversion/good/Services/AppointmentService.cs`
- [Notifier interface](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/dependency-inversion/good/Interfaces/IAppointmentNotifier.cs): `solid-examples/dependency-inversion/good/Interfaces/IAppointmentNotifier.cs`
- [SMS notifier](https://github.com/mendeleev258/trpo-vsu/blob/master/solid-examples/dependency-inversion/good/Services/SmsAppointmentNotifier.cs): `solid-examples/dependency-inversion/good/Services/SmsAppointmentNotifier.cs`

### Other components

- **Console user**

## Connections

- Console user → Robot application: enters commands (evidence: `solid-examples/design-problems/good/Application/ConsoleRobotApplication.cs`)
- Composition root → Robot application: starts (evidence: `solid-examples/design-problems/good/Program.cs`)
- Robot application → Robot factory: creates robot (evidence: `solid-examples/design-problems/good/Application/ConsoleRobotApplication.cs`)
- Robot application → Movement controller: delegates movement (evidence: `solid-examples/design-problems/good/Application/ConsoleRobotApplication.cs`)
- Robot application → Construction controller: delegates building (evidence: `solid-examples/design-problems/good/Application/ConsoleRobotApplication.cs`)
- Movement controller → Robot contracts: moves robot (evidence: `solid-examples/design-problems/good/Controllers/MovementController.cs`)
- Construction controller → Building model: returns building (evidence: `solid-examples/design-problems/good/Controllers/ConstructionController.cs`)
- Robot factory → Robot contracts: creates implementations (evidence: `solid-examples/design-problems/good/Robots/RobotFactory.cs`)
- Robot contracts → Position model: exposes position (evidence: `solid-examples/design-problems/good/Robots/IRobot.cs`)
- Building model → Position model: records location (evidence: `solid-examples/design-problems/good/Domain/Building.cs`)
- Radio filter → Frequency calculator: provides input (evidence: `solid-examples/single-responsibility/good/Program.cs`)
- Radio filter → Report formatter: provides report data (evidence: `solid-examples/single-responsibility/good/Program.cs`)
- Frequency calculator → Report formatter: supplies frequency (evidence: `solid-examples/single-responsibility/good/Program.cs`)
- Report formatter → Console printer: formats for output (evidence: `solid-examples/single-responsibility/good/Program.cs`)
- Report formatter → File saver: formats for saving (evidence: `solid-examples/single-responsibility/good/Program.cs`)
- Appliance manager → Appliance contract: manages appliances (evidence: `solid-examples/open-closed/good/Services/ApplianceManager.cs`)
- Type-switch controller → Console user: starts appliance
- Capability-based cars → Capability interfaces: implements capabilities (evidence: `solid-examples/interface-segregation/good/Models/NissanStagea260Rs.cs`)
- Shared AWD base → Console user: illustrates substitution flaw
- Touge setup → AWD contract: uses AWD contract
- Appointment service → Notifier interface: depends on abstraction (evidence: `solid-examples/dependency-inversion/good/Services/AppointmentService.cs`)
- SMS notifier → Notifier interface: implements notifier
- Concrete notifier example → SMS notifier: contrasts concrete dependency
