Skip to content

hyhmrright/StockAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

91 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

StockAI

English | ็ฎ€ไฝ“ไธญๆ–‡

StockAI Dashboard

StockAI 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, providing investors with data-driven insights.

๐ŸŒŸ Key Features

  • Multi-source News Scraping: Automatically collects real-time stock news from Google Finance and Yahoo Finance, with full support for US stocks and Chinese A-shares (Shanghai, Shenzhen, and Beijing Stock Exchange).
  • Deep AI Analysis: Supports OpenAI (GPT-4o) and Ollama (local models). Deep Mode extracts full article content for richer analysis; disable it for faster results.
  • Editable Watchlist: Add and remove stocks freely โ€” the list persists across sessions via local storage.
  • Modern UI Design: Features a Glassmorphism design language with immersive settings management and real-time analysis progress feedback.
  • Local-first: All API configurations and personalized settings are securely stored locally, never leaving your device.

๐Ÿ—๏ธ Architecture Overview

  1. Frontend (UI Layer): React 19 + TypeScript + Vite. Responsible for view rendering and user interaction.
  2. Core Orchestration (Tauri Core): Rust. Manages local persistence, system integration, and Sidecar process scheduling.
  3. Analysis Engine (Sidecar): Based on the Bun runtime. Uses Playwright for web scraping and integrates AI models for text processing.

๐Ÿ“ฆ Installation

Pre-built binaries are available on the Releases page.

macOS โ€” "StockAI is damaged" error

macOS Gatekeeper blocks apps that aren't notarized by an Apple Developer certificate. Run this command in Terminal to remove the quarantine flag:

xattr -cr /Applications/StockAI.app

Then open the app normally. This is safe โ€” the app contains no network backdoors and the full source code is auditable in this repository.

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.

Windows โ€” SmartScreen warning

Click More info โ†’ Run anyway. This appears for any unsigned executable.

Linux (.deb)

sudo dpkg -i StockAI_*_amd64.deb

Requires WebKitGTK (pre-installed on most GNOME-based distros).


๐Ÿš€ Quick Start

Prerequisites

1. Install Dependencies

# Install all dependencies using Bun
bun install

2. Prepare Sidecar Binaries

Tauri's Sidecar mechanism requires specifically named binaries. Compile the Sidecar before running:

# macOS ARM64 (Apple Silicon)
bun build sidecar/index.ts --compile --outfile sidecar/stockai-backend-aarch64-apple-darwin

# Windows x86_64
bun build sidecar/index.ts --compile --outfile sidecar/stockai-backend-x86_64-pc-windows-msvc.exe

# Linux x86_64
bun build sidecar/index.ts --compile --outfile sidecar/stockai-backend-x86_64-unknown-linux-gnu

3. Start Development Environment

bun tauri dev

๐Ÿงช Testing

The project uses a multi-layered testing system:

  • Frontend Tests (Vitest): bunx vitest run
  • Sidecar Logic Tests (Bun): cd sidecar && bun test
  • Rust Core Tests (Cargo): cd src-tauri && cargo test
  • Integrated Smoke Test: bun scripts/smoke-test.ts

๐Ÿ› ๏ธ Tech Stack

  • Desktop Framework: Tauri 2.0 (Rust)
  • Frontend Framework: React 19, TailwindCSS 4, Lucide Icons, Lightweight Charts
  • Scraper/Backend: Bun, Playwright, NodeHtmlMarkdown
  • AI Integration: OpenAI SDK, Ollama SDK

๐Ÿ“… Development Conventions

  • Code Comments: All logic comments must use Chinese (as per project preference).
  • Architecture Principles: Strictly follow Clean Architecture with unidirectional dependency flow (UI -> Core -> Sidecar).
  • Test Driven: All parsing logic must be verified by offline unit tests.

๐Ÿ“„ License

MIT License

About

๐Ÿค– AI-powered stock news analyzer โ€” real-time scraping + LLM sentiment analysis. Supports GPT-4o & local Ollama models. Built with Tauri v2, React, Bun & Playwright.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages