Add README, update docker-compose and CLAUDE.md

Docker runs on port 4041 alongside local dev on 4000.
Include btcdata docker-compose for unified startup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-23 20:48:56 +01:00
co-authored by Claude Opus 4.6
parent 397d9f7b5c
commit ce343dfcf6
3 changed files with 51 additions and 18 deletions
+32
View File
@@ -0,0 +1,32 @@
# btcprice
Bitcoin price tracker UI. Serves an HTML page with live price updates streamed from [btcdata](../btcdata) via Server-Sent Events.
## Quick Start
```bash
# Start btcdata first (provides price data)
cd ../btcdata && make run
# Local dev
make run # starts on port 4000
make tailwind # watch Tailwind CSS (separate terminal)
# Docker (starts both btcprice + btcdata)
docker compose up -d # btcprice on 4041, btcdata on 4101
```
## Environment Variables
| Variable | Default | Description |
|---|---|---|
| `PORT` | `4000` | HTTP server port |
| `BTCDATA_URL` | `http://localhost:4100` | btcdata service URL (injected into browser JS) |
## How It Works
The server renders an HTML page that includes a vanilla JavaScript `EventSource` connecting directly to btcdata's SSE endpoint (`BTCDATA_URL/api/price/stream`). Price updates are rendered client-side with color-coded changes (green up, red down).
## Tech Stack
Clojure · Kit · Undertow · Reitit · Hiccup · Tailwind CSS v4