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)
| Section | Capability |
|---|---|
| Relay selector | Color-coded chips per relay; persisted in localStorage |
| Dashboard | Total events, DB size (bytes), uptime, strfry version, activity by kind |
| Events | Table with filters (kind, time range, pubkey); individual event delete |
| Access | Whitelist view + user list; block/allow toggle per pubkey |
| Config | Edit relay name, endpoint, token, agent_relay_id; delete relay; probe connection |
| New relay | Create 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 route | Method | Forwards to |
|---|---|---|
/api/relays | GET, POST | /relays |
/api/relay/[id] | PATCH, DELETE | /relay-update, /relay/:id |
/api/relay/[id]/stats | GET | /relay/:id/stats |
/api/relay/[id]/health | GET | /relay/:id/health |
/api/relay/[id]/events | GET | /relay/:id/events |
/api/relay/[id]/config | GET | /relay/:id/config |
/api/relay/[id]/probe | GET | /relay/:id/probe |
/api/relay/[id]/policy | GET | /relay/:id/policy |
/api/relay/[id]/users | GET | /relay/:id/users |
/api/relay/[id]/policy/block | POST | /relay/:id/policy/block |
/api/relay/[id]/policy/allow | POST | /relay/:id/policy/allow |
Headers sent on every call:
X-API-Key: process.env.RELAY_API_KEY
X-Provider-User-Id: session.user.idEnvironment Variables
| Variable | Description |
|---|---|
NEXTAUTH_SECRET | NextAuth secret |
GITHUB_CLIENT_ID | GitHub OAuth app ID |
GITHUB_CLIENT_SECRET | GitHub OAuth secret |
NEXT_PUBLIC_API_URL | Web Server base URL |
RELAY_API_URL | Server-side override (avoids Vercel cold-start latency on first render) |
RELAY_API_KEY | Shared 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.