Step 2: Scaffold the project
Create a Vite + React project:
npm create vite@latest dashboard -- --template react
cd dashboard
npm install
Install the RelayX App SDK and UI Kit:
npm install @relay-x/app-sdk @relay-x/ui
Create dashboard/.env.local with your RelayX credentials and the device ident:
VITE_RELAYX_API_KEY=your_api_key
VITE_RELAYX_SECRET=your_api_secret
VITE_RELAYX_MODE=production
VITE_DEVICE_IDENT=current-sensor
Vite exposes any VITE_ prefixed variable to the browser at build time. Keep this file out of version control.