Skip to main content

Technical Architecture

System diagram

Browser <──WebSocket──> Node.js <──MQTTS:8883──> Printer
Browser <──WS:9001+──> ffmpeg <──RTSPS:322───> Camera

The dashboard communicates with the printer via MQTT over TLS (port 8883) and the camera via RTSPS (port 322). The browser connects to the dashboard over HTTPS and WebSocket.

Technology stack

LayerTechnology
FrontendVanilla HTML/CSS/JS — 84 component modules, no build step, no framework
BackendNode.js 22 with 6 npm packages: mqtt, ws, basic-ftp, admin-lte, ssh2, @3mfconsortium/lib3mf
DatabaseSQLite (built into Node.js 22 via SQLite (innebygd))
Cameraffmpeg transcodes RTSPS to MPEG1, jsmpeg renders in the browser
Real-timeWebSocket hub broadcasts printer state to all connected clients
ProtocolMQTT over TLS (port 8883) with the printer's LAN Access Code

Ports

PortProtocolDirectionDescription
3000HTTP + WSInDashboard (redirects to HTTPS)
3443HTTPS + WSSInSecure dashboard (default)
9001+WSInCamera streams (one per printer)
8883MQTTSOutConnection to printer
322RTSPSOutCamera from printer

Server modules (74)

ModulePurpose
index.jsHTTP/HTTPS servers, auto-SSL, CSP/HSTS headers, static files, demo mode
config.jsConfiguration loading, defaults, env overrides and migrations
database.jsRe-export wrapper — actual logic lives in server/db/ modules
api-routes.jsREST API (590+ endpoints)
auth.jsAuthentication and session management
backup.jsBackup and restoration
printer-manager.jsPrinter lifecycle, MQTT connection management
mqtt-client.jsMQTT connection to Bambu printers
mqtt-commands.jsMQTT command building (pause, resume, stop, etc.)
websocket-hub.jsWebSocket broadcasting to all browser clients
camera-stream.jsffmpeg process management for camera streams
print-tracker.jsPrint job tracking, state transitions, history logging
print-guard.jsPrint protection via xcam + sensor monitoring
queue-manager.jsPrint queue with multi-printer dispatch and load balancing
slicer-service.jsLocal slicer CLI bridge, file upload, FTPS upload
telemetry.jsTelemetry data processing
telemetry-sampler.jsTime series data sampling
thumbnail-service.jsThumbnail retrieval via FTPS from printer SD
timelapse-service.jsTimelapse recording and management
notifications.js7-channel notification system (Telegram, Discord, Email, Webhook, ntfy, Pushover, SMS)
updater.jsGitHub Releases auto-update with backup
setup-wizard.jsWeb-based setup wizard for first-time use
ecom-license.jsLicense management
failure-detection.jsFailure detection and analysis
bambu-cloud.jsBambu Cloud API integration
bambu-rfid-data.jsRFID filament data from AMS
circuit-breaker.jsCircuit breaker pattern for service stability
energy-service.jsEnergy and electricity price calculation
error-pattern-analyzer.jsPattern analysis of HMS errors
file-parser.jsParsing of 3MF/GCode files
logger.jsStructured logging
material-recommender.jsMaterial recommendations
milestone-service.jsMilestone and achievement tracking
plugin-manager.jsPlugin system for extensions
power-monitor.jsPower meter integration (Shelly/Tasmota)
price-checker.jsElectricity price fetching (Tibber/Nordpool)
printer-discovery.jsAutomatic printer discovery on LAN
remote-nodes.jsMulti-node management
report-service.jsReport generation
seed-filament-db.jsFilament database seeding
spoolease-data.jsSpoolEase integration
validate.jsInput validation
gcode-toolpath.jsGcode toolpath parser for 3D preview
lib3mf-parser.jslib3mf WASM wrapper for 3MF parsing
printer-capabilities.jsPer-brand/model printer configuration
moonraker-client.jsMoonraker/Klipper WebSocket client
moonraker-camera.jsMoonraker camera integration
moonraker-history-sync.jsMoonraker print history sync
wear-prediction.jsComponent wear prediction

Frontend components (84)

All components are vanilla JavaScript modules with no build step. They are loaded directly in the browser via <script type="module">.

ComponentPurpose
print-preview.js3D model viewer + MakerWorld image reveal
model-viewer.jsWebGL 3D rendering with layer animation
temperature-gauge.jsAnimated SVG ring gauges
sparkline-stats.jsGrafana-style statistics panels
ams-panel.jsAMS filament visualization
camera-view.jsjsmpeg video player with fullscreen
controls-panel.jsPrinter control UI
history-table.jsPrint history with search, filters, CSV export
filament-tracker.jsFilament inventory with favorites, color filtering
queue-panel.jsPrint queue management
knowledge-panel.jsKnowledge base reader and editor

Database

The SQLite database is built into Node.js 22 and requires no external installation. The schema is managed by 112 migrations in db/migrations.js.

Main tables:

  • printers — printer configuration
  • print_history — all print jobs
  • filaments — filament inventory
  • ams_slots — AMS slot mapping
  • queue — print queue
  • notifications_config — notification settings
  • maintenance_log — maintenance log

Security

  • HTTPS with auto-generated certificate (or your own)
  • JWT-based authentication
  • CSP and HSTS headers
  • Rate limiting (200 req/min)
  • No external cloud dependency for core functions