Phase 2: Web dashboard with SSE real-time push

- dashboard.go: SSE hub + HTTP server + price history ring buffer
- static.go: //go:embed for static files
- web/static/index.html: Full dashboard HTML (6 panels)
- web/static/app.js: SSE client, Chart.js price chart, live table updates
- web/static/style.css: GitHub-style dark theme
- main.go: Start dashboard on :8888 + wire price recording + scan results

Dashboard features:
  - Real-time price table (6 coins × 4 exchanges)
  - Arbitrage opportunities table
  - Open positions view
  - Historical trades table (from SQLite)
  - Chart.js price chart with coin/exchange selector
  - Stats summary (total/converged/diverged/flat)
  - 🚫 Zero external Go dependencies (Chart.js loaded from CDN)
This commit is contained in:
jackyu66git
2026-05-03 17:38:26 +08:00
parent 0c1eaedcb6
commit c2489614a7
6 changed files with 1158 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
package main
import "embed"
//go:embed web/static/index.html web/static/app.js web/static/style.css
var staticFS embed.FS