Scaffold for a network intrusion detection and response platform.
ml-pipeline/- offline model training and artifact generationcapture-agent/- live packet capture and feature extraction on monitored machinesbackend/- FastAPI service for ingestion, alerts, and dashboard APIsfrontend/- React dashboard for incidents and live telemetry
This repository is scaffolded into separate services, so you can run each part independently or bring the stack up with Docker.
Use the ML pipeline to train the model and generate artifacts.
cd ml-pipeline
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
jupyter notebook notebooks/train_model.ipynbPlace the CICIDS2017 CSV files in ml-pipeline/data/cicids2017/, then save the trained artifacts to ml-pipeline/output/.
The capture agent runs on the monitored machine.
cd capture-agent
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
python agent.pySet any runtime values in capture-agent/.env before starting the agent.
The backend is a FastAPI app.
cd backend
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --reload --host 0.0.0.0 --port 8000Set environment values in backend/.env before running the server.
The dashboard is a Vite React app.
cd frontend
npm install
npm run devIf needed, set VITE_API_BASE_URL to point to the backend.
If you want the backend, frontend, PostgreSQL, and Redis containers together:
docker compose up --buildThe default ports in the scaffold are:
- Frontend:
http://localhost:3000 - Backend:
http://localhost:8000 - PostgreSQL:
localhost:5432 - Redis:
localhost:6379