# tomtimlt/jev-soc architecture

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

- Interactive diagram: https://gitdiagram.com/tomtimlt/jev-soc
- Repository: https://github.com/tomtimlt/jev-soc

## Overview

Jev-SOC is a shadow-mode Wazuh alert triage system: it normalizes alerts, correlates related activity, summarizes clusters, obtains typed model decisions, and derives analyst actions without changing or blocking alerts. Its live replay/demo and offline evaluation are distinct product workflows. The graph follows documented behavior and indexed module references; detailed live orchestration and UI internals were not excerpted, so those links rely on README statements where available.

Main entry points: [`src/jevsoc/live.py`](https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/live.py) (Live engine), [`eval/eval.py`](https://github.com/tomtimlt/jev-soc/blob/main/eval/eval.py) (Evaluation runner), [`scripts/demo.py`](https://github.com/tomtimlt/jev-soc/blob/main/scripts/demo.py) (Demo runner), [`src/jevsoc/backends/jev_backend.py`](https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/backends/jev_backend.py) (Decision backend)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_triage["Alert triage"]
  node_live["Live engine<br/>[live.py]"]
  node_collector["Alert normalization<br/>[collector.py]"]
  node_correlator["Activity correlator<br/>[correlator.py]"]
  node_serializer["Cluster summary<br/>[serializer.py]"]
end

subgraph group_decision["Decision engine"]
  node_backend["Decision backend<br/>[jev_backend.py]"]
  node_typed_decision["Typed decisions<br/>[models.py]"]
  node_policy["Action policy<br/>[policy.py]"]
  node_calibration["Probability calibration<br/>[calibration.py]"]
end

subgraph group_analyst["Analyst experience"]
  node_demo_runner["Demo runner<br/>[demo.py]"]
  node_naming["Activity naming<br/>[naming.py]"]
  node_demo_ui["SOC demo views<br/>[index.html]"]
end

subgraph group_evaluation["Evaluation"]
  node_eval_data["Labeled clusters"]
  node_eval_runner["Evaluation runner<br/>[eval.py]"]
  node_metrics["Evaluation metrics<br/>[metrics.py]"]
  node_results["Evaluation results"]
end

node_wazuh(("Wazuh alerts"))
node_analyst_user(("SOC analyst"))
node_jev_service{{"TypeSafe API"}}

node_wazuh -->|"supplies alerts"| node_demo_runner
node_demo_runner -->|"runs live engine"| node_live
node_live -->|"normalizes alerts"| node_collector
node_live -->|"updates clusters"| node_correlator
node_live -->|"builds summaries"| node_serializer
node_live -->|"derives actions"| node_policy
node_live -->|"names activities"| node_naming
node_demo_runner -->|"selects backend"| node_backend
node_backend -->|"requests judgment"| node_jev_service
node_backend -->|"returns decision"| node_typed_decision
node_policy -->|"calibrates probability"| node_calibration
node_demo_runner -->|"serves demo"| node_demo_ui
node_demo_ui -->|"presents findings"| node_analyst_user
node_eval_data -->|"provides clusters"| node_eval_runner
node_eval_runner -->|"builds selected backend"| node_backend
node_eval_runner -->|"derives actions"| node_policy
node_eval_runner -->|"loads calibration"| node_calibration
node_eval_runner -->|"computes metrics"| node_metrics
node_eval_runner -->|"writes report"| node_results

click node_live "https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/live.py"
click node_collector "https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/collector.py"
click node_correlator "https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/correlator.py"
click node_serializer "https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/serializer.py"
click node_demo_runner "https://github.com/tomtimlt/jev-soc/blob/main/scripts/demo.py"
click node_backend "https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/backends/jev_backend.py"
click node_typed_decision "https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/models.py"
click node_policy "https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/policy.py"
click node_calibration "https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/calibration.py"
click node_naming "https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/naming.py"
click node_demo_ui "https://github.com/tomtimlt/jev-soc/blob/main/demo/index.html"
click node_eval_data "https://github.com/tomtimlt/jev-soc/tree/main/data/ait"
click node_eval_runner "https://github.com/tomtimlt/jev-soc/blob/main/eval/eval.py"
click node_metrics "https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/metrics.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_live,node_collector,node_correlator,node_serializer toneBlue
class node_backend,node_typed_decision,node_policy,node_calibration toneAmber
class node_demo_runner,node_naming,node_demo_ui,node_jev_service toneMint
class node_eval_data,node_eval_runner,node_metrics,node_results toneRose
class node_wazuh,node_analyst_user toneIndigo
```

## Components

### Alert triage

- [Live engine](https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/live.py): `src/jevsoc/live.py`
- [Alert normalization](https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/collector.py): `src/jevsoc/collector.py`
- [Activity correlator](https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/correlator.py): `src/jevsoc/correlator.py`
- [Cluster summary](https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/serializer.py): `src/jevsoc/serializer.py`

### Decision engine

- [Decision backend](https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/backends/jev_backend.py): `src/jevsoc/backends/jev_backend.py`
- [Typed decisions](https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/models.py): `src/jevsoc/models.py`
- [Action policy](https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/policy.py): `src/jevsoc/policy.py`
- [Probability calibration](https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/calibration.py): `src/jevsoc/calibration.py`

### Analyst experience

- [Demo runner](https://github.com/tomtimlt/jev-soc/blob/main/scripts/demo.py): `scripts/demo.py`
- [Activity naming](https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/naming.py): `src/jevsoc/naming.py`
- [SOC demo views](https://github.com/tomtimlt/jev-soc/blob/main/demo/index.html): `demo/index.html`

### Evaluation

- [Labeled clusters](https://github.com/tomtimlt/jev-soc/tree/main/data/ait): `data/ait`
- [Evaluation runner](https://github.com/tomtimlt/jev-soc/blob/main/eval/eval.py): `eval/eval.py`
- [Evaluation metrics](https://github.com/tomtimlt/jev-soc/blob/main/src/jevsoc/metrics.py): `src/jevsoc/metrics.py`
- **Evaluation results**

### Other components

- **Wazuh alerts**
- **SOC analyst**
- **TypeSafe API**

## Connections

- Wazuh alerts → Demo runner: supplies alerts (evidence: `README.md`)
- Demo runner → Live engine: runs live engine (evidence: `README.md`)
- Live engine → Alert normalization: normalizes alerts (evidence: `src/jevsoc/live.py`)
- Live engine → Activity correlator: updates clusters (evidence: `src/jevsoc/live.py`)
- Live engine → Cluster summary: builds summaries (evidence: `src/jevsoc/live.py`)
- Live engine → Action policy: derives actions (evidence: `src/jevsoc/live.py`)
- Live engine → Activity naming: names activities (evidence: `src/jevsoc/live.py`)
- Demo runner → Decision backend: selects backend (evidence: `scripts/demo.py`)
- Decision backend → TypeSafe API: requests judgment (evidence: `src/jevsoc/backends/jev_backend.py`)
- Decision backend → Typed decisions: returns decision (evidence: `src/jevsoc/backends/jev_backend.py`)
- Action policy → Probability calibration: calibrates probability (evidence: `src/jevsoc/policy.py`)
- Demo runner → SOC demo views: serves demo (evidence: `README.md`)
- SOC demo views → SOC analyst: presents findings (evidence: `README.md`)
- Labeled clusters → Evaluation runner: provides clusters (evidence: `README.md`)
- Evaluation runner → Decision backend: builds selected backend (evidence: `eval/eval.py`)
- Evaluation runner → Action policy: derives actions (evidence: `eval/eval.py`)
- Evaluation runner → Probability calibration: loads calibration (evidence: `eval/eval.py`)
- Evaluation runner → Evaluation metrics: computes metrics (evidence: `eval/eval.py`)
- Evaluation runner → Evaluation results: writes report (evidence: `eval/eval.py`)
