{"id":48676156,"url":"https://github.com/hyhmrright/stockai","last_synced_at":"2026-05-30T05:01:27.906Z","repository":{"id":349466503,"uuid":"1202099347","full_name":"hyhmrright/StockAI","owner":"hyhmrright","description":"🤖 AI-powered stock news analyzer — real-time scraping + LLM sentiment analysis with pluggable providers (OpenAI / Anthropic / DeepSeek / Ollama). Built with Tauri 2, React, Bun \u0026 Playwright. Supports US stocks and A-shares (Shanghai/Shenzhen/Beijing).","archived":false,"fork":false,"pushed_at":"2026-05-23T03:28:52.000Z","size":77820,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-23T05:29:02.025Z","etag":null,"topics":["ai","ai-tools","bun","desktop-app","financial-analysis","llm","news-analysis","ollama","openai","playwright","react","rust","sentiment-analysis","stock-analysis","stock-market","tauri","tauri-v2","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/hyhmrright/StockAI/releases/latest","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyhmrright.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-05T15:43:21.000Z","updated_at":"2026-05-23T03:28:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hyhmrright/StockAI","commit_stats":null,"previous_names":["hyhmrright/stockai"],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/hyhmrright/StockAI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyhmrright%2FStockAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyhmrright%2FStockAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyhmrright%2FStockAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyhmrright%2FStockAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyhmrright","download_url":"https://codeload.github.com/hyhmrright/StockAI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyhmrright%2FStockAI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33680527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-tools","bun","desktop-app","financial-analysis","llm","news-analysis","ollama","openai","playwright","react","rust","sentiment-analysis","stock-analysis","stock-market","tauri","tauri-v2","typescript"],"created_at":"2026-04-10T15:15:12.649Z","updated_at":"2026-05-30T05:01:27.848Z","avatar_url":"https://github.com/hyhmrright.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StockAI\n\n[English](./README.md) | [简体中文](./README.zh-CN.md)\n\n![StockAI Dashboard](./docs/screenshot-dashboard.png)\n\nStockAI is a modern cross-platform desktop application built with **Tauri 2.0**. It leverages AI technology to perform deep sentiment analysis and scoring on real-time stock news, and provides interactive K-line charts with technical indicators, giving investors data-driven insights in one place.\n\n## 🌟 Key Features\n\n- **Multi-source News Scraping**: Automatically collects real-time stock news via Google News RSS (no Chromium needed) with Playwright fallback, supporting US stocks and Chinese A-shares (Shanghai, Shenzhen, and Beijing Stock Exchange).\n- **Deep AI Analysis**: Supports OpenAI (GPT-4o), Anthropic (Claude 3.5 Sonnet), DeepSeek (DeepSeek V4 Pro), GLM (GLM-5.1), and Ollama (local models). Each provider keeps its own API key / base URL / model; switch active provider via a dropdown. Analysis is **explicitly triggered** — switching stocks never silently consumes tokens. Deep Mode extracts full article content for richer analysis.\n- **Interactive K-line Chart**: Candlestick chart with MA / BOLL overlays, nine time periods (1D / 5D / 1M / 3M / 6M / YTD / 1Y / 5Y / All), sub-chart indicators (MACD / RSI / KDJ / OBV / VWAP), logarithmic scale, dividend-adjusted price modes, comparison baseline, and real-time price merged into the last candle during trading hours.\n- **Editable Watchlist**: Add and remove stocks freely via the sidebar quick-add input — the list persists across sessions via local storage.\n- **Three-Column Dashboard**: A dark-theme three-column layout — left watchlist sidebar, central stock detail panel (real-time price card, K-line chart, news feed), and a right AI analysis panel displaying the sentiment ratio bar, company profile, and color-coded bullish / bearish factor cards. Settings and a global search bar are pinned to the top toolbar.\n- **Local-first**: All API configurations and personalized settings are securely stored locally, never leaving your device.\n\n## 🏗️ Architecture Overview\n\n1.  **Frontend (UI Layer)**: React 19 + TypeScript + Vite. Responsible for view rendering and user interaction.\n2.  **Core Orchestration (Tauri Core)**: Rust. Manages local persistence, system integration, and Sidecar process scheduling.\n3.  **Analysis Engine (Sidecar)**: Based on the Bun runtime. Uses Playwright for web scraping and integrates AI models for text processing.\n\n## 📦 Installation\n\nPre-built binaries are available on the [Releases](https://github.com/hyhmrright/StockAI/releases/latest) page.\n\n### macOS — \"StockAI is damaged\" error\n\nmacOS Gatekeeper blocks apps that aren't notarized by an Apple Developer certificate. Run this command in Terminal to remove the quarantine flag:\n\n```bash\nxattr -cr /Applications/StockAI.app\n```\n\nThen open the app normally. This is safe — the app contains no network backdoors and the full source code is auditable in this repository.\n\n\u003e **Why this happens:** Apps downloaded from the internet receive a quarantine attribute. Without an Apple code-signing certificate, macOS shows \"damaged\" instead of the usual \"unknown developer\" prompt.\n\n### Windows — SmartScreen warning\n\nClick **More info → Run anyway**. This appears for any unsigned executable.\n\n### Linux (.deb)\n\n```bash\nsudo dpkg -i StockAI_*_amd64.deb\n```\n\nRequires WebKitGTK (pre-installed on most GNOME-based distros).\n\n---\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- **Bun**: Primary package manager and Sidecar runtime. [Install Bun](https://bun.sh/)\n- **Rust**: For building the Tauri core. [Install Rust](https://www.rust-lang.org/)\n### 1. Install Dependencies\n\n```bash\n# Install all dependencies using Bun\nbun install\n```\n\n### 2. Prepare Sidecar Binaries\n\nTauri's Sidecar mechanism requires specifically named binaries. Compile the Sidecar before running:\n\n```bash\n# macOS ARM64 (Apple Silicon)\nbun build sidecar/index.ts --compile --outfile sidecar/stockai-backend-aarch64-apple-darwin\n\n# Windows x86_64\nbun build sidecar/index.ts --compile --outfile sidecar/stockai-backend-x86_64-pc-windows-msvc.exe\n\n# Linux x86_64\nbun build sidecar/index.ts --compile --outfile sidecar/stockai-backend-x86_64-unknown-linux-gnu\n```\n\n### 3. Start Development Environment\n\n```bash\nbun tauri dev\n```\n\n## 🧪 Testing\n\nRun all tests with a single command (no GNU `timeout` required):\n\n```bash\nbun run test\n```\n\nIndividual layers:\n\n- **Frontend Tests (Vitest)**: `bunx vitest run`\n- **Sidecar Logic Tests (Bun)**: `cd sidecar \u0026\u0026 bun test`\n- **Rust Core Tests (Cargo)**: `cd src-tauri \u0026\u0026 cargo test`\n- **Integrated Smoke Test**: `bun scripts/smoke-test.ts`\n\n## 🛠️ Tech Stack\n\n- **Desktop Framework**: Tauri 2.0 (Rust)\n- **Frontend Framework**: React 19, TailwindCSS 4, Lucide Icons, Lightweight Charts\n- **Scraper/Backend**: Bun, Playwright, NodeHtmlMarkdown\n- **AI Integration**: OpenAI SDK, Anthropic SDK, Ollama SDK (DeepSeek / GLM via OpenAI-compatible API)\n\n## 📅 Development Conventions\n\n- **Code Comments**: All logic comments must use **Chinese** (as per project preference).\n- **Architecture Principles**: Strictly follow Clean Architecture with unidirectional dependency flow (UI -\u003e Core -\u003e Sidecar).\n- **Test Driven**: All parsing logic must be verified by offline unit tests.\n\n## 📄 License\n\nMIT License\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyhmrright%2Fstockai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyhmrright%2Fstockai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyhmrright%2Fstockai/lists"}