This web application implements a custom UI with JavaScript + Vite that leverages the Lattice SDK's gRPC streaming capabilities. It uses the JavaScript types generated in the Lattice SDK Buf Repository alongside ConnectRPC to update simulated Entity positions on a map in real-time.
The project uses the following dependencies:
Connect RPC- To make the gRPC+Web requestsMaterial UI- For styling and basic componentsReact- UI FrameworkReact Leaflet- A React wrapper around the Leaflet open-source Javascript map libraryReact Leaflet MarkerCluster- Clusters Leaflet markers.
This sample app requires that you have:
git clone https://github.com/anduril/sample-app-entity-visualizer
cd sample-app-entity-visualizerYou now need to provide the sample application with the Lattice endpoint to get data from, and credentials for it (see the Authentication documentation). To do so please create a .env file at the root of this project folder and populate it with:
VITE_LATTICE_BEARER_TOKEN="" # Set this or `VITE_LATTICE_CLIENT_ID` and `VITE_LATTICE_CLIENT_SECRET`
VITE_LATTICE_CLIENT_ID="" # Do not set `VITE_LATTICE_BEARER_TOKEN` if using client credentials
VITE_LATTICE_CLIENT_SECRET="" # Do not set `VITE_LATTICE_BEARER_TOKEN` if using client credentials
VITE_LATTICE_SANDBOX_TOKEN="" # Set when connecting to a Lattice Sandbox environment. Not required when connecting to other Lattice environments
VITE_LATTICE_URL="lattice-<sandbox_ID>.env.sandboxes.developer.anduril.com" # Your environment's Resource EndpointFor information on how to create an environment and obtain these credentials, see the Sandboxes documentation.
Please contact your Anduril representative if you need assistance with populating these values or run into any authentication issues.
npm ci
npm run devIn the terminal window, open the local link to view the application. You should now see the application in your web browser.
To learn more about the Lattice SDK, please visit our documentation site.
For support with this library please file an issue or reach out to your Anduril representative.

