Add BTC candlestick chart with local OHLC storage

- Store daily BTC OHLC candles in SQLite to avoid hitting CoinGecko on every load
- Seed with 30 days of daily candles on first boot (free tier gives daily granularity for days<=30)
- Auto-detect and replace coarse legacy candle data on startup
- Daily refresh adds new candles on each container restart
- New GET /candles endpoint (supports ?days=365 and ?days=all)
- Switch BTCHistoryChart to BTCCandlestickChart using lightweight-charts (TradingView)
- Purchase markers with nearest-candle matching and multi-purchase merging
- Fullscreen mode showing all stored candles
- Fix frontend port to 3001 and pass REACT_APP_API_URL as build arg

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-24 20:23:46 +01:00
parent 39404ca208
commit 79b565cfb6
10 changed files with 419 additions and 21 deletions
+2 -1
View File
@@ -8,7 +8,8 @@
"react-router-dom": "^6.22.0",
"react-scripts": "5.0.1",
"chart.js": "^4.4.0",
"react-chartjs-2": "^5.2.0"
"react-chartjs-2": "^5.2.0",
"lightweight-charts": "^4.2.0"
},
"scripts": {
"start": "react-scripts start",