# onlyforken637/cybershield architecture

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

- Interactive diagram: https://gitdiagram.com/onlyforken637/cybershield
- Repository: https://github.com/onlyforken637/cybershield

## Overview

CyberShield is a live cyber-threat intelligence dashboard. The main workflow fetches and enriches research feeds, classifies and scores articles, then presents searchable signals and threat summaries for investigation. Separate branches provide the CISA Known Exploited Vulnerabilities catalog, analyst verdicts, thumbnail relaying, and mission resources. The graph follows the sampled page, feed hook, and pipeline evidence; other API capabilities are included where the README documents them, with unsampled wiring omitted.

Main entry points: [`src/app/page.tsx`](https://github.com/onlyforken637/cybershield/blob/main/src/app/page.tsx) (Dashboard page), [`src/lib/cyber/intel.ts`](https://github.com/onlyforken637/cybershield/blob/main/src/lib/cyber/intel.ts) (Feed aggregation), [`src/components/cybershield/investigation-drawer.tsx`](https://github.com/onlyforken637/cybershield/blob/main/src/components/cybershield/investigation-drawer.tsx) (Investigation drawer), [`src/app/api/brief/route.ts`](https://github.com/onlyforken637/cybershield/blob/main/src/app/api/brief/route.ts) (Analyst brief API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard experience"]
  node_page["Dashboard page<br/>[page.tsx]"]
  node_feedhook["Feed sync hook<br/>[use-cyber-feeds.ts]"]
  node_feedcolumn["Feed column<br/>[feed-column.tsx]"]
  node_article["Article cards<br/>[article-card.tsx]"]
  node_sidebar["Threat sidebar<br/>[sidebar.tsx]"]
  node_investigation["Investigation drawer"]
  node_threatpanel["Threat condition panel<br/>[threat-panel.tsx]"]
end

subgraph group_feeds["Threat intelligence"]
  node_newsapi["News API<br/>[route.ts]"]
  node_pipeline["Feed aggregation<br/>[intel.ts]"]
  node_feedconfig["Stream definitions<br/>[feeds.ts]"]
  node_categories["Threat categories<br/>[categories.ts]"]
  node_publishers(("Research publishers"))
end

subgraph group_vulns["CISA vulnerabilities"]
  node_cisaapi["CISA catalog API<br/>[route.ts]"]
  node_cisahook["Catalog hook"]
  node_cisalib["KEV catalog logic<br/>[cisa.ts]"]
  node_cisa(("CISA / mirror"))
end

subgraph group_services["Analysis services"]
  node_briefapi["Analyst brief API<br/>[route.ts]"]
  node_briefstore[("Brief persistence<br/>[db.ts]")]
  node_imageapi["Image relay API<br/>[route.ts]"]
  node_rssrelay["RSS JSON relay<br/>[route.ts]"]
  node_analystservice{{"GLM / offline analyst"}}
end

subgraph group_presentation["Mission presentation"]
  node_resources["Mission resources"]
  node_boot["Boot experience<br/>[boot-overlay.tsx]"]
end

node_analyst(("Dashboard user"))

node_analyst -->|"opens dashboard"| node_page
node_page -->|"starts feed sync"| node_feedhook
node_feedhook -->|"fetches feed"| node_newsapi
node_newsapi -->|"aggregates via"| node_pipeline
node_pipeline -->|"uses streams"| node_feedconfig
node_pipeline -->|"classifies signals"| node_categories
node_pipeline -->|"fetches feeds"| node_publishers
node_page -->|"renders"| node_feedcolumn
node_feedcolumn -->|"renders cards"| node_article
node_page -->|"renders"| node_sidebar
node_sidebar -->|"renders panels"| node_threatpanel
node_page -->|"opens investigations"| node_investigation
node_investigation -->|"renders article"| node_article
node_investigation -->|"shows verdict"| node_analystservice
node_page -->|"loads catalog"| node_cisahook
node_cisahook -->|"uses catalog logic"| node_cisalib
node_cisalib -->|"relays catalog"| node_cisaapi
node_cisaapi -->|"fetches catalog"| node_cisa
node_briefapi -->|"reads and writes"| node_briefstore
node_briefapi -->|"generates verdict"| node_analystservice
node_imageapi -->|"resolves images"| node_publishers
node_pipeline -.->|"falls back to relay"| node_rssrelay
node_page -->|"renders resources"| node_resources
node_page -->|"renders boot overlay"| node_boot

click node_page "https://github.com/onlyforken637/cybershield/blob/main/src/app/page.tsx"
click node_feedhook "https://github.com/onlyforken637/cybershield/blob/main/src/hooks/use-cyber-feeds.ts"
click node_feedcolumn "https://github.com/onlyforken637/cybershield/blob/main/src/components/cybershield/feed-column.tsx"
click node_article "https://github.com/onlyforken637/cybershield/blob/main/src/components/cybershield/article-card.tsx"
click node_sidebar "https://github.com/onlyforken637/cybershield/blob/main/src/components/cybershield/sidebar.tsx"
click node_investigation "https://github.com/onlyforken637/cybershield/blob/main/src/components/cybershield/investigation-drawer.tsx"
click node_newsapi "https://github.com/onlyforken637/cybershield/blob/main/src/app/api/news/route.ts"
click node_pipeline "https://github.com/onlyforken637/cybershield/blob/main/src/lib/cyber/intel.ts"
click node_feedconfig "https://github.com/onlyforken637/cybershield/blob/main/src/lib/cyber/feeds.ts"
click node_categories "https://github.com/onlyforken637/cybershield/blob/main/src/lib/cyber/categories.ts"
click node_cisaapi "https://github.com/onlyforken637/cybershield/blob/main/src/app/api/cisa/route.ts"
click node_cisahook "https://github.com/onlyforken637/cybershield/blob/main/src/hooks/use-cisa-catalog.ts"
click node_cisalib "https://github.com/onlyforken637/cybershield/blob/main/src/lib/cyber/cisa.ts"
click node_briefapi "https://github.com/onlyforken637/cybershield/blob/main/src/app/api/brief/route.ts"
click node_briefstore "https://github.com/onlyforken637/cybershield/blob/main/src/lib/db.ts"
click node_imageapi "https://github.com/onlyforken637/cybershield/blob/main/src/app/api/img/route.ts"
click node_rssrelay "https://github.com/onlyforken637/cybershield/blob/main/src/app/api/rss2json/route.ts"
click node_resources "https://github.com/onlyforken637/cybershield/blob/main/src/components/cybershield/resources-section.tsx"
click node_boot "https://github.com/onlyforken637/cybershield/blob/main/src/components/cybershield/boot-overlay.tsx"
click node_threatpanel "https://github.com/onlyforken637/cybershield/blob/main/src/components/cybershield/threat-panel.tsx"

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_page,node_feedhook,node_feedcolumn,node_article,node_sidebar,node_investigation,node_threatpanel,node_analyst toneBlue
class node_newsapi,node_pipeline,node_feedconfig,node_categories,node_publishers toneAmber
class node_cisaapi,node_cisahook,node_cisalib,node_cisa toneMint
class node_briefapi,node_briefstore,node_imageapi,node_rssrelay,node_analystservice toneRose
class node_resources,node_boot toneIndigo
```

## Components

### Dashboard experience

- [Dashboard page](https://github.com/onlyforken637/cybershield/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Feed sync hook](https://github.com/onlyforken637/cybershield/blob/main/src/hooks/use-cyber-feeds.ts): `src/hooks/use-cyber-feeds.ts`
- [Feed column](https://github.com/onlyforken637/cybershield/blob/main/src/components/cybershield/feed-column.tsx): `src/components/cybershield/feed-column.tsx`
- [Article cards](https://github.com/onlyforken637/cybershield/blob/main/src/components/cybershield/article-card.tsx): `src/components/cybershield/article-card.tsx`
- [Threat sidebar](https://github.com/onlyforken637/cybershield/blob/main/src/components/cybershield/sidebar.tsx): `src/components/cybershield/sidebar.tsx`
- [Investigation drawer](https://github.com/onlyforken637/cybershield/blob/main/src/components/cybershield/investigation-drawer.tsx): `src/components/cybershield/investigation-drawer.tsx`
- [Threat condition panel](https://github.com/onlyforken637/cybershield/blob/main/src/components/cybershield/threat-panel.tsx): `src/components/cybershield/threat-panel.tsx`

### Threat intelligence

- [News API](https://github.com/onlyforken637/cybershield/blob/main/src/app/api/news/route.ts): `src/app/api/news/route.ts`
- [Feed aggregation](https://github.com/onlyforken637/cybershield/blob/main/src/lib/cyber/intel.ts): `src/lib/cyber/intel.ts`
- [Stream definitions](https://github.com/onlyforken637/cybershield/blob/main/src/lib/cyber/feeds.ts): `src/lib/cyber/feeds.ts`
- [Threat categories](https://github.com/onlyforken637/cybershield/blob/main/src/lib/cyber/categories.ts): `src/lib/cyber/categories.ts`
- **Research publishers**

### CISA vulnerabilities

- [CISA catalog API](https://github.com/onlyforken637/cybershield/blob/main/src/app/api/cisa/route.ts): `src/app/api/cisa/route.ts`
- [Catalog hook](https://github.com/onlyforken637/cybershield/blob/main/src/hooks/use-cisa-catalog.ts): `src/hooks/use-cisa-catalog.ts`
- [KEV catalog logic](https://github.com/onlyforken637/cybershield/blob/main/src/lib/cyber/cisa.ts): `src/lib/cyber/cisa.ts`
- **CISA / mirror**

### Analysis services

- [Analyst brief API](https://github.com/onlyforken637/cybershield/blob/main/src/app/api/brief/route.ts): `src/app/api/brief/route.ts`
- [Brief persistence](https://github.com/onlyforken637/cybershield/blob/main/src/lib/db.ts): `src/lib/db.ts`
- [Image relay API](https://github.com/onlyforken637/cybershield/blob/main/src/app/api/img/route.ts): `src/app/api/img/route.ts`
- [RSS JSON relay](https://github.com/onlyforken637/cybershield/blob/main/src/app/api/rss2json/route.ts): `src/app/api/rss2json/route.ts`
- **GLM / offline analyst**

### Mission presentation

- [Mission resources](https://github.com/onlyforken637/cybershield/blob/main/src/components/cybershield/resources-section.tsx): `src/components/cybershield/resources-section.tsx`
- [Boot experience](https://github.com/onlyforken637/cybershield/blob/main/src/components/cybershield/boot-overlay.tsx): `src/components/cybershield/boot-overlay.tsx`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Dashboard page: opens dashboard (evidence: `src/app/page.tsx`)
- Dashboard page → Feed sync hook: starts feed sync (evidence: `src/app/page.tsx`)
- Feed sync hook → News API: fetches feed (evidence: `src/hooks/use-cyber-feeds.ts`)
- News API → Feed aggregation: aggregates via (evidence: `src/app/api/news/route.ts`)
- Feed aggregation → Stream definitions: uses streams (evidence: `src/lib/cyber/intel.ts`)
- Feed aggregation → Threat categories: classifies signals (evidence: `src/lib/cyber/intel.ts`)
- Feed aggregation → Research publishers: fetches feeds (evidence: `README.md`)
- Dashboard page → Feed column: renders (evidence: `src/app/page.tsx`)
- Feed column → Article cards: renders cards (evidence: `src/components/cybershield/feed-column.tsx`)
- Dashboard page → Threat sidebar: renders (evidence: `src/app/page.tsx`)
- Threat sidebar → Threat condition panel: renders panels (evidence: `src/components/cybershield/sidebar.tsx`)
- Dashboard page → Investigation drawer: opens investigations (evidence: `src/app/page.tsx`)
- Investigation drawer → Article cards: renders article (evidence: `src/components/cybershield/investigation-drawer.tsx`)
- Investigation drawer → GLM / offline analyst: shows verdict (evidence: `src/components/cybershield/investigation-drawer.tsx`)
- Dashboard page → Catalog hook: loads catalog (evidence: `src/app/page.tsx`)
- Catalog hook → KEV catalog logic: uses catalog logic (evidence: `src/hooks/use-cisa-catalog.ts`)
- KEV catalog logic → CISA catalog API: relays catalog (evidence: `README.md`)
- CISA catalog API → CISA / mirror: fetches catalog (evidence: `README.md`)
- Analyst brief API → Brief persistence: reads and writes (evidence: `src/app/api/brief/route.ts`)
- Analyst brief API → GLM / offline analyst: generates verdict (evidence: `README.md`)
- Image relay API → Research publishers: resolves images (evidence: `README.md`)
- Feed aggregation → RSS JSON relay: falls back to relay (evidence: `README.md`)
- Dashboard page → Mission resources: renders resources (evidence: `src/app/page.tsx`)
- Dashboard page → Boot experience: renders boot overlay (evidence: `src/app/page.tsx`)
