Skip to content

Dashboard: connect to real billing data via API endpoints #14

@Wilbert957

Description

@Wilbert957

Problem

The dashboard at GET /dashboard currently shows hardcoded mock data. It is not connected to any live backend.

Proposed Solution

1. Add admin API endpoints (no EIP-191 auth, use DAYTONA_ADMIN_KEY header)

Endpoint Data
GET /admin/status active sandbox count, next voucher flush ETA, compute spend/hr
GET /admin/sandboxes list of all sandboxes with owner, status, accrued neuron
GET /admin/activity recent events (voucher settled, sandbox created/stopped, deposits)
GET /admin/contract contract address, beacon, impl, provider, TEE signer, pricing params

2. Update web/dashboard.html

  • Replace hardcoded values with fetch() calls to the above endpoints
  • Poll every 10–30 seconds for live refresh
  • Show loading/error states

3. Auth

Admin endpoints protected by X-Admin-Key: <DAYTONA_ADMIN_KEY> header check (same key already used for Daytona).

Acceptance Criteria

  • /admin/status returns JSON with live data from Redis
  • /admin/sandboxes returns active sandbox list
  • /admin/activity returns last N events
  • Dashboard auto-refreshes without page reload
  • All admin endpoints return 401 without valid key

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions