Files
btcprice/CLAUDE.md
T
magnusandClaude Opus 4.6 397d9f7b5c 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>
2026-02-23 20:07:48 +01:00

52 lines
1.6 KiB
Markdown

# btcprice
Bitcoin price tracker UI — Clojure Kit web application. Serves the HTML/HTMX/Tailwind UI. Connects to btcdata for live price data via SSE.
## Build & Development Commands
- `make run` — Start dev server on port 4000
- `make repl` — Start nREPL
- `make test` — Run tests
- `make tailwind` — Watch Tailwind CSS for changes
- `make uberjar` — Build production JAR
## REPL Commands
```clojure
(dev-prep!) ;; Prepare dev system
(go) ;; Start system
(reset) ;; Reload code & restart
(halt) ;; Stop system
```
## Architecture
- **Framework:** Kit (Integrant-based)
- **Server:** Undertow
- **Routing:** Reitit
- **Templates:** Hiccup + vanilla JS EventSource
- **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
```
src/clj/pmagnus/btcprice/
├── core.clj # App entry point
├── config.clj # System config loader
└── web/
├── handler.clj # Ring handler + routes
├── htmx.clj # page/fragment macros
├── controllers/
│ └── health.clj # Health check
├── middleware/
│ ├── core.clj # Base middleware
│ ├── exception.clj # Exception handling
│ └── formats.clj # Content negotiation
└── routes/
├── api.clj # /api routes (JSON)
├── ui.clj # UI routes (HTML + EventSource)
└── utils.clj # Route utilities
```