How pikvm/kvmd works
Main Components
a. Core Services Layer:
• KVMD Main Service
• Web Interface
• Authentication System
• Streaming Services (Janus)
• VNC Server
• IPMI Service
b. Hardware Interface Layer:
• HID Controllers (Arduino/Pico)
• Video Capture
• ATX Control
• GPIO Management
• USB OTG Management
c. External Interfaces:
• Web Clients
• VNC Clients
• IPMI Clients
• REST API
[Client Layer]
• ↑↓
[Web/API Gateway (Nginx)]
• ↑↓
[Core Services Layer]
• ↑↓
[Hardware Interface Layer]
• ↑↓
[Physical Hardware]
Key Elements to Highlight
a. Service Communication:
• Use different line styles for control flow vs data flow
• WebSocket connections for real-time features
b. Authentication Flow:
• Auth plugins integration (htpasswd, LDAP, PAM, etc.)
c. Video Streaming Pipeline:
• → Processing → Streaming
• Both MJPEG and WebRTC paths
Component Details
• Main responsibilities
• Key configurations
• Plugin points
• Resource requirements
Specific Implementation Notes
a. Web Interface:
• Separation between static content and dynamic API
• WebSocket connections for real-time control
b. Hardware Control:
• HID protocol implementation
• ATX power management flow
• USB gadget mode configuration