# williamjensen17/network_config_generator architecture

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

- Interactive diagram: https://gitdiagram.com/williamjensen17/network_config_generator
- Repository: https://github.com/williamjensen17/network_config_generator

## Overview

Network_Config_Generator is a Windows desktop tool for semi-automatically creating Cisco switch configuration text. The user configures switch identity and access settings, defines VLANs and management addressing, and selects physical or EtherChannel ports with descriptions, enablement, modes, and VLAN membership; the application generates CLI text for display. The graph reflects the documented feature set and sampled code. Some form-to-generator wiring and unsampled settings behavior are not shown in the excerpts, so those links are represented only where the application structure supports them.

Main entry points: [`Form1.cs`](https://github.com/williamjensen17/network_config_generator/blob/main/Form1.cs) (Switch editor), [`SwitchConfigGenerator.Core/Generate.cs`](https://github.com/williamjensen17/network_config_generator/blob/main/SwitchConfigGenerator.Core/Generate.cs) (CLI config generator), [`SwitchConfigGenerator.Core/Variables.cs`](https://github.com/williamjensen17/network_config_generator/blob/main/SwitchConfigGenerator.Core/Variables.cs) (Global settings and ports), [`SettingsForm.cs`](https://github.com/williamjensen17/network_config_generator/blob/main/SettingsForm.cs) (Settings window)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_entry["Application entry<br/>[Program.cs]"]
  node_mainform["Switch editor<br/>[Form1.cs]"]
  node_settingsform["Settings window<br/>[SettingsForm.cs]"]
  node_settingscontrol["General settings window"]
end

subgraph group_config["Configuration inputs"]
  node_general["General settings"]
  node_vlanui["VLAN settings"]
end

subgraph group_state["Configuration state"]
  node_variables["Global settings and ports<br/>[Variables.cs]"]
  node_port["Physical port model<br/>[Port.cs]"]
  node_groupport["Port-channel model<br/>[GroupPort.cs]"]
  node_vlan["VLAN model<br/>[Vlan.cs]"]
  node_portmode["Port modes<br/>[PortMode.cs]"]
end

subgraph group_generation["Config generation"]
  node_generate["CLI config generator<br/>[Generate.cs]"]
  node_configtext["Generated CLI text"]
end

node_user(("Network engineer"))

node_user -->|"configures"| node_mainform
node_entry -->|"starts"| node_mainform
node_mainform -->|"opens"| node_settingsform
node_mainform -->|"edits VLANs"| node_vlanui
node_mainform -->|"updates settings"| node_variables
node_mainform -->|"updates ports"| node_port
node_mainform -->|"updates channels"| node_groupport
node_vlanui -->|"creates and edits"| node_vlan
node_general -->|"updates settings"| node_variables
node_settingsform -->|"hosts"| node_settingscontrol
node_mainform -->|"requests generation"| node_generate
node_generate -->|"reads settings"| node_variables
node_generate -->|"reads VLANs"| node_vlan
node_generate -->|"reads ports"| node_port
node_generate -->|"reads channels"| node_groupport
node_generate -->|"returns CLI text"| node_configtext
node_mainform -->|"displays text"| node_configtext

click node_entry "https://github.com/williamjensen17/network_config_generator/blob/main/Program.cs"
click node_mainform "https://github.com/williamjensen17/network_config_generator/blob/main/Form1.cs"
click node_general "https://github.com/williamjensen17/network_config_generator/blob/main/GeneralSettingsControl.cs"
click node_vlanui "https://github.com/williamjensen17/network_config_generator/blob/main/VlanSettingsControl.cs"
click node_settingsform "https://github.com/williamjensen17/network_config_generator/blob/main/SettingsForm.cs"
click node_settingscontrol "https://github.com/williamjensen17/network_config_generator/blob/main/GeneralSettingsControl.cs"
click node_variables "https://github.com/williamjensen17/network_config_generator/blob/main/SwitchConfigGenerator.Core/Variables.cs"
click node_port "https://github.com/williamjensen17/network_config_generator/blob/main/SwitchConfigGenerator.Core/Port.cs"
click node_groupport "https://github.com/williamjensen17/network_config_generator/blob/main/SwitchConfigGenerator.Core/GroupPort.cs"
click node_vlan "https://github.com/williamjensen17/network_config_generator/blob/main/SwitchConfigGenerator.Core/Vlan.cs"
click node_portmode "https://github.com/williamjensen17/network_config_generator/blob/main/SwitchConfigGenerator.Core/PortMode.cs"
click node_generate "https://github.com/williamjensen17/network_config_generator/blob/main/SwitchConfigGenerator.Core/Generate.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_entry,node_mainform,node_settingsform,node_settingscontrol toneBlue
class node_general,node_vlanui toneAmber
class node_variables,node_port,node_groupport,node_vlan,node_portmode toneMint
class node_generate,node_configtext toneRose
class node_user toneIndigo
```

## Components

### Desktop interface

- [Application entry](https://github.com/williamjensen17/network_config_generator/blob/main/Program.cs): `Program.cs`
- [Switch editor](https://github.com/williamjensen17/network_config_generator/blob/main/Form1.cs): `Form1.cs`
- [Settings window](https://github.com/williamjensen17/network_config_generator/blob/main/SettingsForm.cs): `SettingsForm.cs`
- [General settings window](https://github.com/williamjensen17/network_config_generator/blob/main/GeneralSettingsControl.cs): `GeneralSettingsControl.cs`

### Configuration inputs

- [General settings](https://github.com/williamjensen17/network_config_generator/blob/main/GeneralSettingsControl.cs): `GeneralSettingsControl.cs`
- [VLAN settings](https://github.com/williamjensen17/network_config_generator/blob/main/VlanSettingsControl.cs): `VlanSettingsControl.cs`

### Configuration state

- [Global settings and ports](https://github.com/williamjensen17/network_config_generator/blob/main/SwitchConfigGenerator.Core/Variables.cs): `SwitchConfigGenerator.Core/Variables.cs`
- [Physical port model](https://github.com/williamjensen17/network_config_generator/blob/main/SwitchConfigGenerator.Core/Port.cs): `SwitchConfigGenerator.Core/Port.cs`
- [Port-channel model](https://github.com/williamjensen17/network_config_generator/blob/main/SwitchConfigGenerator.Core/GroupPort.cs): `SwitchConfigGenerator.Core/GroupPort.cs`
- [VLAN model](https://github.com/williamjensen17/network_config_generator/blob/main/SwitchConfigGenerator.Core/Vlan.cs): `SwitchConfigGenerator.Core/Vlan.cs`
- [Port modes](https://github.com/williamjensen17/network_config_generator/blob/main/SwitchConfigGenerator.Core/PortMode.cs): `SwitchConfigGenerator.Core/PortMode.cs`

### Config generation

- [CLI config generator](https://github.com/williamjensen17/network_config_generator/blob/main/SwitchConfigGenerator.Core/Generate.cs): `SwitchConfigGenerator.Core/Generate.cs`
- **Generated CLI text**

### Other components

- **Network engineer**

## Connections

- Network engineer → Switch editor: configures
- Application entry → Switch editor: starts
- Switch editor → Settings window: opens
- Switch editor → VLAN settings: edits VLANs
- Switch editor → Global settings and ports: updates settings
- Switch editor → Physical port model: updates ports
- Switch editor → Port-channel model: updates channels
- VLAN settings → VLAN model: creates and edits
- General settings → Global settings and ports: updates settings
- Settings window → General settings window: hosts
- Switch editor → CLI config generator: requests generation
- CLI config generator → Global settings and ports: reads settings
- CLI config generator → VLAN model: reads VLANs
- CLI config generator → Physical port model: reads ports
- CLI config generator → Port-channel model: reads channels
- CLI config generator → Generated CLI text: returns CLI text
- Switch editor → Generated CLI text: displays text
