An interactive network simulation and graph analysis platform that combines:
- High-performance C++ simulation and algorithm engines
- A Node.js backend bridge that orchestrates native binaries
- A React + Vite frontend for topology building, playback, and metrics visualization
Minty NS lets you model network topologies, run packet-flow simulations, and compare graph algorithms (Shortest Path and MST) using a visual interface.
Core capabilities include:
- Topology generation (tree, random) and manual topology editing
- Packet simulation with configurable traffic parameters
- Event playback timeline and queue-focused visualization
- Metrics reporting (latency, throughput, loss, jitter, hops)
- Algorithm analysis via native C++ tooling:
- Dijkstra
- Bellman-Ford
- BFS distance
- Kruskal MST
- Prim MST
- Path stretch comparison (MST path vs shortest path)
- Stress testing for large node counts
The stack is organized into three layers:
- Frontend (React)
- Path: frontend/
- Main UI: frontend/src/App.jsx
- Uses React Flow for graph rendering and controls.
- Backend (Node.js / Express)
- Path: backend/server.js
- Exposes REST endpoints used by the frontend.
- Spawns native C++ binaries and returns JSON results.
- Native C++ Engines
- Main simulator binary: build/simulator
- Analysis binary: build/analysis-tool
- Additional backend-oriented runner: build/backend-runner
- Source code spans engine/, network/, graphs/, algorithms/, performance/, and src/.
High-level folders:
- algorithms/: shortest path, MST, routing utilities, metrics helpers
- backend/: Node.js API server
- config/: simulation config presets
- data_input/: runtime-generated config and topology inputs
- data_output/: runtime-generated JSON/CSV outputs
- engine/: simulation core, pipeline, events, integration logic
- frontend/: React UI (Vite)
- graphs/: graph containers and generators
- network/: transport/network behavior, queueing, logging, metrics
- performance/: profiler and stress testing support
- src/: C++ entry points (simulator main, backend runner, analysis tool)
- Linux or macOS (Linux recommended)
- Node.js 18+ and npm
- g++ with C++17 support
- make
At repo root:
npm install
npm --prefix frontend installmake releaseThis builds:
- build/simulator
- build/backend-runner
- build/analysis-tool
npm run devThis launches:
- Backend API on http://localhost:3000
- Frontend dev server on http://localhost:5173 (or next available Vite port)
Navigate to the frontend URL shown in terminal output.
Backend only:
npm run dev:backendFrontend only:
npm run dev:frontendNative simulator directly:
./build/simulator config/config.txtDefault config file: config/config.txt
Common keys:
- nodes: number of nodes
- topology: tree or random
- probability: edge probability for random topology
- traffic_type: constant, random, or burst
- rate: packets per second
- packet_size: bytes
- simulation_time: simulation window
- bandwidth: link bandwidth baseline
- delay: link delay baseline
- enable_retransmission, rtx_timeout_ms, max_retransmissions
- enable_profiling, enable_parallel_routing
- max_nodes
The backend can override these values per run.
Reads config/config.txt and returns parsed key/value pairs.
Example:
curl http://localhost:3000/configRuns the C++ simulator.
Request body:
{
"configOverrides": {
"nodes": 200,
"topology": "tree",
"traffic_type": "constant",
"rate": 5,
"packet_size": 512,
"simulation_time": 30,
"source": 0,
"destination": 199
},
"topology": "0 1 2\n1 2 3\n2 3 1"
}topology is optional and uses line format:
u v w
Response includes simulation metrics, events, console log tail/full, and topology edge data.
Runs build/analysis-tool for shortest path and MST analysis.
Request body:
{
"nodeCount": 5,
"source": 0,
"dest": 4,
"edges": [
{ "from": 0, "to": 1, "weight": 2 },
{ "from": 1, "to": 4, "weight": 5 },
{ "from": 0, "to": 2, "weight": 1 }
]
}Response includes:
- shortest_path
- mst_path
- kruskal
- prim
- complexity
- bfs_distance
- bellman_ford_no_neg_cycle
Useful Makefile targets:
make
make debug
make release
make clean
make rebuild
make run
make run-debug
make helpGenerated during runs:
- data_output/result.json
- data_output/topology_edges.json (when exported)
- simulation_console.log
- simulation_events.csv
- simulation_events.log
- Backend fails with missing binary
- Run: make release
- Confirm files exist in build/.
- Frontend cannot reach backend
- Verify backend is running on port 3000.
- Check browser console/network tab.
- Port conflicts
- npm run dev attempts to free ports 3000/5173/5174/5175 first.
- If needed, manually stop stale processes.
- Empty or malformed analysis response
- Ensure build/analysis-tool exists.
- Ensure /analyze edges payload uses valid node indices and weights.
- Backend server is currently designed around backend/server.js and native binaries.
- Frontend algorithm panels rely on /analyze for authoritative C++ results.
- Source and destination should be kept consistent between simulation and analysis flows.
ISC (see package.json).