How elysia62/nodeflare works
NodeFlare is a self-hosted server monitoring and control panel. The core workflow runs from Agent metric collection and outbound reporting, through backend WebSocket ingestion and persistence, to live and historical dashboard views. Administrators also configure latency probes, alerts, remote commands, authentication, themes, and database operations. The graph reflects README capabilities; selected source excerpts support specific wiring, while unsampled subsystem links are limited to documented behavior and tree paths.
Main entry points: admin.rs API routes · src/main.rs Agent runtime · agent.rs Agent WebSocket · src/main.rs HTTP application
Components 28
Monitoring Agent
- Agent runtime
agent/src/main.rs - System metrics
agent/src/metrics.rs - Latency probes
agent/src/probe.rs - Remote execution
agent/src/remote.rs - Live batching
agent/src/live_batch.rs - Telemetry types
shared/telemetry.rs
Backend Services
- HTTP application
backend/src/main.rs - Agent WebSocket
backend/src/websocket/agent.rs - Telemetry ingestion
backend/src/websocket/ingest.rs - Dashboard WebSocket
backend/src/websocket/dashboard.rs - API routes
backend/src/routes/admin.rs - Authentication
backend/src/auth.rs - Alerts and notices
backend/src/notify.rs - Backup and migration
backend/src/backup.rs
Web Dashboard
- Dashboard UI
frontend/src/App.tsx - Application state
frontend/src/AppProvider.tsx - HTTP client
frontend/src/api.ts - Admin console
frontend/src/adminRoutes.ts - Latency views
frontend/src/hooks/useNodeLatency.ts
Persistence
- SQLite / PostgreSQL
backend/src/db/mod.rs - Ingest and history
backend/src/db/queries/ingest.rs - Alert queries
backend/src/db/queries/alerts.rs - Latency queries
backend/src/db/queries/latency.rs
External Services
- Exchange rates
backend/src/exchange.rs
Other components
- Dashboard user
- Monitored host
- Telegram
- Cloudflare Turnstile
Connections 37
- Monitored host → System metrics: samples
- Agent runtime → System metrics: collects
- Agent runtime → Latency probes: executes tasks
- Agent runtime → Remote execution: runs commands
- System metrics → Live batching: batches reports
- Agent runtime → Agent WebSocket: reports outbound
- Agent WebSocket → Telemetry ingestion: passes batches
- Telemetry ingestion → Ingest and history: persists batches
- Ingest and history → SQLite / PostgreSQL: writes telemetry
- Agent WebSocket → Agent runtime: sends config and tasks
- Agent WebSocket → Remote execution: dispatches tasks
- Agent runtime → Latency probes: returns probe results
- Dashboard user → Dashboard UI: views dashboard
- Dashboard UI → Application state: uses state
- Application state → HTTP client: loads data
- HTTP client → HTTP application: calls API
- HTTP application → API routes: dispatches requests
- HTTP application → Agent WebSocket: accepts agent socket
- HTTP application → Dashboard WebSocket: accepts dashboard socket
- Dashboard WebSocket → Dashboard UI: streams live updates
- Dashboard UI → Latency views: shows latency history
- Latency views → HTTP client: fetches history
- API routes → SQLite / PostgreSQL: reads and writes
- API routes → Alert queries: manages rules
- API routes → Latency queries: manages tasks
- Agent WebSocket → Latency queries: loads probe tasks
- Alerts and notices → SQLite / PostgreSQL: reads alert state
- Alerts and notices → Telegram: sends notifications
- API routes → Authentication: uses authentication
- Authentication → Cloudflare Turnstile: verifies challenge
- Admin console → HTTP client: configures services
- API routes → Backup and migration: handles data operations
- Backup and migration → SQLite / PostgreSQL: backs up and migrates
- HTTP application → Exchange rates: refreshes rates
- Exchange rates → SQLite / PostgreSQL: stores rates
- Exchange rates → Telegram: external rate source
- Latency probes → Telemetry types: uses telemetry types