This document explains how to run the Network Performance Monitor frontend with the simulation mode, which generates realistic network performance data without requiring access to real hardware.
Simulation mode uses the SimulationService to generate realistic network performance data with natural fluctuations instead of collecting actual metrics from your system. This is useful for testing the frontend without requiring specific hardware access.
The easiest way to run the frontend with simulation mode is to use the dedicated scripts:
run_simulation.batThis script will:
- Set up the environment with
SIMULATION_MODE=true - Install dependencies for both backend and frontend
- Start the backend API in simulation mode on port 8000
- Start the frontend on port 3000
chmod +x run_simulation.sh
./run_simulation.shThis script will:
- Set up the environment with
SIMULATION_MODE=true - Install dependencies for both backend and frontend
- Start the backend API in simulation mode on port 8000
- Start the frontend on port 3000
You can also use the existing run scripts with the simulation environment variable:
set SIMULATION_MODE=true
run.batSIMULATION_MODE=true ./run.shIf you prefer to start components manually:
-
First, set the environment variable:
- Windows:
set SIMULATION_MODE=true - Linux/macOS:
export SIMULATION_MODE=true
- Windows:
-
In a terminal, start the backend API:
cd backend/api python -m uvicorn main:app --host 127.0.0.1 --port 8000 --reload -
In a new terminal, start the frontend:
cd frontend/app1 npm run dev
Once both the backend and frontend are running, the frontend will be available at:
- Frontend: http://127.0.0.1:3000
- Backend API: http://127.0.0.1:8000
The frontend will connect to the simulated backend and display realistic network performance metrics without requiring access to actual network hardware.