DEV Community

Cover image for 🤖 StockAI: I Built an AI-Powered StockAI News Analyzer That Supports OpenAI, Claude, DeepSeek & Local LLMs
hyhmrright
hyhmrright

Posted on

🤖 StockAI: I Built an AI-Powered StockAI News Analyzer That Supports OpenAI, Claude, DeepSeek & Local LLMs

If you've ever wanted a desktop app that reads stock news for you and tells you — with AI — whether it's bullish or bearish, StockAI is exactly that. I'm excited to share this open-source project with the DEV community!

What is StockAI?

StockAI is a cross-platform desktop application built with Tauri 2, React 19, Bun, and Playwright. It scrapes real-time stock news (US stocks + Chinese A-shares), runs the articles through your choice of LLM, and presents a clean sentiment analysis dashboard with interactive K-line charts.

StockAI Dashboard Screenshot

Think of it as your personal AI financial analyst running 100% locally — no subscriptions, no data leaks, just insights.


🌟 Key Features

1. Pluggable AI Providers — Switch with a Dropdown

StockAI supports five AI providers out of the box:

  • OpenAI (GPT-4o and friends)
  • Anthropic (Claude 3.5 Sonnet)
  • DeepSeek (DeepSeek V4 Pro)
  • GLM (GLM-5.1)
  • Ollama (any local model — Llama 3, Mistral, Qwen, etc.)

Each provider stores its own API key, base URL, and model selection. You can switch between them via a single dropdown. And importantly: analysis is explicitly triggered, meaning switching stocks never silently burns your tokens.

2. Real-Time News Scraping

News is fetched via Google News RSS (no heavy Chromium boot required for most stocks). If RSS doesn't cut it, Playwright takes over as a fallback for deeper scraping.

It supports:

  • US stocks (NYSE, NASDAQ)
  • Chinese A-shares: Shanghai (SH), Shenzhen (SZ), and Beijing (BJ) Stock Exchanges

3. Interactive K-Line Charts (Powered by Lightweight Charts)

The central panel features a full-featured candlestick chart with:

  • MA / BOLL overlays
  • 9 time periods: 1D / 5D / 1M / 3M / 6M / YTD / 1Y / 5Y / All
  • Sub-chart indicators: MACD, RSI, KDJ, OBV, VWAP
  • Logarithmic scale, dividend-adjusted prices
  • Real-time price merged into the last candle during trading hours

4. Three-Column Dashboard Layout

The dark-themed UI is split into three columns:

  • Left: Watchlist sidebar with quick-add input (persists across sessions)
  • Center: Stock detail panel — real-time price card, K-line chart, news feed
  • Right: AI analysis panel — sentiment ratio bar, company profile, color-coded bullish/bearish factor cards

5. Local-First Privacy

All your API keys, watchlists, and settings live locally on your machine. Nothing is sent to any StockAI server (there isn't one).

6. Deep Mode

Enable "Deep Mode" to have the scraper extract the full article content (not just headlines), giving the LLM far more context for richer sentiment analysis.


🏗️ Architecture

StockAI follows Clean Architecture with a strict unidirectional dependency flow:

UI (React + TypeScript + Vite)
    ↓
Core Orchestration (Tauri / Rust)
    ↓
Analysis Engine (Bun Sidecar + Playwright + AI SDKs)
Enter fullscreen mode Exit fullscreen mode

The Bun sidecar is compiled into a standalone binary, managed by Tauri's sidecar mechanism. This keeps the frontend fast and the heavy scraping/AI work isolated.


🚀 Getting Started

Download (Recommended)

Pre-built binaries for macOS, Windows, and Linux are on the Releases page.

macOS users: If you see "damaged app" — this is just Gatekeeper. Run:

xattr -cr /Applications/StockAI.app
Enter fullscreen mode Exit fullscreen mode

Windows users: Click "More info → Run anyway" on the SmartScreen dialog.

Build from Source

# Prerequisites: Bun + Rust

# 1. Install dependencies
bun install

# 2. Compile the sidecar (example for macOS ARM64)
bun build sidecar/index.ts --compile --outfile sidecar/stockai-backend-aarch64-apple-darwin

# 3. Start dev mode
bun tauri dev
Enter fullscreen mode Exit fullscreen mode

🛠️ Tech Stack

Layer Technology
Desktop Shell Tauri 2.0 (Rust)
Frontend React 19, TypeScript, TailwindCSS 4
Charts Lightweight Charts, Lucide Icons
Scraper Bun, Playwright, NodeHtmlMarkdown
AI SDKs OpenAI, Anthropic, Ollama

💡 Why I Built This

As someone interested in both AI and markets, I was frustrated by how scattered the workflow was: open a news site, read a few articles, try to gauge sentiment, check the chart on another tab. StockAI puts it all in one clean desktop app.

I also wanted something that works without vendor lock-in — if OpenAI's pricing goes up, I can switch to local Ollama models with zero friction.


🤝 Contributing

The project is fully open source under the MIT License. Contributions, issues, and stars are very welcome!

👉 GitHub: https://github.com/hyhmrright/StockAI

Whether you want to add a new AI provider, improve scraping coverage, add more chart indicators, or just fix a typo — PRs are welcome. The codebase is clean and well-structured, making it easy to jump in.


What's Next?

Some ideas on the roadmap:

  • Price alert notifications (already in progress!)
  • Stock screener with batch quant scanning
  • More exchange support (Europe, Japan)
  • Portfolio tracking integration

If you find StockAI useful, drop a ⭐ on GitHub — it really helps the project grow. And if you build something with it or have feedback, let me know in the comments below!

Happy trading 📈


💬 Quick question for you: Which AI provider would you use with StockAI — OpenAI, Claude, DeepSeek, or a local Ollama model? And what stock markets do you care about most (US, China, or somewhere else)? Drop it in the comments — your answer might shape the next feature!

Top comments (0)