# cybersight-security/global-threat-map architecture

> Architecture diagram of the GitHub repository cybersight-security/global-threat-map, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cybersight-security/global-threat-map
- Repository: https://github.com/cybersight-security/global-threat-map

## Overview

Global Threat Map combines a FireHOL list refresh tool with a browser visualization. Users choose a threat category; the page loads IP data, requests geolocation, and renders mapped pings, hover details, statistics, and an activity feed. It also draws explicitly simulated attack paths. The source excerpts support the fetcher’s downloads and JSON outputs and the frontend’s loading, geolocation, rendering, and animation behavior. Map topology data and some UI wiring are not shown in the excerpts, so those connections are omitted.

Main entry points: [`js/script.js`](https://github.com/cybersight-security/global-threat-map/blob/main/js/script.js) (Visualization controller), [`tools/FireHOL-List-Fetcher.py`](https://github.com/cybersight-security/global-threat-map/blob/main/tools/FireHOL-List-Fetcher.py) (List fetcher), [`index.html`](https://github.com/cybersight-security/global-threat-map/blob/main/index.html) (Map page), [`data`](https://github.com/cybersight-security/global-threat-map/tree/main/data) (Threat list JSON)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data_refresh["Threat data refresh"]
  node_fetcher["List fetcher"]
  node_feed_data[("Threat list JSON")]
  node_summary_data[("Threat summaries<br/>[details.json]")]
end

subgraph group_browser_experience["Browser visualization"]
  node_page["Map page<br/>[index.html]"]
  node_controller["Visualization controller<br/>[script.js]"]
  node_category["Dataset selection<br/>[script.js]"]
  node_stats["Threat statistics<br/>[script.js]"]
  node_styles["Responsive styling<br/>[styles.css]"]
end

subgraph group_geo_display["Geolocation and display"]
  node_geo_api["IP geolocation API"]
  node_geo_results["Geolocated threats<br/>[script.js]"]
  node_pings["Threat pings<br/>[script.js]"]
  node_tooltip["Hover details<br/>[script.js]"]
  node_activity["Activity feed<br/>[script.js]"]
  node_attack_paths["Simulated attack paths<br/>[script.js]"]
end

subgraph group_map_support["Map rendering support"]
  node_d3["D3 visualization library<br/>[d3.js]"]
  node_topojson["TopoJSON utilities<br/>[topojson.js]"]
end

node_operator(("Data maintainer"))
node_firehol[("FireHOL feeds")]
node_visitor(("Map visitor"))

node_operator -->|"runs refresh"| node_fetcher
node_fetcher -->|"downloads lists"| node_firehol
node_fetcher -->|"writes JSON"| node_feed_data
node_fetcher -->|"writes summary"| node_summary_data
node_visitor -->|"opens map"| node_page
node_page -.->|"loads script"| node_controller
node_controller -->|"handles selection"| node_category
node_controller -->|"fetches IP lists"| node_feed_data
node_controller -->|"reads counts"| node_summary_data
node_controller -->|"requests locations"| node_geo_api
node_controller -->|"processes results"| node_geo_results
node_controller -->|"updates counts"| node_stats
node_controller -->|"renders locations"| node_pings
node_pings -->|"shows details"| node_tooltip
node_controller -->|"adds detections"| node_activity
node_controller -->|"animates simulated paths"| node_attack_paths
node_controller -.->|"uses selections"| node_d3
node_controller -.->|"uses topology"| node_topojson
node_page -.->|"uses styles"| node_styles

click node_fetcher "https://github.com/cybersight-security/global-threat-map/blob/main/tools/FireHOL-List-Fetcher.py"
click node_feed_data "https://github.com/cybersight-security/global-threat-map/tree/main/data"
click node_summary_data "https://github.com/cybersight-security/global-threat-map/blob/main/assets/details.json"
click node_page "https://github.com/cybersight-security/global-threat-map/blob/main/index.html"
click node_controller "https://github.com/cybersight-security/global-threat-map/blob/main/js/script.js"
click node_category "https://github.com/cybersight-security/global-threat-map/blob/main/js/script.js"
click node_stats "https://github.com/cybersight-security/global-threat-map/blob/main/js/script.js"
click node_geo_results "https://github.com/cybersight-security/global-threat-map/blob/main/js/script.js"
click node_pings "https://github.com/cybersight-security/global-threat-map/blob/main/js/script.js"
click node_tooltip "https://github.com/cybersight-security/global-threat-map/blob/main/js/script.js"
click node_activity "https://github.com/cybersight-security/global-threat-map/blob/main/js/script.js"
click node_attack_paths "https://github.com/cybersight-security/global-threat-map/blob/main/js/script.js"
click node_d3 "https://github.com/cybersight-security/global-threat-map/blob/main/js/d3.js"
click node_topojson "https://github.com/cybersight-security/global-threat-map/blob/main/js/topojson.js"
click node_styles "https://github.com/cybersight-security/global-threat-map/blob/main/css/styles.css"

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_fetcher,node_feed_data,node_summary_data toneBlue
class node_page,node_controller,node_category,node_stats,node_styles,node_firehol toneAmber
class node_geo_api,node_geo_results,node_pings,node_tooltip,node_activity,node_attack_paths toneMint
class node_d3,node_topojson toneRose
class node_operator,node_visitor toneIndigo
```

## Components

### Threat data refresh

- [List fetcher](https://github.com/cybersight-security/global-threat-map/blob/main/tools/FireHOL-List-Fetcher.py): `tools/FireHOL-List-Fetcher.py`
- [Threat list JSON](https://github.com/cybersight-security/global-threat-map/tree/main/data): `data`
- [Threat summaries](https://github.com/cybersight-security/global-threat-map/blob/main/assets/details.json): `assets/details.json`

### Browser visualization

- [Map page](https://github.com/cybersight-security/global-threat-map/blob/main/index.html): `index.html`
- [Visualization controller](https://github.com/cybersight-security/global-threat-map/blob/main/js/script.js): `js/script.js`
- [Dataset selection](https://github.com/cybersight-security/global-threat-map/blob/main/js/script.js): `js/script.js`
- [Threat statistics](https://github.com/cybersight-security/global-threat-map/blob/main/js/script.js): `js/script.js`
- [Responsive styling](https://github.com/cybersight-security/global-threat-map/blob/main/css/styles.css): `css/styles.css`

### Geolocation and display

- **IP geolocation API**
- [Geolocated threats](https://github.com/cybersight-security/global-threat-map/blob/main/js/script.js): `js/script.js`
- [Threat pings](https://github.com/cybersight-security/global-threat-map/blob/main/js/script.js): `js/script.js`
- [Hover details](https://github.com/cybersight-security/global-threat-map/blob/main/js/script.js): `js/script.js`
- [Activity feed](https://github.com/cybersight-security/global-threat-map/blob/main/js/script.js): `js/script.js`
- [Simulated attack paths](https://github.com/cybersight-security/global-threat-map/blob/main/js/script.js): `js/script.js`

### Map rendering support

- [D3 visualization library](https://github.com/cybersight-security/global-threat-map/blob/main/js/d3.js): `js/d3.js`
- [TopoJSON utilities](https://github.com/cybersight-security/global-threat-map/blob/main/js/topojson.js): `js/topojson.js`

### Other components

- **Data maintainer**
- **FireHOL feeds**
- **Map visitor**

## Connections

- Data maintainer → List fetcher: runs refresh (evidence: `README.md`)
- List fetcher → FireHOL feeds: downloads lists (evidence: `tools/FireHOL-List-Fetcher.py`)
- List fetcher → Threat list JSON: writes JSON (evidence: `tools/FireHOL-List-Fetcher.py`)
- List fetcher → Threat summaries: writes summary (evidence: `tools/FireHOL-List-Fetcher.py`)
- Map visitor → Map page: opens map (evidence: `README.md`)
- Map page → Visualization controller: loads script
- Visualization controller → Dataset selection: handles selection (evidence: `js/script.js`)
- Visualization controller → Threat list JSON: fetches IP lists (evidence: `js/script.js`)
- Visualization controller → Threat summaries: reads counts (evidence: `js/script.js`)
- Visualization controller → IP geolocation API: requests locations (evidence: `js/script.js`)
- Visualization controller → Geolocated threats: processes results (evidence: `js/script.js`)
- Visualization controller → Threat statistics: updates counts (evidence: `js/script.js`)
- Visualization controller → Threat pings: renders locations (evidence: `js/script.js`)
- Threat pings → Hover details: shows details (evidence: `js/script.js`)
- Visualization controller → Activity feed: adds detections (evidence: `js/script.js`)
- Visualization controller → Simulated attack paths: animates simulated paths (evidence: `js/script.js`)
- Visualization controller → D3 visualization library: uses selections
- Visualization controller → TopoJSON utilities: uses topology
- Map page → Responsive styling: uses styles
