# silasvuls/trendradar architecture

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

- Interactive diagram: https://gitdiagram.com/silasvuls/trendradar
- Repository: https://github.com/silasvuls/trendradar

## Overview

TrendRadar aggregates platform hotlists and RSS feeds, analyzes and filters trends, then produces reports and sends configurable notifications. The main runtime is complemented by AI analysis/translation, persistent storage, and an MCP server exposing queries and actions to AI clients. The README establishes these product capabilities; sampled source supports the MCP query-to-data path and AI client behavior, but does not show the complete crawler-to-notification orchestration, so uncertain internal wiring is omitted.

Main entry points: [`trendradar/__main__.py`](https://github.com/silasvuls/trendradar/blob/master/trendradar/__main__.py) (Application entry), [`mcp_server/server.py`](https://github.com/silasvuls/trendradar/blob/master/mcp_server/server.py) (MCP server), [`mcp_server/services/data_service.py`](https://github.com/silasvuls/trendradar/blob/master/mcp_server/services/data_service.py) (Data access service), [`trendradar/crawler/rss/fetcher.py`](https://github.com/silasvuls/trendradar/blob/master/trendradar/crawler/rss/fetcher.py) (RSS fetcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Collection and analysis"]
  node_main["Application entry<br/>[__main__.py]"]
  node_config["App context<br/>[context.py]"]
  node_loader["Configuration loader<br/>[loader.py]"]
  node_crawler["Hotlist crawler<br/>[fetcher.py]"]
  node_rssfetch["RSS fetcher<br/>[fetcher.py]"]
  node_rssparse["RSS parser<br/>[parser.py]"]
  node_analyzer["Trend analysis<br/>[analyzer.py]"]
  node_frequency["Frequency analysis<br/>[frequency.py]"]
end

subgraph group_outputs["Reports and delivery"]
  node_report["Report generator<br/>[generator.py]"]
  node_html["HTML reports<br/>[html.py]"]
  node_dispatcher["Notification dispatcher<br/>[dispatcher.py]"]
  node_senders["Notification channels<br/>[senders.py]"]
end

subgraph group_ai["AI capabilities"]
  node_aiworkflow["AI analysis / translation<br/>[analyzer.py]"]
  node_aiclient["AI model client<br/>[client.py]"]
end

subgraph group_persistence["Storage and queries"]
  node_storage["Storage manager<br/>[manager.py]"]
  node_localstore[("Local storage<br/>[local.py]")]
  node_remotestore[("Remote storage<br/>[remote.py]")]
end

subgraph group_mcp["MCP interface"]
  node_mcpserver["MCP server<br/>[server.py]"]
  node_datatools["Data query tools<br/>[data_query.py]"]
  node_dataservice["Data access service<br/>[data_service.py]"]
  node_parser["Database parser<br/>[parser_service.py]"]
  node_cache[("Query cache<br/>[cache_service.py]")]
  node_analytics["Analytics tools<br/>[analytics.py]"]
  node_search["Search tools<br/>[search_tools.py]"]
  node_article["Article reader<br/>[article_reader.py]"]
end

node_user(("User / scheduler"))
node_newsapi{{"News data API"}}
node_feedsource{{"RSS publishers"}}
node_channels{{"Messaging services"}}
node_aiprovider{{"AI providers"}}
node_mcpclient(("MCP client"))

node_user -->|"starts run"| node_main
node_main -->|"initializes"| node_config
node_config -->|"loads settings"| node_loader
node_main -->|"collects hotlists"| node_crawler
node_crawler -->|"fetches data"| node_newsapi
node_main -->|"collects feeds"| node_rssfetch
node_rssfetch -->|"fetches feeds"| node_feedsource
node_rssfetch -->|"parses content"| node_rssparse
node_main -->|"analyzes trends"| node_analyzer
node_analyzer -->|"calculates frequency"| node_frequency
node_main -->|"selects backend"| node_storage
node_storage -->|"writes locally"| node_localstore
node_storage -.->|"writes remotely"| node_remotestore
node_main -->|"generates report"| node_report
node_report -->|"renders HTML"| node_html
node_main -.->|"requests AI output"| node_aiworkflow
node_aiworkflow -->|"calls model client"| node_aiclient
node_aiclient -->|"sends prompts"| node_aiprovider
node_main -->|"dispatches report"| node_dispatcher
node_dispatcher -->|"selects sender"| node_senders
node_senders -->|"sends messages"| node_channels
node_mcpclient -->|"invokes tools"| node_mcpserver
node_mcpserver -->|"dispatches queries"| node_datatools
node_mcpserver -->|"dispatches analysis"| node_analytics
node_mcpserver -->|"dispatches search"| node_search
node_mcpserver -->|"dispatches reading"| node_article
node_datatools -->|"queries data"| node_dataservice
node_dataservice -->|"reads dated data"| node_parser
node_parser -->|"reads databases"| node_localstore
node_dataservice -->|"checks cache"| node_cache
node_analytics -->|"queries data"| node_dataservice
node_search -->|"searches data"| node_dataservice

click node_main "https://github.com/silasvuls/trendradar/blob/master/trendradar/__main__.py"
click node_config "https://github.com/silasvuls/trendradar/blob/master/trendradar/context.py"
click node_loader "https://github.com/silasvuls/trendradar/blob/master/trendradar/core/loader.py"
click node_crawler "https://github.com/silasvuls/trendradar/blob/master/trendradar/crawler/fetcher.py"
click node_rssfetch "https://github.com/silasvuls/trendradar/blob/master/trendradar/crawler/rss/fetcher.py"
click node_rssparse "https://github.com/silasvuls/trendradar/blob/master/trendradar/crawler/rss/parser.py"
click node_analyzer "https://github.com/silasvuls/trendradar/blob/master/trendradar/core/analyzer.py"
click node_frequency "https://github.com/silasvuls/trendradar/blob/master/trendradar/core/frequency.py"
click node_report "https://github.com/silasvuls/trendradar/blob/master/trendradar/report/generator.py"
click node_html "https://github.com/silasvuls/trendradar/blob/master/trendradar/report/html.py"
click node_dispatcher "https://github.com/silasvuls/trendradar/blob/master/trendradar/notification/dispatcher.py"
click node_senders "https://github.com/silasvuls/trendradar/blob/master/trendradar/notification/senders.py"
click node_aiworkflow "https://github.com/silasvuls/trendradar/blob/master/trendradar/ai/analyzer.py"
click node_aiclient "https://github.com/silasvuls/trendradar/blob/master/trendradar/ai/client.py"
click node_storage "https://github.com/silasvuls/trendradar/blob/master/trendradar/storage/manager.py"
click node_localstore "https://github.com/silasvuls/trendradar/blob/master/trendradar/storage/local.py"
click node_remotestore "https://github.com/silasvuls/trendradar/blob/master/trendradar/storage/remote.py"
click node_mcpserver "https://github.com/silasvuls/trendradar/blob/master/mcp_server/server.py"
click node_datatools "https://github.com/silasvuls/trendradar/blob/master/mcp_server/tools/data_query.py"
click node_dataservice "https://github.com/silasvuls/trendradar/blob/master/mcp_server/services/data_service.py"
click node_parser "https://github.com/silasvuls/trendradar/blob/master/mcp_server/services/parser_service.py"
click node_cache "https://github.com/silasvuls/trendradar/blob/master/mcp_server/services/cache_service.py"
click node_analytics "https://github.com/silasvuls/trendradar/blob/master/mcp_server/tools/analytics.py"
click node_search "https://github.com/silasvuls/trendradar/blob/master/mcp_server/tools/search_tools.py"
click node_article "https://github.com/silasvuls/trendradar/blob/master/mcp_server/tools/article_reader.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_main,node_config,node_loader,node_crawler,node_rssfetch,node_rssparse,node_analyzer,node_frequency,node_mcpclient toneBlue
class node_report,node_html,node_dispatcher,node_senders toneAmber
class node_aiworkflow,node_aiclient,node_newsapi toneMint
class node_storage,node_localstore,node_remotestore,node_user toneRose
class node_mcpserver,node_datatools,node_dataservice,node_parser,node_cache,node_analytics,node_search,node_article,node_feedsource,node_channels,node_aiprovider toneIndigo
```

## Components

### Collection and analysis

- [Application entry](https://github.com/silasvuls/trendradar/blob/master/trendradar/__main__.py): `trendradar/__main__.py`
- [App context](https://github.com/silasvuls/trendradar/blob/master/trendradar/context.py): `trendradar/context.py`
- [Configuration loader](https://github.com/silasvuls/trendradar/blob/master/trendradar/core/loader.py): `trendradar/core/loader.py`
- [Hotlist crawler](https://github.com/silasvuls/trendradar/blob/master/trendradar/crawler/fetcher.py): `trendradar/crawler/fetcher.py`
- [RSS fetcher](https://github.com/silasvuls/trendradar/blob/master/trendradar/crawler/rss/fetcher.py): `trendradar/crawler/rss/fetcher.py`
- [RSS parser](https://github.com/silasvuls/trendradar/blob/master/trendradar/crawler/rss/parser.py): `trendradar/crawler/rss/parser.py`
- [Trend analysis](https://github.com/silasvuls/trendradar/blob/master/trendradar/core/analyzer.py): `trendradar/core/analyzer.py`
- [Frequency analysis](https://github.com/silasvuls/trendradar/blob/master/trendradar/core/frequency.py): `trendradar/core/frequency.py`

### Reports and delivery

- [Report generator](https://github.com/silasvuls/trendradar/blob/master/trendradar/report/generator.py): `trendradar/report/generator.py`
- [HTML reports](https://github.com/silasvuls/trendradar/blob/master/trendradar/report/html.py): `trendradar/report/html.py`
- [Notification dispatcher](https://github.com/silasvuls/trendradar/blob/master/trendradar/notification/dispatcher.py): `trendradar/notification/dispatcher.py`
- [Notification channels](https://github.com/silasvuls/trendradar/blob/master/trendradar/notification/senders.py): `trendradar/notification/senders.py`

### AI capabilities

- [AI analysis / translation](https://github.com/silasvuls/trendradar/blob/master/trendradar/ai/analyzer.py): `trendradar/ai/analyzer.py`
- [AI model client](https://github.com/silasvuls/trendradar/blob/master/trendradar/ai/client.py): `trendradar/ai/client.py`

### Storage and queries

- [Storage manager](https://github.com/silasvuls/trendradar/blob/master/trendradar/storage/manager.py): `trendradar/storage/manager.py`
- [Local storage](https://github.com/silasvuls/trendradar/blob/master/trendradar/storage/local.py): `trendradar/storage/local.py`
- [Remote storage](https://github.com/silasvuls/trendradar/blob/master/trendradar/storage/remote.py): `trendradar/storage/remote.py`

### MCP interface

- [MCP server](https://github.com/silasvuls/trendradar/blob/master/mcp_server/server.py): `mcp_server/server.py`
- [Data query tools](https://github.com/silasvuls/trendradar/blob/master/mcp_server/tools/data_query.py): `mcp_server/tools/data_query.py`
- [Data access service](https://github.com/silasvuls/trendradar/blob/master/mcp_server/services/data_service.py): `mcp_server/services/data_service.py`
- [Database parser](https://github.com/silasvuls/trendradar/blob/master/mcp_server/services/parser_service.py): `mcp_server/services/parser_service.py`
- [Query cache](https://github.com/silasvuls/trendradar/blob/master/mcp_server/services/cache_service.py): `mcp_server/services/cache_service.py`
- [Analytics tools](https://github.com/silasvuls/trendradar/blob/master/mcp_server/tools/analytics.py): `mcp_server/tools/analytics.py`
- [Search tools](https://github.com/silasvuls/trendradar/blob/master/mcp_server/tools/search_tools.py): `mcp_server/tools/search_tools.py`
- [Article reader](https://github.com/silasvuls/trendradar/blob/master/mcp_server/tools/article_reader.py): `mcp_server/tools/article_reader.py`

### Other components

- **User / scheduler**
- **News data API**
- **RSS publishers**
- **Messaging services**
- **AI providers**
- **MCP client**

## Connections

- User / scheduler → Application entry: starts run
- Application entry → App context: initializes
- App context → Configuration loader: loads settings
- Application entry → Hotlist crawler: collects hotlists
- Hotlist crawler → News data API: fetches data
- Application entry → RSS fetcher: collects feeds
- RSS fetcher → RSS publishers: fetches feeds
- RSS fetcher → RSS parser: parses content
- Application entry → Trend analysis: analyzes trends
- Trend analysis → Frequency analysis: calculates frequency
- Application entry → Storage manager: selects backend
- Storage manager → Local storage: writes locally
- Storage manager → Remote storage: writes remotely
- Application entry → Report generator: generates report
- Report generator → HTML reports: renders HTML
- Application entry → AI analysis / translation: requests AI output
- AI analysis / translation → AI model client: calls model client
- AI model client → AI providers: sends prompts
- Application entry → Notification dispatcher: dispatches report
- Notification dispatcher → Notification channels: selects sender
- Notification channels → Messaging services: sends messages
- MCP client → MCP server: invokes tools
- MCP server → Data query tools: dispatches queries
- MCP server → Analytics tools: dispatches analysis
- MCP server → Search tools: dispatches search
- MCP server → Article reader: dispatches reading
- Data query tools → Data access service: queries data
- Data access service → Database parser: reads dated data
- Database parser → Local storage: reads databases
- Data access service → Query cache: checks cache
- Analytics tools → Data access service: queries data
- Search tools → Data access service: searches data
