Files
btcprice/CLAUDE.md
T
magnusandClaude Opus 4.6 c999d831e7 Rewrite btcprice from Clojure to Python FastAPI
Replace the Clojure Kit application with a Python FastAPI app that
produces identical HTML output. WebSocket proxy, Danish number
formatting, and HTMX integration all preserved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 12:33:03 +01:00

37 lines
1.0 KiB
Markdown

# btcprice
Bitcoin price tracker UI — Python FastAPI web application. Serves the HTML/Tailwind UI. Connects to btcdata for live price data via WebSocket.
## Build & Development Commands
- `make run` — Start dev server on port 4000
- `make tailwind` — Watch Tailwind CSS for changes
- `make test` — Run tests
## Docker
Docker runs alongside local dev on different ports:
| Service | Local dev | Docker |
|----------|----------------|----------------|
| btcprice | localhost:4000 | localhost:4041 |
| btcdata | localhost:4100 | localhost:4101 |
btcprice's docker-compose includes btcdata via `include: ../btcdata/docker-compose.yml`.
## Architecture
- **Framework:** FastAPI
- **Server:** Uvicorn
- **Templates:** Inline HTML strings + HTMX (WebSocket extension)
- **Styling:** Tailwind CSS v4
- **Data backend:** btcdata (separate service at BTCDATA_URL, default http://localhost:4100)
- **No database** — all data comes from btcdata
## Source Layout
```
app/
└── main.py # FastAPI app: routes, WebSocket proxy, HTML rendering
```