# soju001/npcybernews architecture

> Architecture diagram of the GitHub repository soju001/npcybernews, 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/soju001/npcybernews
- Repository: https://github.com/soju001/npcybernews

## Overview

Cyber News Alert collects cybersecurity news and KEV entries, filters and enriches them for watched products, then produces SOC advisories and posters for dashboard review and delivery. The dashboard also manages sources, settings, users, scheduling, and advisory history. The graph emphasizes the documented collection-to-delivery workflow and meaningful management capabilities. Some source excerpts are partial; relationships without direct excerpt or README evidence are omitted.

Main entry points: [`cyberalert/main.py`](https://github.com/soju001/npcybernews/blob/main/cyberalert/main.py) (Run and CLI Orchestrator), [`cyberalert/pipeline.py`](https://github.com/soju001/npcybernews/blob/main/cyberalert/pipeline.py) (Advisory Pipeline), [`cyberalert/store.py`](https://github.com/soju001/npcybernews/blob/main/cyberalert/store.py) (Application Data Store), [`cyberalert/web.py`](https://github.com/soju001/npcybernews/blob/main/cyberalert/web.py) (Dashboard and API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Collection and Filtering"]
  node_feeds["RSS and Web Sources<br/>[sources.py]"]
  node_kev["CISA KEV Catalog<br/>[sources.py]"]
  node_article["Article Model<br/>[models.py]"]
  node_filters["Product and Severity Filters<br/>[filters.py]"]
end

subgraph group_analysis["Enrichment and Advisories"]
  node_enrich["NVD and CVE Enrichment<br/>[enrich.py]"]
  node_pipeline["Advisory Pipeline<br/>[pipeline.py]"]
  node_ai["AI Advisory Writer<br/>[summarizer.py]"]
  node_rules["Rule-Based Advisories<br/>[rulebased.py]"]
  node_advisory["Advisory Model<br/>[summarizer.py]"]
end

subgraph group_delivery["Rendering and Delivery"]
  node_poster["Poster Generator<br/>[infographic.py]"]
  node_render["Email and Telegram Formatting<br/>[render.py]"]
  node_notify["Delivery Channels<br/>[notify.py]"]
  node_email(("Outlook and Email APIs"))
  node_telegram(("Telegram"))
end

subgraph group_management["Dashboard and Persistence"]
  node_web["Dashboard and API<br/>[web.py]"]
  node_schedule["Automation Scheduler<br/>[schedule.py]"]
  node_main["Run and CLI Orchestrator<br/>[main.py]"]
  node_config["Configuration<br/>[config.py]"]
  node_store[("Application Data Store<br/>[store.py]")]
  node_db[("Database Access<br/>[db.py]")]
end

node_analyst(("Analyst or Admin"))
node_nvd(("NVD Service"))

node_main -->|"collects articles"| node_feeds
node_main -->|"fetches entries"| node_kev
node_feeds -->|"creates articles"| node_article
node_main -->|"scores and filters"| node_filters
node_main -->|"enriches CVEs"| node_enrich
node_enrich -.->|"queries CVSS"| node_nvd
node_main -->|"processes matches"| node_pipeline
node_pipeline -->|"writes advisory"| node_ai
node_pipeline -->|"uses fallback"| node_rules
node_ai -->|"returns structured advisory"| node_advisory
node_ai -.->|"uses vulnerability data"| node_nvd
node_pipeline -->|"renders poster"| node_poster
node_pipeline -->|"renders messages"| node_render
node_pipeline -->|"sends channels"| node_notify
node_notify -->|"sends email"| node_email
node_notify -->|"sends messages"| node_telegram
node_analyst -->|"uses dashboard"| node_web
node_web -->|"runs checks"| node_main
node_web -->|"checks schedule"| node_schedule
node_schedule -->|"triggers run"| node_main
node_main -->|"records results"| node_store
node_web -->|"manages dashboard data"| node_store
node_config -->|"loads and saves settings"| node_store
node_store -->|"executes queries"| node_db
node_poster -->|"loads brand assets"| node_store

click node_feeds "https://github.com/soju001/npcybernews/blob/main/cyberalert/sources.py"
click node_kev "https://github.com/soju001/npcybernews/blob/main/cyberalert/sources.py"
click node_article "https://github.com/soju001/npcybernews/blob/main/cyberalert/models.py"
click node_filters "https://github.com/soju001/npcybernews/blob/main/cyberalert/filters.py"
click node_enrich "https://github.com/soju001/npcybernews/blob/main/cyberalert/enrich.py"
click node_pipeline "https://github.com/soju001/npcybernews/blob/main/cyberalert/pipeline.py"
click node_ai "https://github.com/soju001/npcybernews/blob/main/cyberalert/summarizer.py"
click node_rules "https://github.com/soju001/npcybernews/blob/main/cyberalert/rulebased.py"
click node_advisory "https://github.com/soju001/npcybernews/blob/main/cyberalert/summarizer.py"
click node_poster "https://github.com/soju001/npcybernews/blob/main/cyberalert/infographic.py"
click node_render "https://github.com/soju001/npcybernews/blob/main/cyberalert/render.py"
click node_notify "https://github.com/soju001/npcybernews/blob/main/cyberalert/notify.py"
click node_web "https://github.com/soju001/npcybernews/blob/main/cyberalert/web.py"
click node_schedule "https://github.com/soju001/npcybernews/blob/main/cyberalert/schedule.py"
click node_main "https://github.com/soju001/npcybernews/blob/main/cyberalert/main.py"
click node_config "https://github.com/soju001/npcybernews/blob/main/cyberalert/config.py"
click node_store "https://github.com/soju001/npcybernews/blob/main/cyberalert/store.py"
click node_db "https://github.com/soju001/npcybernews/blob/main/cyberalert/db.py"

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_feeds,node_kev,node_article,node_filters toneBlue
class node_enrich,node_pipeline,node_ai,node_rules,node_advisory toneAmber
class node_poster,node_render,node_notify,node_email,node_telegram toneMint
class node_web,node_schedule,node_main,node_config,node_store,node_db toneRose
class node_analyst,node_nvd toneIndigo
```

## Components

### Collection and Filtering

- [RSS and Web Sources](https://github.com/soju001/npcybernews/blob/main/cyberalert/sources.py): `cyberalert/sources.py`
- [CISA KEV Catalog](https://github.com/soju001/npcybernews/blob/main/cyberalert/sources.py): `cyberalert/sources.py`
- [Article Model](https://github.com/soju001/npcybernews/blob/main/cyberalert/models.py): `cyberalert/models.py`
- [Product and Severity Filters](https://github.com/soju001/npcybernews/blob/main/cyberalert/filters.py): `cyberalert/filters.py`

### Enrichment and Advisories

- [NVD and CVE Enrichment](https://github.com/soju001/npcybernews/blob/main/cyberalert/enrich.py): `cyberalert/enrich.py`
- [Advisory Pipeline](https://github.com/soju001/npcybernews/blob/main/cyberalert/pipeline.py): `cyberalert/pipeline.py`
- [AI Advisory Writer](https://github.com/soju001/npcybernews/blob/main/cyberalert/summarizer.py): `cyberalert/summarizer.py`
- [Rule-Based Advisories](https://github.com/soju001/npcybernews/blob/main/cyberalert/rulebased.py): `cyberalert/rulebased.py`
- [Advisory Model](https://github.com/soju001/npcybernews/blob/main/cyberalert/summarizer.py): `cyberalert/summarizer.py`

### Rendering and Delivery

- [Poster Generator](https://github.com/soju001/npcybernews/blob/main/cyberalert/infographic.py): `cyberalert/infographic.py`
- [Email and Telegram Formatting](https://github.com/soju001/npcybernews/blob/main/cyberalert/render.py): `cyberalert/render.py`
- [Delivery Channels](https://github.com/soju001/npcybernews/blob/main/cyberalert/notify.py): `cyberalert/notify.py`
- **Outlook and Email APIs**
- **Telegram**

### Dashboard and Persistence

- [Dashboard and API](https://github.com/soju001/npcybernews/blob/main/cyberalert/web.py): `cyberalert/web.py`
- [Automation Scheduler](https://github.com/soju001/npcybernews/blob/main/cyberalert/schedule.py): `cyberalert/schedule.py`
- [Run and CLI Orchestrator](https://github.com/soju001/npcybernews/blob/main/cyberalert/main.py): `cyberalert/main.py`
- [Configuration](https://github.com/soju001/npcybernews/blob/main/cyberalert/config.py): `cyberalert/config.py`
- [Application Data Store](https://github.com/soju001/npcybernews/blob/main/cyberalert/store.py): `cyberalert/store.py`
- [Database Access](https://github.com/soju001/npcybernews/blob/main/cyberalert/db.py): `cyberalert/db.py`

### Other components

- **Analyst or Admin**
- **NVD Service**

## Connections

- Run and CLI Orchestrator → RSS and Web Sources: collects articles (evidence: `cyberalert/main.py`)
- Run and CLI Orchestrator → CISA KEV Catalog: fetches entries (evidence: `cyberalert/main.py`)
- RSS and Web Sources → Article Model: creates articles (evidence: `cyberalert/sources.py`)
- Run and CLI Orchestrator → Product and Severity Filters: scores and filters (evidence: `cyberalert/main.py`)
- Run and CLI Orchestrator → NVD and CVE Enrichment: enriches CVEs (evidence: `cyberalert/main.py`)
- NVD and CVE Enrichment → NVD Service: queries CVSS
- Run and CLI Orchestrator → Advisory Pipeline: processes matches (evidence: `cyberalert/main.py`)
- Advisory Pipeline → AI Advisory Writer: writes advisory (evidence: `cyberalert/pipeline.py`)
- Advisory Pipeline → Rule-Based Advisories: uses fallback (evidence: `cyberalert/pipeline.py`)
- AI Advisory Writer → Advisory Model: returns structured advisory (evidence: `cyberalert/summarizer.py`)
- AI Advisory Writer → NVD Service: uses vulnerability data
- Advisory Pipeline → Poster Generator: renders poster (evidence: `cyberalert/pipeline.py`)
- Advisory Pipeline → Email and Telegram Formatting: renders messages (evidence: `cyberalert/pipeline.py`)
- Advisory Pipeline → Delivery Channels: sends channels (evidence: `cyberalert/pipeline.py`)
- Delivery Channels → Outlook and Email APIs: sends email (evidence: `cyberalert/notify.py`)
- Delivery Channels → Telegram: sends messages (evidence: `cyberalert/notify.py`)
- Analyst or Admin → Dashboard and API: uses dashboard (evidence: `README.md`)
- Dashboard and API → Run and CLI Orchestrator: runs checks (evidence: `cyberalert/web.py`)
- Dashboard and API → Automation Scheduler: checks schedule (evidence: `cyberalert/web.py`)
- Automation Scheduler → Run and CLI Orchestrator: triggers run (evidence: `cyberalert/web.py`)
- Run and CLI Orchestrator → Application Data Store: records results (evidence: `cyberalert/main.py`)
- Dashboard and API → Application Data Store: manages dashboard data (evidence: `cyberalert/web.py`)
- Configuration → Application Data Store: loads and saves settings (evidence: `cyberalert/config.py`)
- Application Data Store → Database Access: executes queries (evidence: `cyberalert/store.py`)
- Poster Generator → Application Data Store: loads brand assets (evidence: `cyberalert/infographic.py`)
