feat: Live app for NIP-53 broadcast streams and chat (#32)

Adds a Live app (kind 30311 live events + kind 1311 live chat),
scoped to broadcast streams only per the issue discussion — Spaces/
interactive rooms (kind 30312/30313) are a separate, larger effort
tracked in a follow-up issue.

- src/apps/live/index.tsx: sidebar list (live streams first, then
  planned, then ended, newest within each bucket) and a detail pane
  with title/summary/host/status/topics and a link out to the
  `streaming` (or `recording`, once ended) URL.
- src/apps/live/LiveChat.tsx: kind 1311 messages tagged to the stream
  via `a`, with a composer.
- No embedded video player: NIP-53 streams are typically HLS, which
  needs a library (hls.js) to play in-browser — deferred rather than
  pulled in for a first cut. docs/apps.md explains the tradeoff.

Closes #22


Claude-Session: https://claude.ai/code/session_01BYiUtZMQeA5RHggQw73wto

Co-authored-by: highperfocused <highperfocused@pm.me>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
mroxso
2026-09-06 18:52:53 +02:00
committed by GitHub
parent d4a83f22b5
commit ae7d27d63e
4 changed files with 429 additions and 2 deletions

View File

@@ -89,7 +89,7 @@ export default function ExampleApp({ setTitle }: AppProps) {
}
```
## The nine apps
## The ten apps
| App | `id` | Params | Notes |
|---|---|---|---|
@@ -99,10 +99,19 @@ export default function ExampleApp({ setTitle }: AppProps) {
| Reader | `articles` | `pubkey?`, `identifier?`, `kind?`, `relays?` | NIP-23 long-form, `react-markdown`, NIP-84 highlights |
| Bookmarks | `bookmarks` | — | NIP-51 kind 10003 list — bookmarked notes and articles |
| Web Bookmarks | `web-bookmarks` | — | NIP-B0 kind 39701 — one addressable event per saved URL |
| Live | `live` | `pubkey?`, `identifier?` | NIP-53 kind 30311 live events + kind 1311 chat |
| Relays | `relays` | — | Connection state, subscription count, measured latency |
| Settings | `settings` | — | Theme, relay list, Blossom servers, account, session |
| About | `about` | — | What this is, the app list, the shortcuts |
### Live only links out to playback, it doesn't embed a player
NIP-53's `streaming` tag is typically an HLS (`.m3u8`) URL, which no browser plays natively
without a library like hls.js. Rather than pull that dependency in for a first cut, the Live
app (`src/apps/live`) shows the stream's metadata and chat and opens `streaming` (or
`recording`, once `status` is `ended`) in a new tab. Spaces/interactive rooms (kind
30312/30313) are a separate, larger effort — see the tracking issue.
### Web bookmarks are one event per URL, not a list
Unlike a NIP-51 list, each NIP-B0 web bookmark (kind 39701) is its own addressable event —