# markstrick/netaxis architecture

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

- Interactive diagram: https://gitdiagram.com/markstrick/netaxis
- Repository: https://github.com/markstrick/netaxis

## Overview

NETAXIS is a collaborative network-topology editor with IP planning and live network verification. Users create or join a room, edit and share a topology, then plan and validate subnets and optionally compare the plan with observations from a probe in the target network. The graph covers the sampled client, server, planning, persistence and security layers. The README documents additional capabilities, including simulation and templates, but their implementation files are absent from the supplied tree; those are not expanded into unsupported components.

Main entry points: [`src/server/planning-api.js`](https://github.com/markstrick/netaxis/blob/main/src/server/planning-api.js) (Planning and probe API), [`src/server/index.js`](https://github.com/markstrick/netaxis/blob/main/src/server/index.js) (Room and planning API), [`src/client/App.vue`](https://github.com/markstrick/netaxis/blob/main/src/client/App.vue) (Topology workspace), [`src/client/PlanningWorkspace.vue`](https://github.com/markstrick/netaxis/blob/main/src/client/PlanningWorkspace.vue) (Planning workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Workspace client"]
  node_app["Topology workspace<br/>[App.vue]"]
  node_topology["Topology utilities<br/>[topology.js]"]
end

subgraph group_planning["IP planning and probes"]
  node_planning_ui["Planning workspace"]
  node_probe_agent["Probe agent<br/>[probe-agent.js]"]
  node_planning_api["Planning and probe API<br/>[planning-api.js]"]
  node_plan_engine["Plan calculations<br/>[planning.js]"]
  node_subnet["Subnet calculations<br/>[subnet.js]"]
end

subgraph group_backend["Room backend"]
  node_http_socket["Room and planning API<br/>[index.js]"]
  node_validation["Request validation<br/>[validation.js]"]
  node_security["Sessions and security<br/>[security.js]"]
  node_sqlite[("Workspace database<br/>[db.js]")]
end

node_user(("Room participant"))
node_probe_network(("Network segment"))

node_user -->|"edits topology"| node_app
node_app -->|"uses utilities"| node_topology
node_app -->|"requests and syncs"| node_http_socket
node_app -->|"opens planner"| node_planning_ui
node_planning_ui -->|"calls API"| node_http_socket
node_planning_ui -->|"calculates subnet"| node_subnet
node_http_socket -->|"registers routes"| node_planning_api
node_http_socket -->|"reads and writes rooms"| node_sqlite
node_http_socket -->|"validates requests"| node_validation
node_http_socket -->|"uses session controls"| node_security
node_planning_api -->|"reads and writes plans"| node_sqlite
node_planning_api -->|"hashes probe tokens"| node_security
node_planning_api -->|"validates inputs"| node_validation
node_planning_api -->|"calculates and compares"| node_plan_engine
node_plan_engine -->|"uses subnet math"| node_subnet
node_probe_agent -->|"reports observations"| node_planning_api
node_probe_agent -->|"probes hosts"| node_probe_network

click node_app "https://github.com/markstrick/netaxis/blob/main/src/client/App.vue"
click node_topology "https://github.com/markstrick/netaxis/blob/main/src/client/lib/topology.js"
click node_planning_ui "https://github.com/markstrick/netaxis/blob/main/src/client/PlanningWorkspace.vue"
click node_probe_agent "https://github.com/markstrick/netaxis/blob/main/scripts/probe-agent.js"
click node_http_socket "https://github.com/markstrick/netaxis/blob/main/src/server/index.js"
click node_planning_api "https://github.com/markstrick/netaxis/blob/main/src/server/planning-api.js"
click node_plan_engine "https://github.com/markstrick/netaxis/blob/main/src/server/lib/planning.js"
click node_subnet "https://github.com/markstrick/netaxis/blob/main/src/server/lib/subnet.js"
click node_validation "https://github.com/markstrick/netaxis/blob/main/src/server/lib/validation.js"
click node_security "https://github.com/markstrick/netaxis/blob/main/src/server/lib/security.js"
click node_sqlite "https://github.com/markstrick/netaxis/blob/main/src/server/db.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_topology toneBlue
class node_planning_ui,node_probe_agent,node_planning_api,node_plan_engine,node_subnet toneAmber
class node_http_socket,node_validation,node_security,node_sqlite toneMint
class node_user,node_probe_network toneIndigo
```

## Components

### Workspace client

- [Topology workspace](https://github.com/markstrick/netaxis/blob/main/src/client/App.vue): `src/client/App.vue`
- [Topology utilities](https://github.com/markstrick/netaxis/blob/main/src/client/lib/topology.js): `src/client/lib/topology.js`

### IP planning and probes

- [Planning workspace](https://github.com/markstrick/netaxis/blob/main/src/client/PlanningWorkspace.vue): `src/client/PlanningWorkspace.vue`
- [Probe agent](https://github.com/markstrick/netaxis/blob/main/scripts/probe-agent.js): `scripts/probe-agent.js`
- [Planning and probe API](https://github.com/markstrick/netaxis/blob/main/src/server/planning-api.js): `src/server/planning-api.js`
- [Plan calculations](https://github.com/markstrick/netaxis/blob/main/src/server/lib/planning.js): `src/server/lib/planning.js`
- [Subnet calculations](https://github.com/markstrick/netaxis/blob/main/src/server/lib/subnet.js): `src/server/lib/subnet.js`

### Room backend

- [Room and planning API](https://github.com/markstrick/netaxis/blob/main/src/server/index.js): `src/server/index.js`
- [Request validation](https://github.com/markstrick/netaxis/blob/main/src/server/lib/validation.js): `src/server/lib/validation.js`
- [Sessions and security](https://github.com/markstrick/netaxis/blob/main/src/server/lib/security.js): `src/server/lib/security.js`
- [Workspace database](https://github.com/markstrick/netaxis/blob/main/src/server/db.js): `src/server/db.js`

### Other components

- **Room participant**
- **Network segment**

## Connections

- Room participant → Topology workspace: edits topology (evidence: `README.md`)
- Topology workspace → Topology utilities: uses utilities (evidence: `src/client/App.vue`)
- Topology workspace → Room and planning API: requests and syncs (evidence: `README.md`)
- Topology workspace → Planning workspace: opens planner (evidence: `src/client/App.vue`)
- Planning workspace → Room and planning API: calls API
- Planning workspace → Subnet calculations: calculates subnet (evidence: `src/client/PlanningWorkspace.vue`)
- Room and planning API → Planning and probe API: registers routes (evidence: `src/server/index.js`)
- Room and planning API → Workspace database: reads and writes rooms (evidence: `src/server/index.js`)
- Room and planning API → Request validation: validates requests (evidence: `src/server/index.js`)
- Room and planning API → Sessions and security: uses session controls (evidence: `src/server/index.js`)
- Planning and probe API → Workspace database: reads and writes plans (evidence: `src/server/planning-api.js`)
- Planning and probe API → Sessions and security: hashes probe tokens (evidence: `src/server/planning-api.js`)
- Planning and probe API → Request validation: validates inputs (evidence: `src/server/planning-api.js`)
- Planning and probe API → Plan calculations: calculates and compares (evidence: `src/server/planning-api.js`)
- Plan calculations → Subnet calculations: uses subnet math (evidence: `src/server/lib/planning.js`)
- Probe agent → Planning and probe API: reports observations (evidence: `scripts/probe-agent.js`)
- Probe agent → Network segment: probes hosts (evidence: `README.md`)
