GitHub Project Intelligence for Engineers
Don't just count stars — catch rising stars early.
StarScope 是一款開源桌面應用,幫助工程師以**動能(velocity)**而非絕對數字追蹤 GitHub 專案趨勢。 透過 star 加速度分析、異常偵測與 Hacker News 情境整合,讓你在眾人之前發現 Rising Star。
為什麼選擇 StarScope?
- 📡 動能追蹤 — 觀察速度與加速度,而非靜態 star 數字
- 🔔 主動通知 — 自訂警報規則 + OS 層級推播通知
- 🧠 智慧推薦 — 基於 topics 與語言的相似專案推薦
- 📊 儀表板總覽 — 一眼掌握所有追蹤專案的關鍵指標
核心定位:StarScope 是工程師的「專案雷達」,不是「專案目錄」。
%%{init: {'theme': 'dark'}}%%
mindmap
root((StarScope))
追蹤與分析
Watchlist 專案追蹤
Velocity / Acceleration 分析
7/30/90 天趨勢偵測
Star 歷史回填
語言分佈
警報與通知
自訂警報規則
應用內通知中心
OS 層級推播通知
Hacker News 熱門偵測
智慧功能
相似專案推薦
早期訊號偵測
異常偵測 Sudden Spike
Dashboard 儀表板
資料管理
批次匯入 CSV/JSON/TXT
JSON / CSV 匯出
樹狀分類管理
GitHub OAuth 認證
使用者體驗
中/英雙語
淺色/深色主題
虛擬滾動
頁面過場動畫
%%{init: {'theme': 'dark'}}%%
graph TB
subgraph Desktop["Desktop Client"]
direction TB
subgraph UI["React 19 + TypeScript"]
Pages["Pages\nDashboard / Watchlist / Trends\nDiscovery / Compare / Settings"]
Components["Components\nRepoCard / Charts / Badges\nNotificationCenter"]
end
subgraph Native["Rust Native"]
Tray["System Tray"]
Notify["OS Notifications"]
end
Pages --> Components
end
subgraph Engine["Data Engine — Python 3.12"]
direction TB
API["FastAPI :8008"]
subgraph Services["Core Services"]
Fetch["GitHub Fetcher"]
Analyze["Signal Analyzer"]
Detect["Anomaly Detector"]
Context["Context Fetcher"]
Recommend["Recommender"]
end
subgraph Data["Data Layer"]
DB[("SQLite")]
Sched["APScheduler"]
end
API --> Services
Services --> Data
Sched -.->|hourly| Fetch
end
subgraph Ext["External"]
GH["GitHub API"]
HN["Hacker News API"]
end
Components <-->|HTTP/JSON| API
Native -.->|IPC| API
Fetch --> GH
Context --> HN
classDef desktop fill:#1e293b,stroke:#334155,color:#f8fafc,font-weight:bold
classDef engine fill:#0f172a,stroke:#1e3a5f,color:#e2e8f0,font-weight:bold
classDef ext fill:#312e81,stroke:#4338ca,color:#e0e7ff,font-weight:bold
classDef node_default fill:#1e40af,stroke:#1d4ed8,color:#fff
class Desktop desktop
class Engine engine
class Ext ext
| 層級 | 技術 | 版本 |
|---|---|---|
| 桌面框架 | Tauri | v2 |
| 前端 | React + TypeScript | 19 / 5.8 |
| 狀態管理 | React Query + useReducer | v5 |
| 後端 | Python + FastAPI | 3.12 / 0.129+ |
| 儲存 | SQLite + SQLAlchemy | — |
| 動畫 | CSS @keyframes | — |
| 虛擬滾動 | react-window | v2 |
| 工具 | 版本 |
|---|---|
| Node.js | 20+ (LTS) |
| Rust | latest stable |
| Python | 3.12+ |
git clone https://github.com/Neal75418/StarScope.git
cd StarScope
# 前端依賴
npm install
# Python 依賴
cd sidecar && pip install -r requirements.txt && cd ..
# 環境設定(選用,提升 GitHub API 配額)
cp sidecar/.env.example sidecar/.env
# 編輯 sidecar/.env 填入 GITHUB_CLIENT_ID 或 GITHUB_TOKEN# 終端機 1 — Python sidecar
cd sidecar && python main.py
# 終端機 2 — Tauri 開發模式
npm run tauri devnpm run tauri build # 建置桌面應用
npm run test # 前端單元測試
cd sidecar && pytest tests/ -v # 後端測試
npm run test:e2e # E2E 測試StarScope/
├── src/ # React 前端(TypeScript)
│ ├── api/ # API 客戶端 + 自動生成型別
│ ├── components/ # UI 元件
│ │ ├── motion/ # CSS 動畫元件(FadeIn、AnimatedPage)
│ │ ├── settings/ # 設定頁面元件
│ │ └── ...
│ ├── constants/ # API、訊號類型、語言色彩
│ ├── contexts/ # WatchlistContext + Reducer
│ ├── hooks/ # 54 個 Custom Hooks
│ │ └── selectors/ # Watchlist selector hooks
│ ├── i18n/ # 英/繁中翻譯
│ ├── lib/ # React Query 設定
│ ├── pages/ # 6 個頁面
│ │ ├── Dashboard.tsx # 儀表板總覽
│ │ ├── Watchlist.tsx # 追蹤清單(虛擬滾動)
│ │ ├── Trends.tsx # 趨勢排行
│ │ ├── Discovery.tsx # 探索 GitHub
│ │ ├── Compare.tsx # 多專案對比
│ │ └── Settings.tsx # 設定與警報管理
│ ├── theme/ # 淺色/深色主題
│ ├── types/ # 共用 TypeScript 型別
│ └── utils/ # 工具函式(13 個模組)
│
├── src-tauri/ # Tauri 桌面層(Rust)
│ ├── src/
│ │ ├── main.rs # 進入點
│ │ └── lib.rs # Sidecar、Tray、Notification
│ ├── capabilities/ # 安全權限設定
│ └── tauri.conf.json # 視窗、CSP、Bundle 設定
│
├── sidecar/ # Python 資料引擎
│ ├── main.py # FastAPI 入口(port 8008)
│ ├── routers/ # 16 個路由模組
│ ├── services/ # 15 個業務邏輯服務
│ ├── schemas/ # Pydantic 資料模型
│ ├── db/ # SQLite + SQLAlchemy(11 張表)
│ ├── middleware/ # 日誌 + 限速中介層
│ ├── alembic/ # 資料庫遷移
│ └── tests/ # pytest 後端測試(471 個)
│
├── e2e/ # Playwright E2E 測試
└── .github/workflows/ # CI/CD(test + release)
所有端點使用統一 ApiResponse[T] 格式回傳 {success, data, message, error}。
共 16 個路由模組:
| 路由模組 | 前綴 | 說明 |
|---|---|---|
repos |
/api |
Repo CRUD、手動 fetch、批次刷新 |
alerts |
/api/alerts |
警報規則 CRUD、觸發記錄、確認 |
trends |
/api/trends |
趨勢排行(velocity / delta / acceleration) |
categories |
/api/categories |
分類管理、tree 結構、repo 歸類 |
early_signals |
/api/early-signals |
早期信號、異常偵測、批次確認 |
context |
/api/context |
HN 情境信號與徽章 |
charts |
/api/charts |
Star 歷史圖表資料(7d/30d/90d) |
recommendations |
/api/recommendations |
相似 repo 推薦、相似度計算 |
discovery |
/api/discovery |
GitHub 搜尋(限速 30/min) |
star_history |
/api/star-history |
Star 歷史回填(< 5000 stars) |
comparison |
/api/comparison |
多專案對比圖表資料 |
weekly_summary |
/api/summary |
每週摘要報告 |
export |
/api/export |
Watchlist JSON / CSV 匯出 |
github_auth |
/api/github-auth |
OAuth Device Flow、連線狀態 |
app_settings |
/api/settings |
排程間隔、快照保留、偵測門檻等設定管理 |
health |
/api |
健康檢查 |
📖 完整 API 文件可在開發模式下存取:
http://localhost:8008/api/docs(Swagger)/http://localhost:8008/api/redoc(ReDoc)
功能完整 — 專注核心價值的精簡設計。
| 模組 | 涵蓋範圍 |
|---|---|
| 🎯 核心追蹤 | Watchlist、Velocity 分析、趨勢偵測、Star 歷史回填 |
| 🔔 訊號系統 | HN 整合、警報規則、OS 推播通知、應用內通知中心 |
| 🧠 智慧功能 | 相似推薦、早期訊號偵測、Dashboard 儀表板 |
| 📦 資料管理 | 批次匯入(CSV/JSON/TXT)、JSON/CSV 匯出、樹狀分類 |
| 🌐 國際化與 UX | 英/繁中雙語、深淺主題、虛擬滾動、頁面動畫 |
| 🔑 GitHub 整合 | OAuth Device Flow、Rate Limit 感知、安全 Token 管理 |
測試覆蓋:前端 1,199 + 後端 471 = 1,670 個測試案例,E2E 11 specs / 44 tests
| 產品 | 定位 | StarScope 差異 |
|---|---|---|
| GitHub Trending | 今日熱門 | 觀察「動能」而非「絕對值」 |
| Star History | 歷史曲線 | 主動警報 + OS 通知 |
| OSS Insight | 資料儀表板 | 桌面原生 + 異常偵測 |
| LibHunt | 分類索引 | 專注追蹤、警報與智慧推薦 |
歡迎貢獻!詳見 CONTRIBUTING.md。
git checkout -b feature/your-feature # 建立分支
git commit -m "feat: ..." # 提交修改(Conventional Commits)
git push origin feature/your-feature # 推送並開啟 PR本專案採用 MIT License。
Tauri · React · FastAPI · React Query · Recharts · SQLAlchemy · react-window
Made with ❤️ by engineers, for engineers.