Skip to content

Dashboard

EchoFox ships with a React-based dashboard for observability + subscription management.

Starting the dashboard

The dashboard auto-starts when config.dashboard.enabled === true. Default URL:

text
http://localhost:3001/dashboard/

Visiting http://localhost:3001/ (the root) redirects to /dashboard/.

Authentication

Basic-auth protected — credentials come from:

js
// src/config.js
dashboard: {
  enabled:  true,
  port:     3001,
  username: 'admin',
  password: 'change-me-please',
},

⚠️ Set a strong password. The dashboard exposes group metadata, message timeline endpoints, and subscription details. If username is empty, auth is disabled entirely (the bot logs a warning at boot — do NOT expose publicly).

Tabs

Overview

  • Top commands by invocation count
  • Message volume trend
  • Recent activity feed
  • Soak status tile (v1.0.0+)
  • Auto-refreshes every 15 seconds

Groups

  • All groups the bot is in
  • Click a group → participant list, event history, deleted-message count, group metadata

Metrics

  • Raw counters + gauges dump (Prometheus-compatible naming)
  • Useful when wiring up external monitoring

Diagnostics

  • Per-subsystem health check (Baileys, store, commands, auth, host)
  • Latency per check
  • Overall: ✅ OK / ❌ DEGRADED

Alerts

  • Active command-failure alerts from the alert engine
  • Failure rate, invocation count, since-when

Subscriptions (v0.4.7+)

  • Per-service tables (🛡️ AlienVault, 📰 The Hacker News, 📡 RSS, 🐙 GitHub, 🦠 VT-Watch)
  • Subscriber JID, topic-filter chips, last-delivery timestamp
  • Refreshes every 15 s

Header (v1.0.0+)

The new header has a live HealthPill with:

  • Green/red status dot tied to /api/health
  • Uptime (up · 2d 4h)
  • Version + backend tag (v1.0.0 · SQLITE/MULTIFILE)
  • 🚨 Alert count (only shows if > 0)

Build-on-boot

If src/dashboard/react/ is missing when the bot starts, startDashboard() automatically runs npm run build:dashboard once. If the build fails, the bot serves a maintenance page instead of crashing. Run the build ahead of time to skip this step on first boot:

bash
npm run build:dashboard

Dev workflow (HMR)

For React development with hot reload, run Vite directly:

bash
cd dashboard
npm run dev

Vite serves on :5173 and proxies /api/* to the bot's dashboard server on :3001 automatically (configured in vite.config.ts).

API routes

All routes live under /api/* and require the same basic auth.

RouteReturns
GET /api/healthuptime, version, backend list
GET /api/statsfull metrics snapshot (counters + gauges)
GET /api/groupslist of groups
GET /api/groups/:jidfull group metadata
GET /api/groups/:jid/participantscurrent participants
GET /api/groups/:jid/participants/history?limit=200event history
GET /api/messages/:jid/:id/editsmessage edit history
GET /api/messages/:jid/:id/reactionsreaction history
GET /api/messages/:jid/:id/receiptsdelivery receipts
GET /api/groups/:jid/deleteddeleted-message log
GET /api/diagnosticshealth-check report
GET /api/alertsactive alerts
GET /api/alerts/:cmdfailure rate for one command
GET /api/subscriptionsper-service subscribers + meta

All routes return JSON. Errors return { error, message } with the appropriate HTTP status.

Released under the AGPL-3.0 License.