Skip to content

drashya7405/nis-project

Repository files navigation

CipherNet IDS

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.

Project Structure

  • 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.

Requirements

  • Node.js 18+ and npm
  • Python 3.10+ with pip
  • A virtual environment named venv at the project root
  • The dataset used for training should be downloaded from Kaggle

Setup

Install the frontend dependencies:

npm install

Create and activate a Python virtual environment, then install the backend dependencies:

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Run the Project

Start the backend API first:

npm run backend

This launches the FastAPI server on http://127.0.0.1:8000.

In a second terminal, start the frontend:

npm run dev

Vite will print the local URL, usually http://localhost:5173.

Optional: Train the IDS Model

If you want to regenerate the model artifacts, run:

npm run train:ids

This command trains the available models from the dataset matched by ml.train and writes the winning artifact to ml/artifacts/current/.

Configuration

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.

What You Can Do

  • 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.

Notes

  • 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors