# 176anjali/cybershield architecture

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

- Interactive diagram: https://gitdiagram.com/176anjali/cybershield
- Repository: https://github.com/176anjali/cybershield

## Overview

CyberShield is a command-line enterprise network risk analyzer. Its workflow builds and displays a weighted network, finds the lowest-risk Firewall-to-Database route, compares minimum-spanning-tree recommendations, and visualizes the original and optimized networks. Algorithms, orchestration, and presentation all reside in one Python file; the graph separates these responsibilities while reusing that exact path. Some orchestration calls fall in omitted excerpts, so only README-documented capabilities are used where direct call evidence is unavailable.

Main entry points: [`CyberShield.py`](https://github.com/176anjali/cybershield/blob/main/CyberShield.py) (CLI Workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_network["Network Model"]
  node_network_data[("Weighted Network<br/>[CyberShield.py]")]
  node_network_display["Risk Listing<br/>[CyberShield.py]"]
end

subgraph group_analysis["Risk Analysis"]
  node_dijkstra["Dijkstra Analysis<br/>[CyberShield.py]"]
  node_safe_route["Safest Route<br/>[CyberShield.py]"]
  node_prim["Prim MST<br/>[CyberShield.py]"]
  node_kruskal["Kruskal MST<br/>[CyberShield.py]"]
end

subgraph group_output["Recommendations &amp; Display"]
  node_workflow["CLI Workflow<br/>[CyberShield.py]"]
  node_comparison["MST Comparison<br/>[CyberShield.py]"]
  node_visualization["Graph Comparison<br/>[CyberShield.py]"]
end

node_operator(("Operator"))

node_operator -->|"runs"| node_workflow
node_workflow -->|"generates"| node_network_data
node_workflow -->|"displays"| node_network_display
node_workflow -->|"analyzes"| node_dijkstra
node_workflow -->|"reconstructs"| node_safe_route
node_dijkstra -->|"reads"| node_network_data
node_safe_route -->|"reads"| node_network_data
node_workflow -->|"runs"| node_kruskal
node_workflow -->|"compares"| node_comparison
node_workflow -->|"draws"| node_visualization
node_workflow -.->|"runs"| node_prim
node_prim -.->|"reads"| node_network_data
node_kruskal -.->|"reads"| node_network_data
node_comparison -.->|"compares"| node_prim
node_comparison -.->|"compares"| node_kruskal
node_visualization -.->|"renders"| node_network_data
node_visualization -.->|"renders"| node_comparison

click node_workflow "https://github.com/176anjali/cybershield/blob/main/CyberShield.py"
click node_network_data "https://github.com/176anjali/cybershield/blob/main/CyberShield.py"
click node_network_display "https://github.com/176anjali/cybershield/blob/main/CyberShield.py"
click node_dijkstra "https://github.com/176anjali/cybershield/blob/main/CyberShield.py"
click node_safe_route "https://github.com/176anjali/cybershield/blob/main/CyberShield.py"
click node_prim "https://github.com/176anjali/cybershield/blob/main/CyberShield.py"
click node_kruskal "https://github.com/176anjali/cybershield/blob/main/CyberShield.py"
click node_comparison "https://github.com/176anjali/cybershield/blob/main/CyberShield.py"
click node_visualization "https://github.com/176anjali/cybershield/blob/main/CyberShield.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_network_data,node_network_display toneBlue
class node_dijkstra,node_safe_route,node_prim,node_kruskal toneAmber
class node_workflow,node_comparison,node_visualization toneMint
class node_operator toneIndigo
```

## Components

### Network Model

- [Weighted Network](https://github.com/176anjali/cybershield/blob/main/CyberShield.py): `CyberShield.py`
- [Risk Listing](https://github.com/176anjali/cybershield/blob/main/CyberShield.py): `CyberShield.py`

### Risk Analysis

- [Dijkstra Analysis](https://github.com/176anjali/cybershield/blob/main/CyberShield.py): `CyberShield.py`
- [Safest Route](https://github.com/176anjali/cybershield/blob/main/CyberShield.py): `CyberShield.py`
- [Prim MST](https://github.com/176anjali/cybershield/blob/main/CyberShield.py): `CyberShield.py`
- [Kruskal MST](https://github.com/176anjali/cybershield/blob/main/CyberShield.py): `CyberShield.py`

### Recommendations & Display

- [CLI Workflow](https://github.com/176anjali/cybershield/blob/main/CyberShield.py): `CyberShield.py`
- [MST Comparison](https://github.com/176anjali/cybershield/blob/main/CyberShield.py): `CyberShield.py`
- [Graph Comparison](https://github.com/176anjali/cybershield/blob/main/CyberShield.py): `CyberShield.py`

### Other components

- **Operator**

## Connections

- Operator → CLI Workflow: runs (evidence: `README.md`)
- CLI Workflow → Weighted Network: generates (evidence: `CyberShield.py`)
- CLI Workflow → Risk Listing: displays (evidence: `CyberShield.py`)
- CLI Workflow → Dijkstra Analysis: analyzes (evidence: `CyberShield.py`)
- CLI Workflow → Safest Route: reconstructs (evidence: `CyberShield.py`)
- Dijkstra Analysis → Weighted Network: reads (evidence: `CyberShield.py`)
- Safest Route → Weighted Network: reads (evidence: `CyberShield.py`)
- CLI Workflow → Kruskal MST: runs (evidence: `CyberShield.py`)
- CLI Workflow → MST Comparison: compares (evidence: `CyberShield.py`)
- CLI Workflow → Graph Comparison: draws (evidence: `CyberShield.py`)
- CLI Workflow → Prim MST: runs (evidence: `CyberShield.py`)
- Prim MST → Weighted Network: reads (evidence: `CyberShield.py`)
- Kruskal MST → Weighted Network: reads (evidence: `CyberShield.py`)
- MST Comparison → Prim MST: compares (evidence: `CyberShield.py`)
- MST Comparison → Kruskal MST: compares (evidence: `CyberShield.py`)
- Graph Comparison → Weighted Network: renders (evidence: `CyberShield.py`)
- Graph Comparison → MST Comparison: renders (evidence: `CyberShield.py`)
