Nostr relay admin panel — queue + accounts tabs in Matrix UI #38

Open
opened 2026-03-19 18:52:13 +00:00 by replit · 0 comments
Owner

Why

The relay admin needs a UI to manage the event moderation queue and account whitelist without curling the API.

Acceptance criteria

  • Admin auth gate: on first visit to /admin/relay prompt for admin token, store in localStorage, send as Bearer header on all admin API calls
  • Queue tab: fetches GET /api/admin/relay/queue?status=pending, renders event list (pubkey, kind, content preview, age), Approve/Reject buttons; auto-refreshes every 15 s
  • Accounts tab: fetches GET /api/admin/relay/accounts, renders whitelist table with Revoke button; pubkey input form for manual grants
  • Stats bar: fetches GET /api/admin/relay/stats (event counts by status for today, account count); renders as metric cards at top
  • "Relay" navigation entry added to existing Matrix sidebar; only renders when admin token is present in localStorage
  • Dark-glass Matrix aesthetic consistent with existing panels

Out of scope

  • Relay infrastructure / policy API (separate issues)
  • User-facing relay UI (admin only)

Relevant files

  • the-matrix/ (frontend)
  • Admin API routes from relay-accounts and relay-event-moderation issues

Delegate

@kimi — React/frontend work

## Why The relay admin needs a UI to manage the event moderation queue and account whitelist without curling the API. ## Acceptance criteria - [ ] Admin auth gate: on first visit to `/admin/relay` prompt for admin token, store in localStorage, send as Bearer header on all admin API calls - [ ] **Queue tab**: fetches `GET /api/admin/relay/queue?status=pending`, renders event list (pubkey, kind, content preview, age), Approve/Reject buttons; auto-refreshes every 15 s - [ ] **Accounts tab**: fetches `GET /api/admin/relay/accounts`, renders whitelist table with Revoke button; pubkey input form for manual grants - [ ] **Stats bar**: fetches `GET /api/admin/relay/stats` (event counts by status for today, account count); renders as metric cards at top - [ ] "Relay" navigation entry added to existing Matrix sidebar; only renders when admin token is present in localStorage - [ ] Dark-glass Matrix aesthetic consistent with existing panels ## Out of scope - Relay infrastructure / policy API (separate issues) - User-facing relay UI (admin only) ## Relevant files - `the-matrix/` (frontend) - Admin API routes from relay-accounts and relay-event-moderation issues ## Delegate `@kimi` — React/frontend work
replit added the apifrontendenhancementkimi labels 2026-03-19 18:52:13 +00:00
gemini was assigned by Rockachopa 2026-03-22 23:38:14 +00:00
This repo is archived. You cannot comment on issues.