# antobenedict2006/keylogger architecture

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

- Interactive diagram: https://gitdiagram.com/antobenedict2006/keylogger
- Repository: https://github.com/antobenedict2006/keylogger

## Overview

This Windows keylogger-detection product continuously inspects running processes, derives behavioral features, scores threats, and presents alerts and history for user action. A separate behavioral-biometrics capability learns keyboard and mouse baselines and reports deviations; the README describes multimodal fusion and JSON exports. The dashboard excerpt shows database-backed history queries and feature extraction, while the source index identifies additional module references. The entry point and several core modules were not excerpted, so some documented workflow links rely on README statements rather than inspected calls.

Main entry points: [`src/ui/dashboard.py`](https://github.com/antobenedict2006/keylogger/blob/main/src/ui/dashboard.py) (Desktop Dashboard), [`src/monitor.py`](https://github.com/antobenedict2006/keylogger/blob/main/src/monitor.py) (Process Monitor), [`src/feature_extractor.py`](https://github.com/antobenedict2006/keylogger/blob/main/src/feature_extractor.py) (Feature Extraction), [`src/classifier.py`](https://github.com/antobenedict2006/keylogger/blob/main/src/classifier.py) (Threat Classifier)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_detection["Threat Detection"]
  node_monitor["Process Monitor<br/>[monitor.py]"]
  node_features["Feature Extraction"]
  node_classifier["Threat Classifier<br/>[classifier.py]"]
  node_indicators["Indicator Translation"]
  node_alerts["Alert Actions<br/>[alert_manager.py]"]
  node_trainer["Model Training<br/>[train_model.py]"]
end

subgraph group_behavior["Behavioral Biometrics"]
  node_behavior["Behavioral Analyzer"]
end

subgraph group_interface["User Interface"]
  node_app["Application Entry<br/>[main.py]"]
  node_liveapi["Live API<br/>[live_api.py]"]
  node_dashboard["Desktop Dashboard<br/>[dashboard.py]"]
end

subgraph group_persistence["State and Configuration"]
  node_database[("Detection Database<br/>[db_logger.py]")]
  node_paths["Path Resolution<br/>[paths.py]"]
end

node_user(("Windows User"))
node_external{{"Windows System"}}

node_user -->|"starts"| node_app
node_app -.->|"starts monitoring"| node_monitor
node_monitor -->|"scans processes"| node_external
node_monitor -->|"supplies snapshots"| node_features
node_features -->|"provides features"| node_classifier
node_classifier -.->|"creates detections"| node_alerts
node_dashboard -.->|"shows live results"| node_monitor
node_dashboard -->|"queries history"| node_database
node_dashboard -->|"extracts features"| node_features
node_dashboard -->|"offers responses"| node_alerts
node_dashboard -->|"offers training"| node_trainer
node_behavior -->|"tracks input dynamics"| node_external
node_behavior -.->|"stores behavioral records"| node_database
node_dashboard -->|"presents deviations"| node_behavior
node_dashboard -.->|"references API"| node_liveapi
node_trainer -->|"uses feature schema"| node_features
node_classifier -->|"resolves model paths"| node_paths
node_database -->|"resolves database path"| node_paths
node_dashboard -.->|"translates indicators"| node_indicators

click node_app "https://github.com/antobenedict2006/keylogger/blob/main/main.py"
click node_monitor "https://github.com/antobenedict2006/keylogger/blob/main/src/monitor.py"
click node_features "https://github.com/antobenedict2006/keylogger/blob/main/src/feature_extractor.py"
click node_classifier "https://github.com/antobenedict2006/keylogger/blob/main/src/classifier.py"
click node_indicators "https://github.com/antobenedict2006/keylogger/blob/main/src/indicator_translator.py"
click node_alerts "https://github.com/antobenedict2006/keylogger/blob/main/src/alert_manager.py"
click node_behavior "https://github.com/antobenedict2006/keylogger/blob/main/src/behavioral_analyzer.py"
click node_trainer "https://github.com/antobenedict2006/keylogger/blob/main/tools/train_model.py"
click node_liveapi "https://github.com/antobenedict2006/keylogger/blob/main/src/live_api.py"
click node_dashboard "https://github.com/antobenedict2006/keylogger/blob/main/src/ui/dashboard.py"
click node_database "https://github.com/antobenedict2006/keylogger/blob/main/src/db_logger.py"
click node_paths "https://github.com/antobenedict2006/keylogger/blob/main/src/paths.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_monitor,node_features,node_classifier,node_indicators,node_alerts,node_trainer,node_user toneBlue
class node_behavior toneAmber
class node_app,node_liveapi,node_dashboard toneMint
class node_database,node_paths toneRose
class node_external toneIndigo
```

## Components

### Threat Detection

- [Process Monitor](https://github.com/antobenedict2006/keylogger/blob/main/src/monitor.py): `src/monitor.py`
- [Feature Extraction](https://github.com/antobenedict2006/keylogger/blob/main/src/feature_extractor.py): `src/feature_extractor.py`
- [Threat Classifier](https://github.com/antobenedict2006/keylogger/blob/main/src/classifier.py): `src/classifier.py`
- [Indicator Translation](https://github.com/antobenedict2006/keylogger/blob/main/src/indicator_translator.py): `src/indicator_translator.py`
- [Alert Actions](https://github.com/antobenedict2006/keylogger/blob/main/src/alert_manager.py): `src/alert_manager.py`
- [Model Training](https://github.com/antobenedict2006/keylogger/blob/main/tools/train_model.py): `tools/train_model.py`

### Behavioral Biometrics

- [Behavioral Analyzer](https://github.com/antobenedict2006/keylogger/blob/main/src/behavioral_analyzer.py): `src/behavioral_analyzer.py`

### User Interface

- [Application Entry](https://github.com/antobenedict2006/keylogger/blob/main/main.py): `main.py`
- [Live API](https://github.com/antobenedict2006/keylogger/blob/main/src/live_api.py): `src/live_api.py`
- [Desktop Dashboard](https://github.com/antobenedict2006/keylogger/blob/main/src/ui/dashboard.py): `src/ui/dashboard.py`

### State and Configuration

- [Detection Database](https://github.com/antobenedict2006/keylogger/blob/main/src/db_logger.py): `src/db_logger.py`
- [Path Resolution](https://github.com/antobenedict2006/keylogger/blob/main/src/paths.py): `src/paths.py`

### Other components

- **Windows User**
- **Windows System**

## Connections

- Windows User → Application Entry: starts (evidence: `README.md`)
- Application Entry → Process Monitor: starts monitoring
- Process Monitor → Windows System: scans processes (evidence: `src/monitor.py`)
- Process Monitor → Feature Extraction: supplies snapshots (evidence: `README.md`)
- Feature Extraction → Threat Classifier: provides features (evidence: `README.md`)
- Threat Classifier → Alert Actions: creates detections
- Desktop Dashboard → Process Monitor: shows live results (evidence: `src/ui/dashboard.py`)
- Desktop Dashboard → Detection Database: queries history (evidence: `src/ui/dashboard.py`)
- Desktop Dashboard → Feature Extraction: extracts features (evidence: `src/ui/dashboard.py`)
- Desktop Dashboard → Alert Actions: offers responses (evidence: `README.md`)
- Desktop Dashboard → Model Training: offers training (evidence: `src/ui/dashboard.py`)
- Behavioral Analyzer → Windows System: tracks input dynamics (evidence: `README.md`)
- Behavioral Analyzer → Detection Database: stores behavioral records
- Desktop Dashboard → Behavioral Analyzer: presents deviations (evidence: `README.md`)
- Desktop Dashboard → Live API: references API (evidence: `src/ui/dashboard.py`)
- Model Training → Feature Extraction: uses feature schema (evidence: `tools/train_model.py`)
- Threat Classifier → Path Resolution: resolves model paths (evidence: `src/classifier.py`)
- Detection Database → Path Resolution: resolves database path (evidence: `src/db_logger.py`)
- Desktop Dashboard → Indicator Translation: translates indicators (evidence: `src/ui/dashboard.py`)
