# ethan851/horizon_message_get architecture

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

## Overview

Horizon turns configured feeds and social/financial sources into ranked, enriched, multilingual news briefings, then delivers them through local output, email, webhooks, or MCP. The main CLI loads configuration and starts the orchestrator; the orchestrator owns source fetching and the documented processing stages. The setup wizard and MCP staged-run interface are separate product entry points. Some subsystem wiring is based on README capabilities because their implementation excerpts were not provided; uncertain call details are omitted.

Main entry points: [`src/orchestrator.py`](https://github.com/ethan851/horizon_message_get/blob/main/src/orchestrator.py) (Pipeline Orchestrator), [`src/mcp/service.py`](https://github.com/ethan851/horizon_message_get/blob/main/src/mcp/service.py) (Staged Pipeline Service), [`src/main.py`](https://github.com/ethan851/horizon_message_get/blob/main/src/main.py) (Daily CLI), [`src/storage/manager.py`](https://github.com/ethan851/horizon_message_get/blob/main/src/storage/manager.py) (Config and State)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and Configuration"]
  node_cli["Daily CLI<br/>[main.py]"]
  node_wizard["Setup Wizard<br/>[wizard.py]"]
  node_config[("Config and State<br/>[manager.py]")]
  node_models["Domain Models<br/>[models.py]"]
end

subgraph group_collection["Source Collection"]
  node_hn["Hacker News<br/>[hackernews.py]"]
  node_reddit["Reddit<br/>[reddit.py]"]
  node_rss["RSS Feeds<br/>[rss.py]"]
  node_telegram["Telegram<br/>[telegram.py]"]
  node_twitter["Twitter/X<br/>[twitter.py]"]
  node_github["GitHub Activity<br/>[github.py]"]
  node_openbb["OpenBB News<br/>[openbb.py]"]
  node_ossinsight["OSSInsight<br/>[ossinsight.py]"]
end

subgraph group_analysis["Story Analysis"]
  node_orchestrator["Pipeline Orchestrator<br/>[orchestrator.py]"]
  node_dedup["Cross-source Merge<br/>[orchestrator.py]"]
  node_analyzer["Scoring and Analysis<br/>[analyzer.py]"]
  node_enricher["Context Enrichment<br/>[enricher.py]"]
  node_search["Related Story Search<br/>[search.py]"]
  node_summarizer["Briefing Summaries<br/>[summarizer.py]"]
end

subgraph group_delivery["Briefing Delivery"]
  node_email["Email Newsletter<br/>[email.py]"]
  node_webhook["Webhook Notifications<br/>[webhook.py]"]
  node_site["Daily Site Output<br/>[orchestrator.py]"]
end

subgraph group_interfaces["Automation Interfaces"]
  node_mcp_server["MCP Server<br/>[server.py]"]
  node_mcp_service["Staged Pipeline Service<br/>[service.py]"]
  node_run_store[("Run Artifacts<br/>[run_store.py]")]
end

node_reader(("Horizon User"))
node_ai_provider{{"AI Model APIs"}}
node_web_sources{{"Web Search"}}
node_reader_channels(("Delivery Channels"))

node_reader -->|"runs"| node_cli
node_reader -->|"configures"| node_wizard
node_wizard -->|"saves config"| node_config
node_cli -->|"loads config"| node_config
node_cli -->|"starts run"| node_orchestrator
node_config -->|"provides settings"| node_orchestrator
node_orchestrator -->|"fetches stories"| node_hn
node_orchestrator -->|"fetches posts"| node_reddit
node_orchestrator -->|"fetches feeds"| node_rss
node_orchestrator -->|"fetches posts"| node_telegram
node_orchestrator -->|"fetches activity"| node_twitter
node_orchestrator -->|"fetches activity"| node_github
node_orchestrator -.->|"fetches news"| node_openbb
node_orchestrator -->|"fetches trends"| node_ossinsight
node_hn -->|"returns items"| node_orchestrator
node_reddit -->|"returns items"| node_orchestrator
node_rss -->|"returns items"| node_orchestrator
node_telegram -->|"returns items"| node_orchestrator
node_twitter -->|"returns items"| node_orchestrator
node_github -->|"returns items"| node_orchestrator
node_openbb -.->|"returns items"| node_orchestrator
node_ossinsight -->|"returns items"| node_orchestrator
node_orchestrator -->|"merges duplicates"| node_dedup
node_dedup -->|"returns merged items"| node_orchestrator
node_orchestrator -->|"scores items"| node_analyzer
node_analyzer -->|"requests scoring"| node_ai_provider
node_orchestrator -->|"enriches important items"| node_enricher
node_enricher -->|"requests related stories"| node_search
node_search -->|"searches stories"| node_web_sources
node_orchestrator -->|"generates briefings"| node_summarizer
node_summarizer -->|"requests summaries"| node_ai_provider
node_orchestrator -->|"publishes briefing"| node_site
node_orchestrator -->|"sends newsletter"| node_email
node_email -->|"delivers email"| node_reader_channels
node_orchestrator -->|"sends notifications"| node_webhook
node_webhook -->|"posts messages"| node_reader_channels
node_reader -->|"invokes tools"| node_mcp_server
node_mcp_server -->|"dispatches requests"| node_mcp_service
node_mcp_service -->|"runs pipeline stages"| node_orchestrator
node_mcp_service -->|"stores run stages"| node_run_store
node_mcp_service -->|"reads run stages"| node_run_store

click node_cli "https://github.com/ethan851/horizon_message_get/blob/main/src/main.py"
click node_wizard "https://github.com/ethan851/horizon_message_get/blob/main/src/setup/wizard.py"
click node_config "https://github.com/ethan851/horizon_message_get/blob/main/src/storage/manager.py"
click node_models "https://github.com/ethan851/horizon_message_get/blob/main/src/models.py"
click node_orchestrator "https://github.com/ethan851/horizon_message_get/blob/main/src/orchestrator.py"
click node_hn "https://github.com/ethan851/horizon_message_get/blob/main/src/scrapers/hackernews.py"
click node_reddit "https://github.com/ethan851/horizon_message_get/blob/main/src/scrapers/reddit.py"
click node_rss "https://github.com/ethan851/horizon_message_get/blob/main/src/scrapers/rss.py"
click node_telegram "https://github.com/ethan851/horizon_message_get/blob/main/src/scrapers/telegram.py"
click node_twitter "https://github.com/ethan851/horizon_message_get/blob/main/src/scrapers/twitter.py"
click node_github "https://github.com/ethan851/horizon_message_get/blob/main/src/scrapers/github.py"
click node_openbb "https://github.com/ethan851/horizon_message_get/blob/main/src/scrapers/openbb.py"
click node_ossinsight "https://github.com/ethan851/horizon_message_get/blob/main/src/scrapers/ossinsight.py"
click node_dedup "https://github.com/ethan851/horizon_message_get/blob/main/src/orchestrator.py"
click node_analyzer "https://github.com/ethan851/horizon_message_get/blob/main/src/ai/analyzer.py"
click node_enricher "https://github.com/ethan851/horizon_message_get/blob/main/src/ai/enricher.py"
click node_search "https://github.com/ethan851/horizon_message_get/blob/main/src/search.py"
click node_summarizer "https://github.com/ethan851/horizon_message_get/blob/main/src/ai/summarizer.py"
click node_email "https://github.com/ethan851/horizon_message_get/blob/main/src/services/email.py"
click node_webhook "https://github.com/ethan851/horizon_message_get/blob/main/src/services/webhook.py"
click node_site "https://github.com/ethan851/horizon_message_get/blob/main/src/orchestrator.py"
click node_mcp_server "https://github.com/ethan851/horizon_message_get/blob/main/src/mcp/server.py"
click node_mcp_service "https://github.com/ethan851/horizon_message_get/blob/main/src/mcp/service.py"
click node_run_store "https://github.com/ethan851/horizon_message_get/blob/main/src/mcp/run_store.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_cli,node_wizard,node_config,node_models,node_reader toneBlue
class node_hn,node_reddit,node_rss,node_telegram,node_twitter,node_github,node_openbb,node_ossinsight toneAmber
class node_orchestrator,node_dedup,node_analyzer,node_enricher,node_search,node_summarizer,node_ai_provider toneMint
class node_email,node_webhook,node_site toneRose
class node_mcp_server,node_mcp_service,node_run_store,node_web_sources,node_reader_channels toneIndigo
```

## Components

### Entry and Configuration

- [Daily CLI](https://github.com/ethan851/horizon_message_get/blob/main/src/main.py): `src/main.py`
- [Setup Wizard](https://github.com/ethan851/horizon_message_get/blob/main/src/setup/wizard.py): `src/setup/wizard.py`
- [Config and State](https://github.com/ethan851/horizon_message_get/blob/main/src/storage/manager.py): `src/storage/manager.py`
- [Domain Models](https://github.com/ethan851/horizon_message_get/blob/main/src/models.py): `src/models.py`

### Source Collection

- [Hacker News](https://github.com/ethan851/horizon_message_get/blob/main/src/scrapers/hackernews.py): `src/scrapers/hackernews.py`
- [Reddit](https://github.com/ethan851/horizon_message_get/blob/main/src/scrapers/reddit.py): `src/scrapers/reddit.py`
- [RSS Feeds](https://github.com/ethan851/horizon_message_get/blob/main/src/scrapers/rss.py): `src/scrapers/rss.py`
- [Telegram](https://github.com/ethan851/horizon_message_get/blob/main/src/scrapers/telegram.py): `src/scrapers/telegram.py`
- [Twitter/X](https://github.com/ethan851/horizon_message_get/blob/main/src/scrapers/twitter.py): `src/scrapers/twitter.py`
- [GitHub Activity](https://github.com/ethan851/horizon_message_get/blob/main/src/scrapers/github.py): `src/scrapers/github.py`
- [OpenBB News](https://github.com/ethan851/horizon_message_get/blob/main/src/scrapers/openbb.py): `src/scrapers/openbb.py`
- [OSSInsight](https://github.com/ethan851/horizon_message_get/blob/main/src/scrapers/ossinsight.py): `src/scrapers/ossinsight.py`

### Story Analysis

- [Pipeline Orchestrator](https://github.com/ethan851/horizon_message_get/blob/main/src/orchestrator.py): `src/orchestrator.py`
- [Cross-source Merge](https://github.com/ethan851/horizon_message_get/blob/main/src/orchestrator.py): `src/orchestrator.py`
- [Scoring and Analysis](https://github.com/ethan851/horizon_message_get/blob/main/src/ai/analyzer.py): `src/ai/analyzer.py`
- [Context Enrichment](https://github.com/ethan851/horizon_message_get/blob/main/src/ai/enricher.py): `src/ai/enricher.py`
- [Related Story Search](https://github.com/ethan851/horizon_message_get/blob/main/src/search.py): `src/search.py`
- [Briefing Summaries](https://github.com/ethan851/horizon_message_get/blob/main/src/ai/summarizer.py): `src/ai/summarizer.py`

### Briefing Delivery

- [Email Newsletter](https://github.com/ethan851/horizon_message_get/blob/main/src/services/email.py): `src/services/email.py`
- [Webhook Notifications](https://github.com/ethan851/horizon_message_get/blob/main/src/services/webhook.py): `src/services/webhook.py`
- [Daily Site Output](https://github.com/ethan851/horizon_message_get/blob/main/src/orchestrator.py): `src/orchestrator.py`

### Automation Interfaces

- [MCP Server](https://github.com/ethan851/horizon_message_get/blob/main/src/mcp/server.py): `src/mcp/server.py`
- [Staged Pipeline Service](https://github.com/ethan851/horizon_message_get/blob/main/src/mcp/service.py): `src/mcp/service.py`
- [Run Artifacts](https://github.com/ethan851/horizon_message_get/blob/main/src/mcp/run_store.py): `src/mcp/run_store.py`

### Other components

- **Horizon User**
- **AI Model APIs**
- **Web Search**
- **Delivery Channels**

## Connections

- Horizon User → Daily CLI: runs
- Horizon User → Setup Wizard: configures
- Setup Wizard → Config and State: saves config
- Daily CLI → Config and State: loads config
- Daily CLI → Pipeline Orchestrator: starts run
- Config and State → Pipeline Orchestrator: provides settings
- Pipeline Orchestrator → Hacker News: fetches stories
- Pipeline Orchestrator → Reddit: fetches posts
- Pipeline Orchestrator → RSS Feeds: fetches feeds
- Pipeline Orchestrator → Telegram: fetches posts
- Pipeline Orchestrator → Twitter/X: fetches activity
- Pipeline Orchestrator → GitHub Activity: fetches activity
- Pipeline Orchestrator → OpenBB News: fetches news
- Pipeline Orchestrator → OSSInsight: fetches trends
- Hacker News → Pipeline Orchestrator: returns items
- Reddit → Pipeline Orchestrator: returns items
- RSS Feeds → Pipeline Orchestrator: returns items
- Telegram → Pipeline Orchestrator: returns items
- Twitter/X → Pipeline Orchestrator: returns items
- GitHub Activity → Pipeline Orchestrator: returns items
- OpenBB News → Pipeline Orchestrator: returns items
- OSSInsight → Pipeline Orchestrator: returns items
- Pipeline Orchestrator → Cross-source Merge: merges duplicates
- Cross-source Merge → Pipeline Orchestrator: returns merged items
- Pipeline Orchestrator → Scoring and Analysis: scores items
- Scoring and Analysis → AI Model APIs: requests scoring
- Pipeline Orchestrator → Context Enrichment: enriches important items
- Context Enrichment → Related Story Search: requests related stories
- Related Story Search → Web Search: searches stories
- Pipeline Orchestrator → Briefing Summaries: generates briefings
- Briefing Summaries → AI Model APIs: requests summaries
- Pipeline Orchestrator → Daily Site Output: publishes briefing
- Pipeline Orchestrator → Email Newsletter: sends newsletter
- Email Newsletter → Delivery Channels: delivers email
- Pipeline Orchestrator → Webhook Notifications: sends notifications
- Webhook Notifications → Delivery Channels: posts messages
- Horizon User → MCP Server: invokes tools
- MCP Server → Staged Pipeline Service: dispatches requests
- Staged Pipeline Service → Pipeline Orchestrator: runs pipeline stages
- Staged Pipeline Service → Run Artifacts: stores run stages
- Staged Pipeline Service → Run Artifacts: reads run stages
