# abhee-adhee/network-ids architecture

> Architecture diagram of the GitHub repository abhee-adhee/network-ids, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abhee-adhee/network-ids
- Repository: https://github.com/abhee-adhee/network-ids

## Overview

This is a lightweight, interactive network IDS. Its evidenced runtime starts in main, prompts the user to select an interface, and captures packets through Scapy; the capture callback prints packet summaries. Parsing, detection, and logging are documented capabilities represented by repository modules, but the shown code does not connect them to capture. The detection implementation is a stub, and unsampled detector and logger behavior cannot be verified, so those relationships are omitted.

Main entry points: [`capture/engine.py`](https://github.com/abhee-adhee/network-ids/blob/master/capture/engine.py) (Packet Capture), [`main.py`](https://github.com/abhee-adhee/network-ids/blob/master/main.py) (IDS Entry Point)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Capture Runtime"]
  node_main["IDS Entry Point<br/>[main.py]"]
  node_capture["Packet Capture<br/>[engine.py]"]
end

subgraph group_analysis["Packet Analysis"]
  node_parser["Packet Parser<br/>[packet_parser.py]"]
  node_detection["Detection Engine<br/>[detector.py]"]
  node_rules["Detection Rules<br/>[rules.py]"]
end

subgraph group_operations["Configuration and Logs"]
  node_logger["Logging<br/>[logger.py]"]
  node_settings["IDS Settings<br/>[settings.py]"]
end

node_user(("Operator"))
node_scapy["Scapy Capture"]

node_user -->|"starts"| node_main
node_main -->|"starts capture"| node_capture
node_capture -->|"prompts interface"| node_user
node_capture -->|"captures packets"| node_scapy

click node_main "https://github.com/abhee-adhee/network-ids/blob/master/main.py"
click node_capture "https://github.com/abhee-adhee/network-ids/blob/master/capture/engine.py"
click node_parser "https://github.com/abhee-adhee/network-ids/blob/master/parser/packet_parser.py"
click node_detection "https://github.com/abhee-adhee/network-ids/blob/master/detector/detector.py"
click node_rules "https://github.com/abhee-adhee/network-ids/blob/master/detector/rules.py"
click node_logger "https://github.com/abhee-adhee/network-ids/blob/master/logger/logger.py"
click node_settings "https://github.com/abhee-adhee/network-ids/blob/master/config/settings.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_capture toneBlue
class node_parser,node_detection,node_rules toneAmber
class node_logger,node_settings toneMint
class node_user,node_scapy toneIndigo
```

## Components

### Capture Runtime

- [IDS Entry Point](https://github.com/abhee-adhee/network-ids/blob/master/main.py): `main.py`
- [Packet Capture](https://github.com/abhee-adhee/network-ids/blob/master/capture/engine.py): `capture/engine.py`

### Packet Analysis

- [Packet Parser](https://github.com/abhee-adhee/network-ids/blob/master/parser/packet_parser.py): `parser/packet_parser.py`
- [Detection Engine](https://github.com/abhee-adhee/network-ids/blob/master/detector/detector.py): `detector/detector.py`
- [Detection Rules](https://github.com/abhee-adhee/network-ids/blob/master/detector/rules.py): `detector/rules.py`

### Configuration and Logs

- [Logging](https://github.com/abhee-adhee/network-ids/blob/master/logger/logger.py): `logger/logger.py`
- [IDS Settings](https://github.com/abhee-adhee/network-ids/blob/master/config/settings.py): `config/settings.py`

### Other components

- **Operator**
- **Scapy Capture**

## Connections

- Operator → IDS Entry Point: starts (evidence: `README.md`)
- IDS Entry Point → Packet Capture: starts capture (evidence: `main.py`)
- Packet Capture → Operator: prompts interface (evidence: `capture/engine.py`)
- Packet Capture → Scapy Capture: captures packets (evidence: `capture/engine.py`)
