# yahnlp/simulateur-reseau architecture

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

- Interactive diagram: https://gitdiagram.com/yahnlp/simulateur-reseau
- Repository: https://github.com/yahnlp/simulateur-reseau

## Overview

This is an offline, browser-based educational network simulator. The main workflow is to build and configure a network, run or step its simulation, then inspect captured frames; users can also load/save plans and work through guided exercises. The README documents broad protocol, security, and certification-training capabilities, while the excerpts show the app shell and selected protocol implementations. Several subsystem links below are dashed with null evidence because their invocation paths were not shown.

Main entry points: [`js/stack.js`](https://github.com/yahnlp/simulateur-reseau/blob/main/js/stack.js) (Protocol stack), [`js/sim.js`](https://github.com/yahnlp/simulateur-reseau/blob/main/js/sim.js) (Frame simulation), [`js/app.js`](https://github.com/yahnlp/simulateur-reseau/blob/main/js/app.js) (Topology canvas), [`js/main.js`](https://github.com/yahnlp/simulateur-reseau/blob/main/js/main.js) (Application controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Network workspace"]
  node_app["Topology canvas<br/>[app.js]"]
  node_catalog["Device palette<br/>[catalog.js]"]
  node_ios["Cisco IOS CLI<br/>[ioscli.js]"]
  node_aos["OmniSwitch AOS CLI<br/>[aos.js]"]
  node_hostcli["Host terminals<br/>[hostshell.js]"]
  node_main["Application controls<br/>[main.js]"]
end

subgraph group_runtime["Simulation runtime"]
  node_devices["Network devices<br/>[devices.js]"]
  node_simulation["Frame simulation<br/>[sim.js]"]
  node_stack["Protocol stack<br/>[stack.js]"]
end

subgraph group_protocols["Network protocols"]
  node_codec["Frame codec<br/>[codec.js]"]
  node_services["Network services<br/>[services.js]"]
  node_ospf["OSPF routing<br/>[ospf.js]"]
  node_vpn["VPN tunnels<br/>[vpn.js]"]
  node_voip["IP telephony<br/>[voip.js]"]
  node_management["SNMP and syslog<br/>[mgmt.js]"]
end

subgraph group_inspection["Inspection and training"]
  node_analyzer["Frame analyzer<br/>[analyzer.js]"]
  node_wireshark["Packet inspection<br/>[wireshark.js]"]
  node_cyber["Cybersecurity tools<br/>[cyber.js]"]
end

subgraph group_learning["Learning and persistence"]
  node_scenarios["Guided exercises<br/>[scenarios.js]"]
  node_persistence["Plan save and load<br/>[host_persist.js]"]
end

node_teacher(("Learner"))

node_teacher -->|"starts and operates"| node_main
node_main -->|"creates"| node_app
node_app -->|"owns simulation"| node_simulation
node_app -->|"renders devices from"| node_catalog
node_teacher -->|"edits topology"| node_app
node_teacher -.->|"configures devices"| node_ios
node_teacher -.->|"configures switches"| node_aos
node_teacher -.->|"uses host terminal"| node_hostcli
node_simulation -.->|"simulates devices"| node_devices
node_simulation -.->|"processes network traffic"| node_stack
node_stack -.->|"encodes and parses"| node_codec
node_stack -.->|"provides network services"| node_services
node_stack -.->|"supports routing"| node_ospf
node_stack -.->|"supports tunnels"| node_vpn
node_stack -.->|"supports telephony"| node_voip
node_stack -.->|"supports supervision"| node_management
node_simulation -.->|"supplies captured frames"| node_analyzer
node_analyzer -.->|"presents packet details"| node_wireshark
node_teacher -->|"runs security exercises"| node_cyber
node_teacher -->|"selects exercises"| node_scenarios
node_main -->|"lists training scenarios"| node_scenarios
node_teacher -->|"saves and loads plans"| node_persistence

click node_app "https://github.com/yahnlp/simulateur-reseau/blob/main/js/app.js"
click node_catalog "https://github.com/yahnlp/simulateur-reseau/blob/main/js/catalog.js"
click node_devices "https://github.com/yahnlp/simulateur-reseau/blob/main/js/devices.js"
click node_simulation "https://github.com/yahnlp/simulateur-reseau/blob/main/js/sim.js"
click node_stack "https://github.com/yahnlp/simulateur-reseau/blob/main/js/stack.js"
click node_codec "https://github.com/yahnlp/simulateur-reseau/blob/main/js/codec.js"
click node_services "https://github.com/yahnlp/simulateur-reseau/blob/main/js/services.js"
click node_ospf "https://github.com/yahnlp/simulateur-reseau/blob/main/js/ospf.js"
click node_vpn "https://github.com/yahnlp/simulateur-reseau/blob/main/js/vpn.js"
click node_voip "https://github.com/yahnlp/simulateur-reseau/blob/main/js/voip.js"
click node_management "https://github.com/yahnlp/simulateur-reseau/blob/main/js/mgmt.js"
click node_ios "https://github.com/yahnlp/simulateur-reseau/blob/main/js/ioscli.js"
click node_aos "https://github.com/yahnlp/simulateur-reseau/blob/main/js/aos.js"
click node_hostcli "https://github.com/yahnlp/simulateur-reseau/blob/main/js/hostshell.js"
click node_analyzer "https://github.com/yahnlp/simulateur-reseau/blob/main/js/analyzer.js"
click node_wireshark "https://github.com/yahnlp/simulateur-reseau/blob/main/js/wireshark.js"
click node_cyber "https://github.com/yahnlp/simulateur-reseau/blob/main/js/cyber.js"
click node_scenarios "https://github.com/yahnlp/simulateur-reseau/blob/main/js/scenarios.js"
click node_persistence "https://github.com/yahnlp/simulateur-reseau/blob/main/js/host_persist.js"
click node_main "https://github.com/yahnlp/simulateur-reseau/blob/main/js/main.js"

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_app,node_catalog,node_ios,node_aos,node_hostcli,node_main toneBlue
class node_devices,node_simulation,node_stack toneAmber
class node_codec,node_services,node_ospf,node_vpn,node_voip,node_management toneMint
class node_analyzer,node_wireshark,node_cyber toneRose
class node_scenarios,node_persistence,node_teacher toneIndigo
```

## Components

### Network workspace

- [Topology canvas](https://github.com/yahnlp/simulateur-reseau/blob/main/js/app.js): `js/app.js`
- [Device palette](https://github.com/yahnlp/simulateur-reseau/blob/main/js/catalog.js): `js/catalog.js`
- [Cisco IOS CLI](https://github.com/yahnlp/simulateur-reseau/blob/main/js/ioscli.js): `js/ioscli.js`
- [OmniSwitch AOS CLI](https://github.com/yahnlp/simulateur-reseau/blob/main/js/aos.js): `js/aos.js`
- [Host terminals](https://github.com/yahnlp/simulateur-reseau/blob/main/js/hostshell.js): `js/hostshell.js`
- [Application controls](https://github.com/yahnlp/simulateur-reseau/blob/main/js/main.js): `js/main.js`

### Simulation runtime

- [Network devices](https://github.com/yahnlp/simulateur-reseau/blob/main/js/devices.js): `js/devices.js`
- [Frame simulation](https://github.com/yahnlp/simulateur-reseau/blob/main/js/sim.js): `js/sim.js`
- [Protocol stack](https://github.com/yahnlp/simulateur-reseau/blob/main/js/stack.js): `js/stack.js`

### Network protocols

- [Frame codec](https://github.com/yahnlp/simulateur-reseau/blob/main/js/codec.js): `js/codec.js`
- [Network services](https://github.com/yahnlp/simulateur-reseau/blob/main/js/services.js): `js/services.js`
- [OSPF routing](https://github.com/yahnlp/simulateur-reseau/blob/main/js/ospf.js): `js/ospf.js`
- [VPN tunnels](https://github.com/yahnlp/simulateur-reseau/blob/main/js/vpn.js): `js/vpn.js`
- [IP telephony](https://github.com/yahnlp/simulateur-reseau/blob/main/js/voip.js): `js/voip.js`
- [SNMP and syslog](https://github.com/yahnlp/simulateur-reseau/blob/main/js/mgmt.js): `js/mgmt.js`

### Inspection and training

- [Frame analyzer](https://github.com/yahnlp/simulateur-reseau/blob/main/js/analyzer.js): `js/analyzer.js`
- [Packet inspection](https://github.com/yahnlp/simulateur-reseau/blob/main/js/wireshark.js): `js/wireshark.js`
- [Cybersecurity tools](https://github.com/yahnlp/simulateur-reseau/blob/main/js/cyber.js): `js/cyber.js`

### Learning and persistence

- [Guided exercises](https://github.com/yahnlp/simulateur-reseau/blob/main/js/scenarios.js): `js/scenarios.js`
- [Plan save and load](https://github.com/yahnlp/simulateur-reseau/blob/main/js/host_persist.js): `js/host_persist.js`

### Other components

- **Learner**

## Connections

- Learner → Application controls: starts and operates
- Application controls → Topology canvas: creates (evidence: `js/main.js`)
- Topology canvas → Frame simulation: owns simulation (evidence: `js/app.js`)
- Topology canvas → Device palette: renders devices from (evidence: `js/app.js`)
- Learner → Topology canvas: edits topology
- Learner → Cisco IOS CLI: configures devices
- Learner → OmniSwitch AOS CLI: configures switches
- Learner → Host terminals: uses host terminal
- Frame simulation → Network devices: simulates devices
- Frame simulation → Protocol stack: processes network traffic
- Protocol stack → Frame codec: encodes and parses
- Protocol stack → Network services: provides network services
- Protocol stack → OSPF routing: supports routing
- Protocol stack → VPN tunnels: supports tunnels
- Protocol stack → IP telephony: supports telephony
- Protocol stack → SNMP and syslog: supports supervision
- Frame simulation → Frame analyzer: supplies captured frames
- Frame analyzer → Packet inspection: presents packet details
- Learner → Cybersecurity tools: runs security exercises
- Learner → Guided exercises: selects exercises
- Application controls → Guided exercises: lists training scenarios (evidence: `js/main.js`)
- Learner → Plan save and load: saves and loads plans
