A web-based interactive network simulator that visualizes how packets move through a network of routers.
Built with Flask (backend) and React + ForceGraph2D (frontend).
👉 Live Demo: router-simulator-omega.vercel.app
- Dynamic, randomly generated network graph (20 routers)
- Real-time packet routing visualization
- Animated packet movement along shortest paths
- Shortest path computation using Dijkstra’s algorithm
- Adjustable source and destination nodes via dropdowns
- Edge weights displayed directly on links
- Responsive graph layout with zoom controls
- Flask REST API for network topology and routing data
| Layer | Technology |
|---|---|
| Frontend | React, ForceGraph2D, JavaScript, CSS |
| Backend | Python, Flask, Flask-CORS |
| Deployment | Render (API), Vercel (Frontend) |
cd backend
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txt
python app.pyBackend runs on http://127.0.0.1:5000
cd frontend
npm install
npm startFrontend runs on http://localhost:3000
| Endpoint | Method | Description |
|---|---|---|
/api/topology |
GET | Returns all routers and links in JSON |
/api/route |
POST | Returns optimal path for given source/destination using Dijkstra's algorithm |
{
"src": "R1",
"dest": "R12",
"payload": "Hello"
}{
"path": ["R1", "R5", "R9", "R12"],
"delivered": true
}- Dynamic topology editing (add/remove routers live)
- Real-time congestion simulation
- Dijkstra and Bellman-Ford algorithm comparison mode