# augustx-ln/authlens architecture

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

- Interactive diagram: https://gitdiagram.com/augustx-ln/authlens
- Repository: https://github.com/augustx-ln/authlens

## Overview

AuthLens is a browser-based security-log triage workspace with a separate optional local network-monitoring lab. In file analysis, an analyst selects or drops Windows EVTX and Linux log files; the browser passes them to the Rust/WASM analyzer, which parses events and produces findings for the report and its exports. In the live lab, traffic reaches the local Rust server, which records events and findings for the monitor. The excerpts do not show the frontend’s WASM/API wiring or the lab’s full route implementation, so those relationships are documented rather than inferred from imports.

Main entry points: [`crates/lab/src/main.rs`](https://github.com/augustx-ln/authlens/blob/main/crates/lab/src/main.rs) (Lab Server), [`web/src/App.tsx`](https://github.com/augustx-ln/authlens/blob/main/web/src/App.tsx) (File Workspace), [`web/src/LiveLab.tsx`](https://github.com/augustx-ln/authlens/blob/main/web/src/LiveLab.tsx) (Live Monitor), [`crates/analyzer/src/lib.rs`](https://github.com/augustx-ln/authlens/blob/main/crates/analyzer/src/lib.rs) (Auth Log Parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_file_ui["File Analysis"]
  node_file_workspace["File Workspace<br/>[App.tsx]"]
end

subgraph group_analysis_core["Analysis Core"]
  node_auth_parser["Auth Log Parser<br/>[lib.rs]"]
  node_finding_engine["Finding Engine<br/>[lib.rs]"]
  node_live_event_parser["Live EVTX Parser<br/>[lib.rs]"]
  node_evtx_encoder["EVTX Encoder<br/>[live_evtx.rs]"]
end

subgraph group_lab_runtime["Live Lab Runtime"]
  node_lab_server["Lab Server<br/>[main.rs]"]
  node_lab_state[("Event State<br/>[main.rs]")]
end

subgraph group_lab_ui["Live Lab Interface"]
  node_live_monitor["Live Monitor<br/>[LiveLab.tsx]"]
  node_activity_buckets["Activity Buckets<br/>[liveActivity.ts]"]
end

node_analyst(("Analyst"))
node_lab_target["Lab Target"]
node_lab_sensor["Host Sensor"]

node_analyst -->|"selects logs"| node_file_workspace
node_file_workspace -->|"analyzes files"| node_auth_parser
node_auth_parser -->|"derives findings"| node_finding_engine
node_auth_parser -->|"parses live records"| node_live_event_parser
node_file_workspace -->|"shows report"| node_analyst
node_file_workspace -->|"exports JSON/CSV"| node_analyst
node_lab_target -->|"sends requests"| node_lab_server
node_lab_sensor -->|"sends audit events"| node_lab_server
node_lab_server -->|"records activity"| node_lab_state
node_lab_server -->|"detects findings"| node_lab_state
node_lab_server -->|"provides live data"| node_live_monitor
node_analyst -->|"views monitor"| node_live_monitor
node_live_monitor -->|"builds chart buckets"| node_activity_buckets
node_lab_server -.->|"encodes export"| node_evtx_encoder
node_live_monitor -.->|"requests export"| node_lab_server
node_evtx_encoder -->|"creates recognized records"| node_live_event_parser

click node_file_workspace "https://github.com/augustx-ln/authlens/blob/main/web/src/App.tsx"
click node_auth_parser "https://github.com/augustx-ln/authlens/blob/main/crates/analyzer/src/lib.rs"
click node_finding_engine "https://github.com/augustx-ln/authlens/blob/main/crates/analyzer/src/lib.rs"
click node_live_event_parser "https://github.com/augustx-ln/authlens/blob/main/crates/analyzer/src/lib.rs"
click node_evtx_encoder "https://github.com/augustx-ln/authlens/blob/main/crates/analyzer/src/live_evtx.rs"
click node_lab_server "https://github.com/augustx-ln/authlens/blob/main/crates/lab/src/main.rs"
click node_lab_state "https://github.com/augustx-ln/authlens/blob/main/crates/lab/src/main.rs"
click node_live_monitor "https://github.com/augustx-ln/authlens/blob/main/web/src/LiveLab.tsx"
click node_activity_buckets "https://github.com/augustx-ln/authlens/blob/main/web/src/liveActivity.ts"

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_file_workspace toneBlue
class node_auth_parser,node_finding_engine,node_live_event_parser,node_evtx_encoder toneAmber
class node_lab_server,node_lab_state toneMint
class node_live_monitor,node_activity_buckets toneRose
class node_analyst,node_lab_target,node_lab_sensor toneIndigo
```

## Components

### File Analysis

- [File Workspace](https://github.com/augustx-ln/authlens/blob/main/web/src/App.tsx): `web/src/App.tsx`

### Analysis Core

- [Auth Log Parser](https://github.com/augustx-ln/authlens/blob/main/crates/analyzer/src/lib.rs): `crates/analyzer/src/lib.rs`
- [Finding Engine](https://github.com/augustx-ln/authlens/blob/main/crates/analyzer/src/lib.rs): `crates/analyzer/src/lib.rs`
- [Live EVTX Parser](https://github.com/augustx-ln/authlens/blob/main/crates/analyzer/src/lib.rs): `crates/analyzer/src/lib.rs`
- [EVTX Encoder](https://github.com/augustx-ln/authlens/blob/main/crates/analyzer/src/live_evtx.rs): `crates/analyzer/src/live_evtx.rs`

### Live Lab Runtime

- [Lab Server](https://github.com/augustx-ln/authlens/blob/main/crates/lab/src/main.rs): `crates/lab/src/main.rs`
- [Event State](https://github.com/augustx-ln/authlens/blob/main/crates/lab/src/main.rs): `crates/lab/src/main.rs`

### Live Lab Interface

- [Live Monitor](https://github.com/augustx-ln/authlens/blob/main/web/src/LiveLab.tsx): `web/src/LiveLab.tsx`
- [Activity Buckets](https://github.com/augustx-ln/authlens/blob/main/web/src/liveActivity.ts): `web/src/liveActivity.ts`

### Other components

- **Analyst**
- **Lab Target**
- **Host Sensor**

## Connections

- Analyst → File Workspace: selects logs (evidence: `web/src/App.tsx`)
- File Workspace → Auth Log Parser: analyzes files (evidence: `README.md`)
- Auth Log Parser → Finding Engine: derives findings (evidence: `crates/analyzer/src/lib.rs`)
- Auth Log Parser → Live EVTX Parser: parses live records (evidence: `crates/analyzer/src/lib.rs`)
- File Workspace → Analyst: shows report (evidence: `web/src/App.tsx`)
- File Workspace → Analyst: exports JSON/CSV (evidence: `web/src/App.tsx`)
- Lab Target → Lab Server: sends requests (evidence: `README.md`)
- Host Sensor → Lab Server: sends audit events (evidence: `README.md`)
- Lab Server → Event State: records activity (evidence: `crates/lab/src/main.rs`)
- Lab Server → Event State: detects findings (evidence: `crates/lab/src/main.rs`)
- Lab Server → Live Monitor: provides live data (evidence: `README.md`)
- Analyst → Live Monitor: views monitor (evidence: `README.md`)
- Live Monitor → Activity Buckets: builds chart buckets (evidence: `web/src/LiveLab.tsx`)
- Lab Server → EVTX Encoder: encodes export
- Live Monitor → Lab Server: requests export
- EVTX Encoder → Live EVTX Parser: creates recognized records (evidence: `README.md`)
