A self-hosted stock portfolio tracker and analysis tool. StockPilot combines a Go REST API backend with a SvelteKit frontend to give you real-time quotes, portfolio tracking, valuation models, allocation analysis, and more - all powered by Yahoo Finance data.
Grab the latest binary from the Releases page.
Linux
chmod +x stockpilot-linux-amd64
./stockpilot-linux-amd64
Windows
Just double-click stockpilot-windows-amd64.exe.
StockPilot will open your browser automatically at http://localhost:8080. Your data is stored in stockpilot.db in the same directory.
git clone https://github.com/RainyRoot/StockPilot.git
cd StockPilot
make dev
The backend API starts on http://localhost:8080 and the SvelteKit frontend on http://localhost:5173.
| Component | Technology |
|---|---|
| Backend | Go 1.25+, chi router, raw SQL |
| Database | SQLite (modernc.org/sqlite, pure Go) |
| Frontend | SvelteKit 2, Svelte 5, TypeScript, Vite |
| Charts | Chart.js |
| Data Source | Yahoo Finance (unofficial JSON API) |
| Markets | US (NYSE, NASDAQ) + DE (XETRA) |
| Package Manager | pnpm |
StockPilot/
├── backend/
│ ├── cmd/server/ # Application entrypoint
│ ├── internal/
│ │ ├── config/ # Environment-based configuration
│ │ ├── domain/ # Pure domain types
│ │ ├── handler/ # HTTP handlers, router, middleware
│ │ ├── repository/ # Repository interfaces + SQLite implementation
│ │ ├── scraper/ # Yahoo Finance data provider
│ │ └── service/ # Business logic layer
│ └── pkg/
│ ├── httputil/ # JSON response helpers
│ └── money/ # Cent-based arithmetic (int64)
├── frontend/
│ └── src/
│ ├── lib/
│ │ ├── api/ # Typed API client modules
│ │ ├── components/ # Svelte components (charts, skeleton, toast)
│ │ └── utils/ # Formatting utilities
│ └── routes/ # SvelteKit pages
└── Makefile
Pull and run the complete application:
docker pull ghcr.io/rainyroot/stockpilot:latest
docker run -d \
-p 8080:8080 \
-v stockpilot-data:/data \
-e DB_PATH=/data/stockpilot.db \
ghcr.io/rainyroot/stockpilot:latest
Access the web UI at http://localhost:8080.
All endpoints live under /api/v1. Key routes:
GET /api/v1/stocks/search?q=AAPL - Search tickersGET /api/v1/stocks/{ticker} - Live quoteGET /api/v1/portfolios - List portfoliosPOST /api/v1/portfolios/{id}/trades - Record a tradeGET /api/v1/dashboard - Dashboard overviewGET /api/v1/valuation/{ticker} - Valuation analysisGET /api/v1/settings - User settings