How idolahav/draco-dashboard-demo works
This is a first-activation demo spanning a browser client, an Express API, SQLite persistence, and an Android TV client. The main workflow is: a phone establishes a stable identity and submits an activation; the server validates and stores it once; a broadcaster sends live updates to an authenticated dashboard, which also supports login, reset, and QR-code activation. The README documents Android boot-triggered background activation and an interactive status screen. Server/client edges are supported by excerpts or the source index; Android relationships rely on README descriptions, as its source was not sampled.
Main entry points: app.ts HTTP API · DashboardPage.tsx Live dashboard · api.ts Browser API calls · index.ts Server startup
Components 21
Browser clients
- Page routing
client/src/main.tsx - Activate page
client/src/ActivatePage.tsx - Web device identity
client/src/device.ts - Browser API calls
client/src/api.ts - Live dashboard
client/src/DashboardPage.tsx - Stream state
client/src/liveActivations.ts - Time display
client/src/time.ts
Server runtime
- HTTP API
server/src/app.ts - Runtime config
server/src/config.ts - Server startup
server/src/index.ts - Activation repository
server/src/db.ts - SQLite activations
- SSE broadcaster
server/src/sse.ts
Shared contract
- Activation contract
shared/activation.ts
Android client
- Boot receiver
android/app/src/main/java/com/example/deviceactivation/BootReceiver.kt - Activation scheduling
android/app/src/main/java/com/example/deviceactivation/Activation.kt - Android identity
android/app/src/main/java/com/example/deviceactivation/DeviceIdentity.kt - Background worker
android/app/src/main/java/com/example/deviceactivation/ActivationWorker.kt - Activation protocol
android/app/src/main/java/com/example/deviceactivation/ActivationProtocol.kt - Status screen
android/app/src/main/java/com/example/deviceactivation/MainActivity.kt
Other components
- Phone user
Connections 30
- Phone user → Activate page: opens
README.md - Page routing → Activate page: routes to
client/src/main.tsx - Page routing → Live dashboard: routes to
client/src/main.tsx - Activate page → Web device identity: uses identity
client/src/ActivatePage.tsx - Activate page → Browser API calls: submits activation
client/src/ActivatePage.tsx - Live dashboard → Browser API calls: uses API
client/src/DashboardPage.tsx - Live dashboard → Stream state: uses stream
client/src/DashboardPage.tsx - Live dashboard → Web device identity: formats device
client/src/DashboardPage.tsx - Live dashboard → Time display: formats time
client/src/DashboardPage.tsx - Browser API calls → HTTP API: HTTP requests
README.md - Browser API calls → Activation contract: uses types
client/src/api.ts - Stream state → HTTP API: opens stream
client/src/liveActivations.ts - Stream state → Browser API calls: checks session
client/src/liveActivations.ts - Stream state → Activation contract: handles events
client/src/liveActivations.ts - Server startup → Runtime config: loads config
server/src/index.ts - Server startup → Activation repository: creates repository
server/src/index.ts - Server startup → SSE broadcaster: creates broadcaster
server/src/index.ts - Server startup → HTTP API: starts app
server/src/index.ts - HTTP API → Activation repository: reads and writes
server/src/app.ts - HTTP API → SSE broadcaster: broadcasts events
server/src/app.ts - HTTP API → Runtime config: uses settings
server/src/app.ts - HTTP API → Activation contract: validates and names
server/src/app.ts - Activation repository → SQLite activations: queries
server/src/db.ts - SSE broadcaster → Activation contract: uses event names
server/src/sse.ts - Boot receiver → Activation scheduling: schedules activation
README.md - Activation scheduling → Background worker: schedules worker
README.md - Background worker → Activation protocol: posts protocol
README.md - Background worker → HTTP API: POSTs activation
README.md - Status screen → Activation scheduling: activates now
README.md - Activation scheduling → Android identity: uses identity
README.md