Luke a Pro

Luke Sun

Developer & Marketer

🇺🇦
EN||
XAUUSD Event Radar headless pipeline diagram

XAUUSD Event Radar

production
Data WorkflowEvent PipelineHeadlessPythonFastAPIPostgreSQLReactViteDockerHomeLabAIMonitoringPublic APITelegramXAUUSD

專案概覽

XAUUSD Event Radar 是一個用於監控可能影響黃金(XAU/USD)的公開資訊的 headless 事件處理系統。它不預測價格方向,不提供交易指令,也不進行自動交易。它的任務是把雜訊很高、碎片化的公開資訊整理成結構化、可稽核的事件。

系統從多個資訊渠道採集公開訊號,保存原始記錄,先透過規則進行預處理,再使用 AI 輔助完成相關性判斷和 claim extraction,生成標準化事件,並將事件路由到私人提醒、公共發布佇列和 public-safe website payload。

這是一個由我個人企劃、設計、編碼、部署並持續維護的系統。news.thetickbase.com 是由這個系統生成的一個下游公共頻道;Event Radar 本身則是支撐該頻道的 headless pipeline。

產品架構

  • Headless service monorepo - 專案由多個獨立 Python services 和一個 React operator dashboard 組成。每個 service 都有自己的 settings.pydb.py、models、Dockerfile、tests 與部署邊界。
  • PostgreSQL 作為 source of truth - 系統使用 PostgreSQL 保存 raw records、processing state、normalized events、claims、route decisions、alert queues、public outbox rows、model usage records、source health 與 public sync state。V1 架構中沒有引入 message broker。
  • 可靠 work queue pattern - normalizer-classifier 透過 row locking 和 retry metadata 從 raw_item_processing claim 工作,使任務狀態可見、可恢復,也方便在 HomeLab 運行時 debug。
  • Collector layer - telegram-collectorrss-collector 與 specialized consumers 負責採集公開資訊流、標準化 source metadata、去重、更新 source health,並寫入 processing rows;collector 不判斷事件價值。
  • 規則優先的語義層 - normalizer-classifier 負責清洗、語言處理、keyword 與 source-priority 初篩、near-duplicate 處理、摘要生成、相關性評分、事件建立與簡化 claim extraction。
  • 帶成本保護的 AI - 模型呼叫按職責拆分:低風險翻譯與摘要任務和分類推理任務分離。runtime budget caps 可以避免 backfill 或 reset 時意外產生大量付費模型呼叫。
  • 集中式路由 - event-router 是唯一決定事件應進入哪些出口的 service。它寫入 private alert queues、public outbox rows 與 per-route audit records;delivery workers 只負責如何發送。
  • 多渠道 delivery - alert-dispatcher 處理私人 Telegram 與 Pushover;telegram-channel-publisherx-publisherpublic-syncer 則消費 public outbox rows,用於公共頻道和網站同步。
  • Public/private boundary - public-syncer 只透過 outbound HTTPS 將核准後的 public-safe payload 從私有 HomeLab 系統推送到 VPS public-api。公共 stack 使用獨立資料庫,不保存 raw collector metadata、prompts、私人通知設定、credentials 或內部 debug data。
  • Operator dashboard - dashboard-apidashboard-web 提供私有內部視圖,用於查看 timeline、events、sources、processing state、alerts、taxonomy、AI usage 與 public outbox review。

主要功能

  • 以事件為中心的監控 - 將碎片化公開資訊轉換為包含 severity、relevance、confirmation state、tags、source attribution 與 public summaries 的事件記錄。
  • Source-aware processing - 把 source group、authority level、stance、reliability 與 confirmation requirements 作為 pipeline 的輸入,而不是普通文字 metadata。
  • 可稽核路由 - 每個 route 都可以記錄事件為何被 queued 或 skipped,讓 delivery policy 可以被審查,而不是隱藏在 publisher code 中。
  • 私人與公共出口 - 同一個 normalized event 可以根據 route policy 成為私人提醒、Telegram channel post、未來的 X post 或 public website payload。
  • 嚴格的 public-safe contract - 公共網站 payload 比內部 event schema 更窄,用於保護 raw text、internal metadata、prompts、model outputs、credentials 與 private delivery state。
  • HomeLab-first deployment - Production deployment 基於 Docker Compose,images 推送到 GHCR,資料庫 migration 由 one-shot job 執行,公共發布功能預設關閉,只有明確啟用後才會發送。

Related Projects

TickBase News 公共事件雷達頁面

TickBase News

一個由事件處理管線生成的 public-safe event stream,用於追蹤與 XAUUSD 相關的宏觀、政策、能源與地緣風險事件。

Data WorkflowEvent PipelinePublic WebsitePython +10
GoldWatch.live 宏觀儀表板,包含 Gold Score 與 XAUUSD 圖表

GoldWatch.live

一個即時黃金宏觀儀表板,將市場、宏觀、部位、交易時段與新聞輸入整理為可解釋的 XAUUSD 監控資料工作流。

Data WorkflowSaaSMarket DataGold +12