# pranith-jain/dfir-threat-intel-platform architecture

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

- Interactive diagram: https://gitdiagram.com/pranith-jain/dfir-threat-intel-platform
- Repository: https://github.com/pranith-jain/dfir-threat-intel-platform

## Overview

This is a Cloudflare Workers security platform with three product surfaces: DFIR analyst tools, live threat intelligence, and an MCP interface for agents; the portfolio is a secondary front door. A typical analyst workflow enters through the web app, reaches the API for lookups or intelligence, and receives results or generated reports. The README documents broad capabilities not represented by sampled code, so those appear as subsystem nodes. Edges are limited to documented relationships or visible imports/calls; unsampled implementations and wiring are not asserted.

Main entry points: [`api/src/index.ts`](https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/index.ts) (API routes), [`api/src/lib/report/pipeline.ts`](https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/lib/report/pipeline.ts) (Intel reports), [`worker/index.ts`](https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/worker/index.ts) (Worker router), [`api/src/routes`](https://github.com/pranith-jain/dfir-threat-intel-platform/tree/main/api/src/routes) (Live intel feeds)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_front["User surfaces"]
  node_web["Web application<br/>[App.tsx]"]
  node_dfir["DFIR toolkit"]
  node_intelui["Threat intel UI"]
end

subgraph group_edge["Edge runtime"]
  node_worker["Worker router<br/>[index.ts]"]
  node_api["API routes<br/>[index.ts]"]
  node_environment["Runtime bindings<br/>[env.ts]"]
  node_mcp["MCP tools"]
  node_store[("D1 / KV storage")]
end

subgraph group_intel["Threat intelligence"]
  node_feeds["Live intel feeds"]
  node_feedingest["Social feed ingestion"]
  node_watch["Watch alerts<br/>[watch-engine.ts]"]
  node_providers["Threat data providers"]
  node_briefings["Intel briefings"]
end

subgraph group_analysis["Analysis services"]
  node_reports["Intel reports<br/>[pipeline.ts]"]
  node_gather["Evidence gathering<br/>[gatherer.ts]"]
  node_planning["Source planning<br/>[source-planner.ts]"]
  node_ranking["Evidence ranking<br/>[ranker.ts]"]
  node_reportwriter["Report writing<br/>[writer.ts]"]
  node_ipgeo["IP geolocation lookup"]
end

subgraph group_automation["Automation"]
  node_durable["Investigator agent"]
  node_case["Case-study publishing"]
end

node_analyst(("Analyst / user"))

node_analyst -->|"uses"| node_web
node_web -->|"opens tools"| node_dfir
node_web -->|"opens intel"| node_intelui
node_analyst -->|"requests services"| node_worker
node_worker -->|"dispatches requests"| node_api
node_api -->|"uses bindings"| node_environment
node_api -->|"routes requests"| node_feeds
node_api -.->|"serves lookup"| node_ipgeo
node_ipgeo -->|"queries providers"| node_providers
node_worker -->|"dispatches MCP"| node_mcp
node_worker -->|"routes investigation"| node_durable
node_durable -->|"uses tools"| node_mcp
node_feedingest -->|"fetches feeds"| node_feeds
node_watch -->|"reads live data"| node_feeds
node_api -.->|"builds reports"| node_reports
node_reports -->|"plans sources"| node_planning
node_reports -->|"gathers evidence"| node_gather
node_reports -->|"ranks evidence"| node_ranking
node_reports -->|"writes report"| node_reportwriter
node_api -.->|"serves briefings"| node_briefings
node_api -.->|"serves blog"| node_case
node_gather -->|"collects intel"| node_feeds
node_ipgeo -->|"caches response"| node_store

click node_web "https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/src/App.tsx"
click node_dfir "https://github.com/pranith-jain/dfir-threat-intel-platform/tree/main/src/pages/dfir"
click node_intelui "https://github.com/pranith-jain/dfir-threat-intel-platform/tree/main/src/pages/threatintel"
click node_worker "https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/worker/index.ts"
click node_api "https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/index.ts"
click node_environment "https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/env.ts"
click node_mcp "https://github.com/pranith-jain/dfir-threat-intel-platform/tree/main/worker/mcp-tools"
click node_durable "https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/worker/durable-objects/investigator-agent.ts"
click node_feeds "https://github.com/pranith-jain/dfir-threat-intel-platform/tree/main/api/src/routes"
click node_feedingest "https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/routes/cyberpulse-ingest.ts"
click node_watch "https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/lib/watch-engine.ts"
click node_reports "https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/lib/report/pipeline.ts"
click node_gather "https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/lib/report/gatherer.ts"
click node_planning "https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/lib/report/source-planner.ts"
click node_ranking "https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/lib/report/ranker.ts"
click node_reportwriter "https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/lib/report/writer.ts"
click node_ipgeo "https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/controllers/ip-geo-controller.ts"
click node_providers "https://github.com/pranith-jain/dfir-threat-intel-platform/tree/main/api/src/providers"
click node_case "https://github.com/pranith-jain/dfir-threat-intel-platform/tree/main/api/src/case-study"
click node_briefings "https://github.com/pranith-jain/dfir-threat-intel-platform/tree/main/api/src/lib/briefing-builder"
click node_store "https://github.com/pranith-jain/dfir-threat-intel-platform/tree/main/api/src/infrastructure/persistence"

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_web,node_dfir,node_intelui,node_analyst toneBlue
class node_worker,node_api,node_environment,node_mcp,node_store toneAmber
class node_feeds,node_feedingest,node_watch,node_providers,node_briefings toneMint
class node_reports,node_gather,node_planning,node_ranking,node_reportwriter,node_ipgeo toneRose
class node_durable,node_case toneIndigo
```

## Components

### User surfaces

- [Web application](https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/src/App.tsx): `src/App.tsx`
- [DFIR toolkit](https://github.com/pranith-jain/dfir-threat-intel-platform/tree/main/src/pages/dfir): `src/pages/dfir`
- [Threat intel UI](https://github.com/pranith-jain/dfir-threat-intel-platform/tree/main/src/pages/threatintel): `src/pages/threatintel`

### Edge runtime

- [Worker router](https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/worker/index.ts): `worker/index.ts`
- [API routes](https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/index.ts): `api/src/index.ts`
- [Runtime bindings](https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/env.ts): `api/src/env.ts`
- [MCP tools](https://github.com/pranith-jain/dfir-threat-intel-platform/tree/main/worker/mcp-tools): `worker/mcp-tools`
- [D1 / KV storage](https://github.com/pranith-jain/dfir-threat-intel-platform/tree/main/api/src/infrastructure/persistence): `api/src/infrastructure/persistence`

### Threat intelligence

- [Live intel feeds](https://github.com/pranith-jain/dfir-threat-intel-platform/tree/main/api/src/routes): `api/src/routes`
- [Social feed ingestion](https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/routes/cyberpulse-ingest.ts): `api/src/routes/cyberpulse-ingest.ts`
- [Watch alerts](https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/lib/watch-engine.ts): `api/src/lib/watch-engine.ts`
- [Threat data providers](https://github.com/pranith-jain/dfir-threat-intel-platform/tree/main/api/src/providers): `api/src/providers`
- [Intel briefings](https://github.com/pranith-jain/dfir-threat-intel-platform/tree/main/api/src/lib/briefing-builder): `api/src/lib/briefing-builder`

### Analysis services

- [Intel reports](https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/lib/report/pipeline.ts): `api/src/lib/report/pipeline.ts`
- [Evidence gathering](https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/lib/report/gatherer.ts): `api/src/lib/report/gatherer.ts`
- [Source planning](https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/lib/report/source-planner.ts): `api/src/lib/report/source-planner.ts`
- [Evidence ranking](https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/lib/report/ranker.ts): `api/src/lib/report/ranker.ts`
- [Report writing](https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/lib/report/writer.ts): `api/src/lib/report/writer.ts`
- [IP geolocation lookup](https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/api/src/controllers/ip-geo-controller.ts): `api/src/controllers/ip-geo-controller.ts`

### Automation

- [Investigator agent](https://github.com/pranith-jain/dfir-threat-intel-platform/blob/main/worker/durable-objects/investigator-agent.ts): `worker/durable-objects/investigator-agent.ts`
- [Case-study publishing](https://github.com/pranith-jain/dfir-threat-intel-platform/tree/main/api/src/case-study): `api/src/case-study`

### Other components

- **Analyst / user**

## Connections

- Analyst / user → Web application: uses (evidence: `README.md`)
- Web application → DFIR toolkit: opens tools (evidence: `src/App.tsx`)
- Web application → Threat intel UI: opens intel (evidence: `README.md`)
- Analyst / user → Worker router: requests services (evidence: `README.md`)
- Worker router → API routes: dispatches requests (evidence: `worker/index.ts`)
- API routes → Runtime bindings: uses bindings (evidence: `api/src/index.ts`)
- API routes → Live intel feeds: routes requests (evidence: `api/src/index.ts`)
- API routes → IP geolocation lookup: serves lookup
- IP geolocation lookup → Threat data providers: queries providers (evidence: `api/src/controllers/ip-geo-controller.ts`)
- Worker router → MCP tools: dispatches MCP (evidence: `worker/index.ts`)
- Worker router → Investigator agent: routes investigation (evidence: `worker/index.ts`)
- Investigator agent → MCP tools: uses tools (evidence: `worker/durable-objects/investigator-agent.ts`)
- Social feed ingestion → Live intel feeds: fetches feeds (evidence: `api/src/routes/cyberpulse-ingest.ts`)
- Watch alerts → Live intel feeds: reads live data (evidence: `api/src/lib/watch-engine.ts`)
- API routes → Intel reports: builds reports
- Intel reports → Source planning: plans sources (evidence: `api/src/lib/report/pipeline.ts`)
- Intel reports → Evidence gathering: gathers evidence (evidence: `api/src/lib/report/pipeline.ts`)
- Intel reports → Evidence ranking: ranks evidence (evidence: `api/src/lib/report/pipeline.ts`)
- Intel reports → Report writing: writes report (evidence: `api/src/lib/report/pipeline.ts`)
- API routes → Intel briefings: serves briefings
- API routes → Case-study publishing: serves blog
- Evidence gathering → Live intel feeds: collects intel (evidence: `api/src/lib/report/gatherer.ts`)
- IP geolocation lookup → D1 / KV storage: caches response (evidence: `api/src/controllers/ip-geo-controller.ts`)
