CipherNet IDS is a full-stack intrusion detection demo built with a React frontend and a FastAPI backend. The UI simulates a secure messaging and monitoring console with chat, IDS alerts, logs, and network activity views, while the backend serves trained machine-learning models for detection and severity scoring.
src/contains the React application and interface tabs.backend/contains the FastAPI service that exposes model metadata and prediction endpoints.ml/contains dataset loading, model training, and exported artifacts.ml/artifacts/current/stores the currently deployed model bundle used by the API.
- Node.js 18+ and npm
- Python 3.10+ with
pip - A virtual environment named
venvat the project root - The dataset used for training should be downloaded from Kaggle
Install the frontend dependencies:
npm installCreate and activate a Python virtual environment, then install the backend dependencies:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtStart the backend API first:
npm run backendThis launches the FastAPI server on http://127.0.0.1:8000.
In a second terminal, start the frontend:
npm run devVite will print the local URL, usually http://localhost:5173.
If you want to regenerate the model artifacts, run:
npm run train:idsThis command trains the available models from the dataset matched by ml.train and writes the winning artifact to ml/artifacts/current/.
The frontend reads the backend URL from VITE_IDS_API_URL. If it is not set, the app uses http://127.0.0.1:8000 by default.
- View secure chat sessions and encrypted message activity.
- Inspect IDS alerts generated from rule-based and model-based detection.
- Watch live network event activity in the network panel.
- Check model availability and prediction details through the backend API.
- The backend expects trained artifacts in
ml/artifacts/current/. - If the model is missing, the API will return a message prompting you to run the training command first.