Skip to content

Add a relays directory page (wire up the firehose health data) #5

Description

@melvincarvalho

Background

The nostr Mongo db already holds firehose relay-health data in a relays collection (5,793 relays) that beacon does not currently use anywhere. Each doc carries health metrics from the original nostr-beacon monitor:

{ relay, online, uptime, responseTime, checksOnline, checksTotal,
  lastChecked, acceptsEvents, requiresAuth, requiresPayment,
  publishTestsAccepted, publishTestsTotal, lastError, lastPublishNotice }

Snapshot stats: 5,793 relays total, ~629 online (with uptime%), 130 accept events, 9 require auth, 5 require payment. Data was last refreshed 2025-11-24 (the monitor writer lives in the upstream nostr-labs/nostr-beacon, not here) — so the page must surface a "last checked" caveat.

Scope (v0 — read-only)

A new relays directory page as a dense, sortable table:

  • New GET /api/relays-directory endpoint reading the relays collection (sort/filter/limit).
  • New /relays SPA route + server-rendered OGP shell.
  • Columns: relay URL, online status, uptime %, latency (ms), accepts-events, paid/auth badges, last-checked.
  • Sortable by quality (uptime then latency); filter to online-only.

Out of scope: reviving the firehose writer (separate follow-up).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions