Split data layer into btcdata service

Remove DB, Binance WebSocket, and Kraken pollers from btcprice.
UI now uses vanilla EventSource connecting to btcdata for live
price updates. btcprice is now a pure UI service with no database.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-23 20:07:48 +01:00
co-authored by Claude Opus 4.6
parent c688846a26
commit 397d9f7b5c
21 changed files with 69 additions and 580 deletions
+3 -28
View File
@@ -32,34 +32,9 @@
{:routes #ig/ref :router/routes
:env #ig/ref :system/env}
:db.sql/connection
{:jdbc-url #env JDBC_URL}
:db.sql/query-fn
{:conn #ig/ref :db.sql/connection
:options {}
:filename "queries.sql"}
:db.sql/migrations
{:store :database
:db {:datasource #ig/ref :db.sql/connection}
:migrate-on-init? true}
:reitit.routes/api
{:base-path "/api"
:query-fn #ig/ref :db.sql/query-fn}
{:base-path "/api"}
:reitit.routes/ui
{:base-path ""
:query-fn #ig/ref :db.sql/query-fn
:binance #ig/ref :ws/binance}
:ws/binance
{:query-fn #ig/ref :db.sql/query-fn
:uri "wss://stream.binance.com:9443/ws/btcusdt@trade"}
:kraken/ohlc
{:query-fn #ig/ref :db.sql/query-fn}
:kraken/ohlc-day
{:query-fn #ig/ref :db.sql/query-fn}}
{:base-path ""
:btcdata-url #or [#env BTCDATA_URL "http://localhost:4100"]}}