Switch to HTMX WebSocket, use LAN IP for btcdata URL
- Replace vanilla JS WebSocket with HTMX ws extension (hx-ext="ws") - Add HTMX + ws extension CDN scripts to page head - Zero client-side JavaScript — HTMX handles connection, reconnect, and DOM swap of HTML fragments from btcdata - Hidden div safelists Tailwind classes used in btcdata HTML fragments - Update BTCDATA_URL to LAN IP (192.168.50.42) for cross-machine access - Update CLAUDE.md and README.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -36,9 +36,9 @@ btcprice's docker-compose includes btcdata via `include: ../btcdata/docker-compo
|
||||
- **Framework:** Kit (Integrant-based)
|
||||
- **Server:** Undertow
|
||||
- **Routing:** Reitit
|
||||
- **Templates:** Hiccup + vanilla JS WebSocket
|
||||
- **Templates:** Hiccup + HTMX (WebSocket extension)
|
||||
- **Styling:** Tailwind CSS v4
|
||||
- **Data backend:** btcdata (separate service at BTCDATA_URL, default http://localhost:4100, WebSocket at ws://localhost:4100)
|
||||
- **Data backend:** btcdata (separate service at BTCDATA_URL, default http://192.168.50.42:4100)
|
||||
- **No database** — all data comes from btcdata
|
||||
|
||||
## Source Layout
|
||||
@@ -58,6 +58,6 @@ src/clj/pmagnus/btcprice/
|
||||
│ └── formats.clj # Content negotiation
|
||||
└── routes/
|
||||
├── api.clj # /api routes (JSON)
|
||||
├── ui.clj # UI routes (HTML + WebSocket)
|
||||
├── ui.clj # UI routes (HTML + HTMX WebSocket)
|
||||
└── utils.clj # Route utilities
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user