Lab-ready live packet capture (Python Scapy), FastAPI backend with JWT auth, and a React real-time dashboard (WebSocket push, charts, BPF filters, CSV export, preloader, login/signup).
- Python 3.11+
- Node.js 18+ (for the UI dev server)
- Windows: install Npcap (with WinPcap API compatibility) so Scapy can capture. Run the API as Administrator for live capture.
- Linux/macOS:
libpcapavailable; capture usually requiressudo/ elevated rights.
cd networkpulse-analyzer\backend
python -m pip install -r requirements.txt
python run.pyAPI: http://127.0.0.1:8000 · OpenAPI docs: http://127.0.0.1:8000/docs
Optional: copy .env.example to .env and set SECRET_KEY for production-like deployments.
cd networkpulse-analyzer\frontend
npm install
npm run devUI: http://127.0.0.1:5173 (proxies /api, including WebSockets, to the backend).
- Open the UI, complete Sign up, then you land on the dashboard.
- Pick a network interface, optionally set a BPF filter (e.g.
tcp port 443). - Click Start — packets stream into the table and charts in real time.
See DEPLOY.md for Render + Vercel, Docker, and notes on live capture in the cloud vs on your machine.
backend/— FastAPI, SQLAlchemy (async SQLite), Scapy sniffer thread, WebSocket broadcast.frontend/— Vite + React + TypeScript + Tailwind + Recharts + Framer Motion.
- “No libpcap provider” / empty interfaces: install Npcap (Windows) or libpcap; restart the terminal after installing Npcap.
- Permission errors on capture: run the backend process elevated (Administrator / sudo).
- WebSocket stuck on “Connecting”: ensure the backend is running and the UI is opened via the Vite dev server so
/apiproxies correctly (including/api/ws/live).
Suitable for Computer Networks coursework: demonstrates promiscuous capture concepts, BPF filtering, protocol identification (TCP/UDP/ICMP/DNS/ARP/IPv6), throughput estimation, and client/server real-time visualization.