# jergensturdley/analyst-toolkit-main architecture

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

- Interactive diagram: https://gitdiagram.com/jergensturdley/analyst-toolkit-main
- Repository: https://github.com/jergensturdley/analyst-toolkit-main

## Overview

SOC Analyst Toolkit is a local-first browser extension for SOC investigation. Analysts select alert text or enter it in the popup; the toolkit extracts and organizes IOCs, then supports graph-based enrichment and OSINT lookups. The popup also provides triage utilities, snippets, exports, and AI-prompt preparation, while the background worker handles browser actions and provider requests. The graph reflects the documented capabilities; some popup-to-background event wiring is not shown in the excerpts, so those links are marked unverified.

Main entry points: [`popup.js`](https://github.com/jergensturdley/analyst-toolkit-main/blob/main/popup.js) (Analysis Popup), [`background.js`](https://github.com/jergensturdley/analyst-toolkit-main/blob/main/background.js) (Context Menu Actions), [`content.js`](https://github.com/jergensturdley/analyst-toolkit-main/blob/main/content.js) (Page Highlights and Snippets), [`triage_prompt.js`](https://github.com/jergensturdley/analyst-toolkit-main/blob/main/triage_prompt.js) (AI Triage Prompt)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["IOC Investigation"]
  node_popup["Analysis Popup<br/>[popup.js]"]
  node_ioc_detection["IOC Detection<br/>[popup.js]"]
  node_domain_validation["Domain Validation<br/>[tlds.js]"]
  node_ioc_results["IOC Results and Graph<br/>[popup.js]"]
end

subgraph group_providers["Enrichment and OSINT"]
  node_agent_enrichment["Agent Enrichment<br/>[background.js]"]
  node_osint_links["OSINT Lookups<br/>[popup.js]"]
  node_threat_services{{"Threat Intelligence Providers"}}
end

subgraph group_productivity["Analyst Productivity"]
  node_triage_tools["Triage Utilities<br/>[popup.js]"]
  node_snippet_library["Snippet Library<br/>[popup.js]"]
  node_prompt_builder["AI Triage Prompt<br/>[triage_prompt.js]"]
end

subgraph group_extension["Browser Extension"]
  node_browser_storage[("Local Browser Storage")]
  node_context_actions["Context Menu Actions<br/>[background.js]"]
  node_page_features["Page Highlights and Snippets<br/>[content.js]"]
end

node_analyst(("SOC Analyst"))
node_webpage["Selected Alert Text"]
node_ai_chat{{"AI Chat Service"}}

node_analyst -->|"selects alert"| node_webpage
node_webpage -->|"opens analysis"| node_context_actions
node_analyst -->|"enters indicators"| node_popup
node_context_actions -->|"opens popup"| node_popup
node_popup -->|"analyzes text"| node_ioc_detection
node_ioc_detection -->|"validates domains"| node_domain_validation
node_ioc_detection -->|"presents indicators"| node_ioc_results
node_popup -->|"renders analysis"| node_ioc_results
node_ioc_results -.->|"requests enrichment"| node_agent_enrichment
node_agent_enrichment -->|"queries providers"| node_threat_services
node_ioc_results -->|"builds lookups"| node_osint_links
node_osint_links -->|"opens lookup"| node_threat_services
node_popup -->|"provides utilities"| node_triage_tools
node_popup -->|"manages snippets"| node_snippet_library
node_snippet_library -->|"reads and writes"| node_browser_storage
node_popup -->|"reads and writes"| node_browser_storage
node_popup -->|"formats triage prompt"| node_prompt_builder
node_prompt_builder -->|"opens chosen chat"| node_ai_chat
node_context_actions -.->|"sends page actions"| node_page_features
node_page_features -->|"loads snippets"| node_browser_storage
node_popup -.->|"requests highlighting"| node_page_features

click node_popup "https://github.com/jergensturdley/analyst-toolkit-main/blob/main/popup.js"
click node_ioc_detection "https://github.com/jergensturdley/analyst-toolkit-main/blob/main/popup.js"
click node_domain_validation "https://github.com/jergensturdley/analyst-toolkit-main/blob/main/tlds.js"
click node_ioc_results "https://github.com/jergensturdley/analyst-toolkit-main/blob/main/popup.js"
click node_agent_enrichment "https://github.com/jergensturdley/analyst-toolkit-main/blob/main/background.js"
click node_osint_links "https://github.com/jergensturdley/analyst-toolkit-main/blob/main/popup.js"
click node_triage_tools "https://github.com/jergensturdley/analyst-toolkit-main/blob/main/popup.js"
click node_snippet_library "https://github.com/jergensturdley/analyst-toolkit-main/blob/main/popup.js"
click node_prompt_builder "https://github.com/jergensturdley/analyst-toolkit-main/blob/main/triage_prompt.js"
click node_context_actions "https://github.com/jergensturdley/analyst-toolkit-main/blob/main/background.js"
click node_page_features "https://github.com/jergensturdley/analyst-toolkit-main/blob/main/content.js"

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_popup,node_ioc_detection,node_domain_validation,node_ioc_results toneBlue
class node_agent_enrichment,node_osint_links,node_threat_services toneAmber
class node_triage_tools,node_snippet_library,node_prompt_builder toneMint
class node_browser_storage,node_context_actions,node_page_features toneRose
class node_analyst,node_webpage,node_ai_chat toneIndigo
```

## Components

### IOC Investigation

- [Analysis Popup](https://github.com/jergensturdley/analyst-toolkit-main/blob/main/popup.js): `popup.js`
- [IOC Detection](https://github.com/jergensturdley/analyst-toolkit-main/blob/main/popup.js): `popup.js`
- [Domain Validation](https://github.com/jergensturdley/analyst-toolkit-main/blob/main/tlds.js): `tlds.js`
- [IOC Results and Graph](https://github.com/jergensturdley/analyst-toolkit-main/blob/main/popup.js): `popup.js`

### Enrichment and OSINT

- [Agent Enrichment](https://github.com/jergensturdley/analyst-toolkit-main/blob/main/background.js): `background.js`
- [OSINT Lookups](https://github.com/jergensturdley/analyst-toolkit-main/blob/main/popup.js): `popup.js`
- **Threat Intelligence Providers**

### Analyst Productivity

- [Triage Utilities](https://github.com/jergensturdley/analyst-toolkit-main/blob/main/popup.js): `popup.js`
- [Snippet Library](https://github.com/jergensturdley/analyst-toolkit-main/blob/main/popup.js): `popup.js`
- [AI Triage Prompt](https://github.com/jergensturdley/analyst-toolkit-main/blob/main/triage_prompt.js): `triage_prompt.js`

### Browser Extension

- **Local Browser Storage**
- [Context Menu Actions](https://github.com/jergensturdley/analyst-toolkit-main/blob/main/background.js): `background.js`
- [Page Highlights and Snippets](https://github.com/jergensturdley/analyst-toolkit-main/blob/main/content.js): `content.js`

### Other components

- **SOC Analyst**
- **Selected Alert Text**
- **AI Chat Service**

## Connections

- SOC Analyst → Selected Alert Text: selects alert (evidence: `README.md`)
- Selected Alert Text → Context Menu Actions: opens analysis (evidence: `README.md`)
- SOC Analyst → Analysis Popup: enters indicators (evidence: `README.md`)
- Context Menu Actions → Analysis Popup: opens popup (evidence: `README.md`)
- Analysis Popup → IOC Detection: analyzes text (evidence: `README.md`)
- IOC Detection → Domain Validation: validates domains (evidence: `popup.js`)
- IOC Detection → IOC Results and Graph: presents indicators (evidence: `README.md`)
- Analysis Popup → IOC Results and Graph: renders analysis (evidence: `README.md`)
- IOC Results and Graph → Agent Enrichment: requests enrichment (evidence: `README.md`)
- Agent Enrichment → Threat Intelligence Providers: queries providers (evidence: `background.js`)
- IOC Results and Graph → OSINT Lookups: builds lookups (evidence: `popup.js`)
- OSINT Lookups → Threat Intelligence Providers: opens lookup (evidence: `README.md`)
- Analysis Popup → Triage Utilities: provides utilities (evidence: `README.md`)
- Analysis Popup → Snippet Library: manages snippets (evidence: `README.md`)
- Snippet Library → Local Browser Storage: reads and writes
- Analysis Popup → Local Browser Storage: reads and writes (evidence: `popup.js`)
- Analysis Popup → AI Triage Prompt: formats triage prompt (evidence: `README.md`)
- AI Triage Prompt → AI Chat Service: opens chosen chat (evidence: `README.md`)
- Context Menu Actions → Page Highlights and Snippets: sends page actions
- Page Highlights and Snippets → Local Browser Storage: loads snippets (evidence: `content.js`)
- Analysis Popup → Page Highlights and Snippets: requests highlighting
