Skip to content

Tridib2510/networksecurity

Repository files navigation

🔐 Network Security System

An end-to-end Machine Learning project for detecting malicious / phishing URLs and strengthening network security.
This project covers the full ML lifecycle — data ingestion, preprocessing, model training, experiment tracking with MLflow, deployment using FastAPI + Uvicorn, and containerization with Docker.


🚀 Features

  • Data ingestion & preprocessing pipeline for URL/network data
  • ML model training with Scikit-learn & experiment tracking via MLflow
  • End-to-end pipeline orchestration
  • REST API deployment using FastAPI + Uvicorn
  • Docker support for containerized deployment
  • Interactive Swagger UI at /docs

📂 Project Structure


networksecurity/
│── networksecurity/        # Core Python package (pipelines, utils, trainer, etc.)
│── templates/              # FastAPI Jinja2 templates
│── Artifacts/              # Generated pipeline artifacts (ignored in .gitignore)
│── final\_model/            # Trained model + preprocessor (ignored in .gitignore)
│── mlruns/                 # MLflow experiment logs
│── valid\_data/             # Validation dataset
│── app.py                  # FastAPI app
│── main.py                 # API entrypoint
│── push\_data.py            # Script to push sample data into the pipeline
│── requirements.txt        # Project dependencies
│── Dockerfile              # Containerization setup
│── setup.py                # Package setup file


⚡ Quickstart

1️⃣ Clone the repository

git clone https://github.com/Tridib2510/networksecurity.git
cd networksecurity

2️⃣ Create virtual environment & install dependencies

python -m venv venv
source venv/bin/activate   # (Linux/Mac)
venv\Scripts\activate      # (Windows)

pip install --upgrade pip
pip install -r requirements.txt

3️⃣ Run the API

uvicorn main:app --reload

4️⃣ Run with Docker (optional)

docker build -t networksecurity .
docker run -p 8000:8000 networksecurity

📊 MLflow Tracking

  • All experiment runs and metrics are logged under mlruns/.
  • You can start the MLflow UI with:
mlflow ui

Open http://127.0.0.1:5000 to view experiments.


🛠 Tech Stack

  • Python 3.11
  • FastAPI + Uvicorn
  • Scikit-learn
  • Pandas / NumPy
  • MLflow
  • Docker

🧪 Example Usage

import requests

url = "http://127.0.0.1:8000/predict"
data = {"url": "http://phishing-example.com"}

response = requests.post(url, json=data)
print(response.json())

📜 License

This project is licensed under the MIT License. Feel free to use, modify, and distribute with attribution.


👨‍💻 Author

Tridib Roy Chowdhury 🔗 LinkedIn | GitHub


👉 This README is structured, professional, and recruiter/colleague-friendly.

Would you like me to also make a badges section (Python, FastAPI, Docker, MLflow, etc.) at the top of the README so it looks more polished on GitHub?



About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages