Relay Manager Docs
Modules

relay-panel

Admin UI for relay operators. BSL 1.1 — visual management without terminal access.

relay-panel

License: BSL 1.1 — github.com/bitmacro/relay-panel
Hosting: Vercel — https://relay-panel.bitmacro.io
Auth: NextAuth.js v5, GitHub OAuth
Stack: Next.js 16, React 19, Tailwind 4, shadcn/ui

The panel is a pure UI layer. It never contacts Supabase or any Relay Server Agent directly — all requests are proxied server-side through the Web Server (relay-api).


Features (v0.2.0)

SectionCapability
Relay selectorColor-coded chips per relay; persisted in localStorage
DashboardTotal events, DB size (bytes), uptime, strfry version, activity by kind
EventsTable with filters (kind, time range, pubkey); individual event delete
AccessWhitelist view + user list; block/allow toggle per pubkey
ConfigEdit relay name, endpoint, token, agent_relay_id; delete relay; probe connection
New relayCreate form in content area (same layout as Config); includes Agent Relay ID field

Authentication Flow

session.user.id = GitHub providerAccountId (numeric string). This value is X-Provider-User-Id on every server-side fetch to relay-api.


API Routes (Next.js → Web Server proxy)

Panel routeMethodForwards to
/api/relaysGET, POST/relays
/api/relay/[id]PATCH, DELETE/relay-update, /relay/:id
/api/relay/[id]/statsGET/relay/:id/stats
/api/relay/[id]/healthGET/relay/:id/health
/api/relay/[id]/eventsGET/relay/:id/events
/api/relay/[id]/configGET/relay/:id/config
/api/relay/[id]/probeGET/relay/:id/probe
/api/relay/[id]/policyGET/relay/:id/policy
/api/relay/[id]/usersGET/relay/:id/users
/api/relay/[id]/policy/blockPOST/relay/:id/policy/block
/api/relay/[id]/policy/allowPOST/relay/:id/policy/allow

Headers sent on every call:

X-API-Key: process.env.RELAY_API_KEY
X-Provider-User-Id: session.user.id

Environment Variables

VariableDescription
NEXTAUTH_SECRETNextAuth secret
GITHUB_CLIENT_IDGitHub OAuth app ID
GITHUB_CLIENT_SECRETGitHub OAuth secret
NEXT_PUBLIC_API_URLWeb Server base URL
RELAY_API_URLServer-side override (avoids Vercel cold-start latency on first render)
RELAY_API_KEYShared key with relay-api

License (BSL 1.1)

Code is public and modifiable. Fork is permitted. Offering a competing commercial SaaS without a commercial license is blocked.
Converts automatically to Apache 2.0 after the change date defined in the license file.

Self-hosted deployment is allowed — and intentionally not discouraged. The cloud offering wins on simplicity, not lock-in.