How koalbymqp/zaraos-driverstation works
ZaraOS Driver Station is a browser-based control interface for connecting to robots, managing running applications, and viewing logs. The principal workflow is sign in, connect or pair with a robot, browse releases and start or stop instances, then inspect their logs or open a console. The graph also preserves the documented local-development and BLE connection routes, authentication, and Azure token proxy. Backend implementation is absent from the supplied tree, so robot APIs are shown as external; edges reflect only the supplied excerpts and README.
Main entry points: layout.tsx Application providers · apps/page.tsx App catalog · ConnectionContext.tsx Connection state · app/page.tsx Home dashboard
Components 29
Access and shell
- Sign in
driver-station/app/authenticate/page.tsx - Home dashboard
driver-station/app/page.tsx - Navigation header
driver-station/components/Header.tsx
Robot connection
- BLE IP discovery
driver-station/lib/ble-get-ip.ts - BLE identifiers
driver-station/lib/ble-uuid.ts - Connection state
driver-station/contexts/ConnectionContext.tsx - Connect controls
driver-station/components/IpConnectModal.tsx - Connection health
driver-station/components/ConnectionHealthMonitor.tsx - Connection status
driver-station/components/ConnectionStatusWidget.tsx
Robot operations
- App catalog
driver-station/app/apps/page.tsx - Logs page
driver-station/app/logs/page.tsx - Robot console
driver-station/app/console/page.tsx - Robot API client
driver-station/lib/robot-api.ts - Log viewer
driver-station/components/LogViewer.tsx - Log streaming
driver-station/lib/log-stream.ts - SSH terminal
driver-station/components/SSHTerminal.tsx - Log archiver
driver-station/workflows/log-archiver.ts
Shared support
- Backend API client
driver-station/lib/api.ts - Authentication state
driver-station/contexts/AuthContext.tsx - MSAL configuration
driver-station/lib/msalConfig.ts - MSAL provider
driver-station/components/MsalWrapper.tsx - Azure token proxy
driver-station/app/api/azure-token-proxy/route.ts - Project state
driver-station/contexts/ProjectContext.tsx - Theme preferences
driver-station/contexts/ThemeContext.tsx - Application providers
driver-station/app/layout.tsx
Other components
- Operator
- ZaraOS robot API
- Release metadata API
- Microsoft identity
Connections 33
- Operator → Sign in: starts sign-in
driver-station/app/authenticate/page.tsx - Sign in → Microsoft identity: requests identity token
- Operator → Connect controls: connects robot
- Connect controls → BLE IP discovery: discovers IP
- BLE IP discovery → BLE identifiers: uses UUIDs
driver-station/lib/ble-get-ip.ts - Connect controls → Connection state: sets connection
- Connection state → ZaraOS robot API: connects over HTTP
- Connection health → Connection state: monitors connection
- Home dashboard → Connection status: renders status
driver-station/app/page.tsx - Home dashboard → Navigation header: renders header
driver-station/app/page.tsx - Home dashboard → Project state: shows project status
driver-station/app/page.tsx - Operator → App catalog: browses and manages apps
- App catalog → Backend API client: loads releases
driver-station/app/apps/page.tsx - App catalog → Robot API client: manages instances
driver-station/app/apps/page.tsx - Robot API client → ZaraOS robot API: sends robot requests
- App catalog → Project state: updates active projects
- Operator → Logs page: opens logs
- Logs page → Robot API client: fetches instances
driver-station/app/logs/page.tsx - Logs page → Log viewer: selects instance
driver-station/app/logs/page.tsx - Log viewer → Log streaming: streams logs
- Log streaming → ZaraOS robot API: reads robot logs
- Operator → Robot console: opens console
- Robot console → SSH terminal: opens terminal
- SSH terminal → ZaraOS robot API: sends terminal commands
- Operator → Azure token proxy: requests token
- Azure token proxy → Microsoft identity: forwards token request
driver-station/app/api/azure-token-proxy/route.ts - Log archiver → ZaraOS robot API: archives logs
- Application providers → MSAL provider: wraps application
driver-station/app/layout.tsx - Application providers → Authentication state: provides auth state
driver-station/app/layout.tsx - Application providers → Connection state: provides connection state
driver-station/app/layout.tsx - Application providers → Project state: provides project state
driver-station/app/layout.tsx - Application providers → Theme preferences: provides theme
driver-station/app/layout.tsx - MSAL provider → MSAL configuration: uses configuration