# zakari-a/netpractice architecture

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

- Interactive diagram: https://gitdiagram.com/zakari-a/netpractice
- Repository: https://github.com/zakari-a/netpractice

## Overview

NetPractice is a browser-based networking exercise: learners configure addresses, masks, and routes in staged network topologies, then check whether required communication paths work. The sampled code shows topology rendering and goal checks invoking the routing simulator, which reports success or failure with logs. Login and evaluation-mode flows are visible in the intro code. Level files define the exercise data, but their loading by the HTML pages was not sampled; those links are therefore shown as unverified. The README also documents networking lessons beyond the simulator.

Main entry points: [`net_practice/js/show.js`](https://github.com/zakari-a/netpractice/blob/main/net_practice/js/show.js) (Topology Renderer), [`net_practice/js/intro.js`](https://github.com/zakari-a/netpractice/blob/main/net_practice/js/intro.js) (Start and Login), [`net_practice/js`](https://github.com/zakari-a/netpractice/tree/main/net_practice/js) (Levels 1–5), [`net_practice/js/sim.js`](https://github.com/zakari-a/netpractice/blob/main/net_practice/js/sim.js) (Packet Routing Simulator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and Progress"]
  node_intro["Start and Login<br/>[intro.js]"]
  node_progress["Level Progression<br/>[show.js]"]
end

subgraph group_exercises["Network Exercises"]
  node_basic["Levels 1–5"]
  node_routing["Levels 6–10"]
end

subgraph group_runtime["Exercise Runtime"]
  node_topology["Topology Renderer<br/>[show.js]"]
  node_addressing["Address and Route Inputs<br/>[show.js]"]
  node_goalcheck["Goal Evaluation<br/>[show.js]"]
  node_simulator["Packet Routing Simulator<br/>[sim.js]"]
  node_logs["Simulation Logs<br/>[show.js]"]
  node_export["Configuration Export<br/>[show.js]"]
end

subgraph group_learning["Networking Lessons"]
  node_guide["Networking Guide<br/>[README.md]"]
end

node_learner(("Learner"))

node_learner -->|"starts"| node_intro
node_intro -->|"opens level one"| node_basic
node_intro -->|"starts evaluation"| node_routing
node_basic -.->|"provides scenarios"| node_topology
node_routing -.->|"provides scenarios"| node_topology
node_topology -->|"renders inputs"| node_addressing
node_topology -->|"checks goals"| node_goalcheck
node_goalcheck -->|"simulates reachability"| node_simulator
node_simulator -->|"records outcomes"| node_logs
node_goalcheck -->|"offers next level"| node_progress
node_learner -.->|"edits network settings"| node_addressing
node_learner -->|"downloads config"| node_export
node_learner -->|"learns concepts"| node_guide

click node_intro "https://github.com/zakari-a/netpractice/blob/main/net_practice/js/intro.js"
click node_progress "https://github.com/zakari-a/netpractice/blob/main/net_practice/js/show.js"
click node_basic "https://github.com/zakari-a/netpractice/tree/main/net_practice/js"
click node_routing "https://github.com/zakari-a/netpractice/tree/main/net_practice/js"
click node_topology "https://github.com/zakari-a/netpractice/blob/main/net_practice/js/show.js"
click node_addressing "https://github.com/zakari-a/netpractice/blob/main/net_practice/js/show.js"
click node_goalcheck "https://github.com/zakari-a/netpractice/blob/main/net_practice/js/show.js"
click node_simulator "https://github.com/zakari-a/netpractice/blob/main/net_practice/js/sim.js"
click node_logs "https://github.com/zakari-a/netpractice/blob/main/net_practice/js/show.js"
click node_export "https://github.com/zakari-a/netpractice/blob/main/net_practice/js/show.js"
click node_guide "https://github.com/zakari-a/netpractice/blob/main/README.md"

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_intro,node_progress toneBlue
class node_basic,node_routing toneAmber
class node_topology,node_addressing,node_goalcheck,node_simulator,node_logs,node_export toneMint
class node_guide toneRose
class node_learner toneIndigo
```

## Components

### Entry and Progress

- [Start and Login](https://github.com/zakari-a/netpractice/blob/main/net_practice/js/intro.js): `net_practice/js/intro.js`
- [Level Progression](https://github.com/zakari-a/netpractice/blob/main/net_practice/js/show.js): `net_practice/js/show.js`

### Network Exercises

- [Levels 1–5](https://github.com/zakari-a/netpractice/tree/main/net_practice/js): `net_practice/js`
- [Levels 6–10](https://github.com/zakari-a/netpractice/tree/main/net_practice/js): `net_practice/js`

### Exercise Runtime

- [Topology Renderer](https://github.com/zakari-a/netpractice/blob/main/net_practice/js/show.js): `net_practice/js/show.js`
- [Address and Route Inputs](https://github.com/zakari-a/netpractice/blob/main/net_practice/js/show.js): `net_practice/js/show.js`
- [Goal Evaluation](https://github.com/zakari-a/netpractice/blob/main/net_practice/js/show.js): `net_practice/js/show.js`
- [Packet Routing Simulator](https://github.com/zakari-a/netpractice/blob/main/net_practice/js/sim.js): `net_practice/js/sim.js`
- [Simulation Logs](https://github.com/zakari-a/netpractice/blob/main/net_practice/js/show.js): `net_practice/js/show.js`
- [Configuration Export](https://github.com/zakari-a/netpractice/blob/main/net_practice/js/show.js): `net_practice/js/show.js`

### Networking Lessons

- [Networking Guide](https://github.com/zakari-a/netpractice/blob/main/README.md): `README.md`

### Other components

- **Learner**

## Connections

- Learner → Start and Login: starts (evidence: `net_practice/js/intro.js`)
- Start and Login → Levels 1–5: opens level one (evidence: `net_practice/js/intro.js`)
- Start and Login → Levels 6–10: starts evaluation (evidence: `net_practice/js/intro.js`)
- Levels 1–5 → Topology Renderer: provides scenarios
- Levels 6–10 → Topology Renderer: provides scenarios
- Topology Renderer → Address and Route Inputs: renders inputs (evidence: `net_practice/js/show.js`)
- Topology Renderer → Goal Evaluation: checks goals (evidence: `net_practice/js/show.js`)
- Goal Evaluation → Packet Routing Simulator: simulates reachability (evidence: `net_practice/js/show.js`)
- Packet Routing Simulator → Simulation Logs: records outcomes (evidence: `net_practice/js/sim.js`)
- Goal Evaluation → Level Progression: offers next level (evidence: `net_practice/js/show.js`)
- Learner → Address and Route Inputs: edits network settings
- Learner → Configuration Export: downloads config (evidence: `net_practice/js/show.js`)
- Learner → Networking Guide: learns concepts (evidence: `README.md`)
