The JavaScript Viewer platform provides a browser-based interface for managing video analytics systems. It functions by sending REST commands to a VideoAnalyticsServer, which handles RTSP streams, motion detection, tracking, YOLO inference, and PostgreSQL database interactions. The system supports servers implemented in C++, Python, and Rust.

The Viewer is built using ES Modules, fetch, async/await, and hls.js, operating without frontend frameworks. A Node.js reverse proxy manages static assets and routes. The interface allows users to configure motion detection thresholds, tracking parameters, and YOLO neural network settings, while visualizing stream telemetry and event history.

The analytics pipeline uses two independent ONNX Runtime sessions. A 'Full YOLO' pass processes entire frames or specific regions to detect objects, while a 'Tracking YOLO' pass analyzes 256x256 crops of tracked targets to refine classification. Users can define specific regions for motion detection and YOLO analysis using normalized coordinates from 0 to 1.

Security is managed through role-based access control, distinguishing between administrators and observers. Authentication uses Bearer tokens stored in sessionStorage. The architecture ensures the browser, proxy, and server maintain strict boundaries, with the server validating all REST requests and user permissions before executing database queries or configuration changes.