Skip to content

Architecture Overview

Reflect is built with modern web technologies on React/Vite stack and is written in Typescript. To facilitate distribution as a desktop application it uses Tauri for packaging.

Tauri provides a secure foundation for building compact cross-platform desktop applications. It leverages system’s native webview resulting in a smaller bundle size.

Reflect is architected on a modular principle. It leverages separately developed packages for handling Network Tables communication protocol and WPI data-related transformations. These packages may be of interest to anyone developing Javascript/Typescript-based applications to interface with the robot over Network Tables.

The application separates data management and presentation layers. Widgets are used to visualize data that has been abstracted into a common transport-independent representation.

Developing additional widgets only requires understanding of the data abstractions and basic React components development experience.

Reflect communicates with the robot code over Network Tables protocol. NT is a pub/sub protocol that supports data topics of both primitive and composite types.

Historically WPILIB relied on the concept of Sendable data structures to represent a complex type as a set of loosely related topics. This approach makes it difficult to holistically manage and represent such data sources. Reflect automatically detects such topics and combines them into composite channels that are presented as JSON objects to consumers.

Similarly Reflect processes Protobuf and Packed Struct serialized binary data and transforms them into JSON objects.

These transformations, as well as data retention and other capabilities, are handled by wpidata package and can be used independently of the Reflect application itself.