# tanvirarjel/solidprinciples architecture

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

- Interactive diagram: https://gitdiagram.com/tanvirarjel/solidprinciples
- Repository: https://github.com/tanvirarjel/solidprinciples

## Overview

This repository is a set of five small C# teaching examples for the SOLID principles, not a single application workflow. A reader uses the root README to find each principle’s example project; each project has bad/good design code where provided, plus a console entry point. The graph preserves the documented principle branches and the indexed example modules. Most entry points only print a greeting, so no calls from them to the examples are shown.

Main entry points: [`README.md`](https://github.com/tanvirarjel/solidprinciples/blob/main/README.md) (Principles Guide), [`OpenClosedPrinciple/BadDesign.cs`](https://github.com/tanvirarjel/solidprinciples/blob/main/OpenClosedPrinciple/BadDesign.cs) (Conditional Reports), [`SingleResponsibilityPrinciple/IUserService.cs`](https://github.com/tanvirarjel/solidprinciples/blob/main/SingleResponsibilityPrinciple/IUserService.cs) (User Interfaces), [`OpenClosedPrinciple/Employee.cs`](https://github.com/tanvirarjel/solidprinciples/blob/main/OpenClosedPrinciple/Employee.cs) (Employee Model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_srp["Single Responsibility"]
  node_srp_entry["Console Entry<br/>[Program.cs]"]
  node_srp_interfaces["User Interfaces<br/>[IUserService.cs]"]
end

subgraph group_ocp["Open Closed"]
  node_ocp_entry["Console Entry<br/>[Program.cs]"]
  node_ocp_bad["Conditional Reports<br/>[BadDesign.cs]"]
  node_ocp_employee["Employee Model<br/>[Employee.cs]"]
  node_ocp_good["Extensible Design<br/>[GoodDesign.cs]"]
end

subgraph group_lsp["Liskov Substitution"]
  node_lsp_entry["Console Entry<br/>[Program.cs]"]
  node_lsp_bad["Invalid Substitution<br/>[BadDesign.cs]"]
  node_lsp_good["Substitutable Design<br/>[GoodDesign.cs]"]
end

subgraph group_isp["Interface Segregation"]
  node_isp_entry["Console Entry<br/>[Program.cs]"]
  node_isp_bad["Fat Task Interface<br/>[BadDesign.cs]"]
  node_isp_good["Segregated Interfaces<br/>[GoodDesign.cs]"]
end

subgraph group_dip["Dependency Inversion"]
  node_dip_entry["Console Entry<br/>[Program.cs]"]
  node_dip_bad["Direct Dependency Example<br/>[BadDesign.cs]"]
  node_dip_good["Abstracted Email Design<br/>[GoodDesign.cs]"]
end

node_reader(("Reader"))
node_guide["Principles Guide<br/>[README.md]"]

node_reader -->|"reads"| node_guide
node_guide -->|"links to"| node_srp_interfaces
node_guide -->|"links to"| node_ocp_bad
node_guide -->|"links to"| node_lsp_bad
node_guide -->|"links to"| node_isp_bad
node_guide -->|"links to"| node_dip_good
node_ocp_bad -->|"uses model"| node_ocp_employee

click node_guide "https://github.com/tanvirarjel/solidprinciples/blob/main/README.md"
click node_srp_entry "https://github.com/tanvirarjel/solidprinciples/blob/main/SingleResponsibilityPrinciple/Program.cs"
click node_srp_interfaces "https://github.com/tanvirarjel/solidprinciples/blob/main/SingleResponsibilityPrinciple/IUserService.cs"
click node_ocp_entry "https://github.com/tanvirarjel/solidprinciples/blob/main/OpenClosedPrinciple/Program.cs"
click node_ocp_bad "https://github.com/tanvirarjel/solidprinciples/blob/main/OpenClosedPrinciple/BadDesign.cs"
click node_ocp_employee "https://github.com/tanvirarjel/solidprinciples/blob/main/OpenClosedPrinciple/Employee.cs"
click node_ocp_good "https://github.com/tanvirarjel/solidprinciples/blob/main/OpenClosedPrinciple/GoodDesign.cs"
click node_lsp_entry "https://github.com/tanvirarjel/solidprinciples/blob/main/LiskovSubstitutionPrinciple/Program.cs"
click node_lsp_bad "https://github.com/tanvirarjel/solidprinciples/blob/main/LiskovSubstitutionPrinciple/BadDesign.cs"
click node_lsp_good "https://github.com/tanvirarjel/solidprinciples/blob/main/LiskovSubstitutionPrinciple/GoodDesign.cs"
click node_isp_entry "https://github.com/tanvirarjel/solidprinciples/blob/main/InterfaceSegregationPrinciple/Program.cs"
click node_isp_bad "https://github.com/tanvirarjel/solidprinciples/blob/main/InterfaceSegregationPrinciple/BadDesign.cs"
click node_isp_good "https://github.com/tanvirarjel/solidprinciples/blob/main/InterfaceSegregationPrinciple/GoodDesign.cs"
click node_dip_entry "https://github.com/tanvirarjel/solidprinciples/blob/main/DependencyInversionPrinciple/Program.cs"
click node_dip_bad "https://github.com/tanvirarjel/solidprinciples/blob/main/DependencyInversionPrinciple/BadDesign.cs"
click node_dip_good "https://github.com/tanvirarjel/solidprinciples/blob/main/DependencyInversionPrinciple/GoodDesign.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_srp_entry,node_srp_interfaces toneBlue
class node_ocp_entry,node_ocp_bad,node_ocp_employee,node_ocp_good toneAmber
class node_lsp_entry,node_lsp_bad,node_lsp_good toneMint
class node_isp_entry,node_isp_bad,node_isp_good toneRose
class node_dip_entry,node_dip_bad,node_dip_good,node_reader toneIndigo
class node_guide toneTeal
```

## Components

### Single Responsibility

- [Console Entry](https://github.com/tanvirarjel/solidprinciples/blob/main/SingleResponsibilityPrinciple/Program.cs): `SingleResponsibilityPrinciple/Program.cs`
- [User Interfaces](https://github.com/tanvirarjel/solidprinciples/blob/main/SingleResponsibilityPrinciple/IUserService.cs): `SingleResponsibilityPrinciple/IUserService.cs`

### Open Closed

- [Console Entry](https://github.com/tanvirarjel/solidprinciples/blob/main/OpenClosedPrinciple/Program.cs): `OpenClosedPrinciple/Program.cs`
- [Conditional Reports](https://github.com/tanvirarjel/solidprinciples/blob/main/OpenClosedPrinciple/BadDesign.cs): `OpenClosedPrinciple/BadDesign.cs`
- [Employee Model](https://github.com/tanvirarjel/solidprinciples/blob/main/OpenClosedPrinciple/Employee.cs): `OpenClosedPrinciple/Employee.cs`
- [Extensible Design](https://github.com/tanvirarjel/solidprinciples/blob/main/OpenClosedPrinciple/GoodDesign.cs): `OpenClosedPrinciple/GoodDesign.cs`

### Liskov Substitution

- [Console Entry](https://github.com/tanvirarjel/solidprinciples/blob/main/LiskovSubstitutionPrinciple/Program.cs): `LiskovSubstitutionPrinciple/Program.cs`
- [Invalid Substitution](https://github.com/tanvirarjel/solidprinciples/blob/main/LiskovSubstitutionPrinciple/BadDesign.cs): `LiskovSubstitutionPrinciple/BadDesign.cs`
- [Substitutable Design](https://github.com/tanvirarjel/solidprinciples/blob/main/LiskovSubstitutionPrinciple/GoodDesign.cs): `LiskovSubstitutionPrinciple/GoodDesign.cs`

### Interface Segregation

- [Console Entry](https://github.com/tanvirarjel/solidprinciples/blob/main/InterfaceSegregationPrinciple/Program.cs): `InterfaceSegregationPrinciple/Program.cs`
- [Fat Task Interface](https://github.com/tanvirarjel/solidprinciples/blob/main/InterfaceSegregationPrinciple/BadDesign.cs): `InterfaceSegregationPrinciple/BadDesign.cs`
- [Segregated Interfaces](https://github.com/tanvirarjel/solidprinciples/blob/main/InterfaceSegregationPrinciple/GoodDesign.cs): `InterfaceSegregationPrinciple/GoodDesign.cs`

### Dependency Inversion

- [Console Entry](https://github.com/tanvirarjel/solidprinciples/blob/main/DependencyInversionPrinciple/Program.cs): `DependencyInversionPrinciple/Program.cs`
- [Direct Dependency Example](https://github.com/tanvirarjel/solidprinciples/blob/main/DependencyInversionPrinciple/BadDesign.cs): `DependencyInversionPrinciple/BadDesign.cs`
- [Abstracted Email Design](https://github.com/tanvirarjel/solidprinciples/blob/main/DependencyInversionPrinciple/GoodDesign.cs): `DependencyInversionPrinciple/GoodDesign.cs`

### Other components

- **Reader**
- [Principles Guide](https://github.com/tanvirarjel/solidprinciples/blob/main/README.md): `README.md`

## Connections

- Reader → Principles Guide: reads (evidence: `README.md`)
- Principles Guide → User Interfaces: links to (evidence: `README.md`)
- Principles Guide → Conditional Reports: links to (evidence: `README.md`)
- Principles Guide → Invalid Substitution: links to (evidence: `README.md`)
- Principles Guide → Fat Task Interface: links to (evidence: `README.md`)
- Principles Guide → Abstracted Email Design: links to (evidence: `README.md`)
- Conditional Reports → Employee Model: uses model (evidence: `OpenClosedPrinciple/BadDesign.cs`)
