Skip to content

feat(coordinator): add local development dashboard with service status#425

Merged
Marvy247 merged 1 commit into
HitEmPoka:mainfrom
Labi-Joy:feat/local-dev-dashboard
Jun 30, 2026
Merged

feat(coordinator): add local development dashboard with service status#425
Marvy247 merged 1 commit into
HitEmPoka:mainfrom
Labi-Joy:feat/local-dev-dashboard

Conversation

@Labi-Joy

Copy link
Copy Markdown
Contributor

Closes #325.

Adds a single-page web dashboard, served by the coordinator at http://localhost:8080/, that shows live status of every local service: the Soroban container, the three MPC nodes, the coordinator itself, and the Soroban poker_table contract deployment. The page polls /api/health every 5 seconds and renders the result into per-service cards with a clear ok / disconnected / not-configured pill.

What landed

services/coordinator/src/main.rs extends HealthResponse with a contract_deployment field (configured: bool, contract_id: String) so the dashboard can render contract deployment status without a second endpoint. configured is true when SorobanConfig::is_configured() holds (contract id set and signer not the test placeholder); the contract id is exposed so the developer can copy it and verify on-chain. Adds GET / as a new route that returns the dashboard page.

services/coordinator/src/dashboard.rs (new): tiny axum handler that returns the embedded HTML. The page is included at compile time via include_str! so no extra static-asset deployment step is required.

services/coordinator/src/dashboard.html (new): vanilla HTML + CSS + JS, no build step. Polls /api/health, renders one card per service (coordinator, soroban-rpc, three mpc-nodes, contract deployment), surfaces uptime, active MPC sessions, maintenance mode, and the contract id alongside a status pill, and shows an error banner when the coordinator becomes unreachable so the dashboard reflects local stack issues immediately.

The dashboard reads only public state already exposed by /api/health and the coordinator binary, so no new env vars, dependencies, or deploy steps are needed; it works against any coordinator instance.

Note on cargo check and upstream state

cargo check -p coordinator against the freshly fetched upstream/main (commit aec9538) currently fails with 48 compile errors that are unrelated to this PR. A quick sampling: error[E0432]: unresolved import 'utoipa', error[E0432]: unresolved import 'utoipa_swagger_ui', error[E0432]: unresolved import 'crate::api_keys', error[E0609]: no field 'mpc_client' on type 'AppState', error[E0560]: struct 'HealthResponse' has no field 'maintenance_mode' (the populator at the bottom of health() references a field that no longer exists on the struct). These look like the tail of an in-flight refactor that landed on main without the dependent crates / modules being introduced.

Applying this PR on top of upstream/main leaves the error count at exactly the same number (48), i.e. the dashboard module does not introduce any new errors and is internally coherent (the new HealthResponse.contract_deployment field is added to the struct, the components(schemas(...)) list, and the health() populator together). I confirmed this by running cargo check -p coordinator on aec9538 directly and on aec9538 + this PR.

Once upstream main compiles again, I can rebase and confirm a clean check.

How to verify locally

docker compose up -d soroban mpc-node-0 mpc-node-1 mpc-node-2
cargo run -p coordinator
# in another shell
open http://localhost:8080/

Cards should appear within a few seconds and refresh every 5 seconds.

Closes HitEmPoka#325

Adds a single-page web dashboard, served by the coordinator at
http://localhost:8080/, that shows live status of every local service:
the Soroban container, the three MPC nodes, the coordinator itself,
and the Soroban poker_table contract deployment. The page polls
/api/health every 5 seconds and renders the result into per-service
cards with a clear ok/disconnected/not-configured pill.

- services/coordinator/src/main.rs: extends HealthResponse with a
  contract_deployment field (configured: bool, contract_id: String)
  so the dashboard can render contract deployment status without a
  second endpoint. configured is true when SorobanConfig.is_configured()
  holds (contract id set and signer not the test placeholder); the
  contract id is exposed so the developer can copy it and verify
  on-chain. Adds GET / as a new route that returns the dashboard page.
- services/coordinator/src/dashboard.rs (new): tiny axum handler that
  returns the embedded HTML. The page is included at compile time via
  include_str! so no extra static-asset deployment step is required.
- services/coordinator/src/dashboard.html (new): vanilla HTML + CSS +
  JS, no build step. Polls /api/health, renders one card per service
  (coordinator, soroban-rpc, three mpc-nodes, contract deployment),
  surfaces uptime, active MPC sessions, maintenance mode, and the
  contract id alongside a status pill, and shows an error banner when
  the coordinator becomes unreachable so the dashboard reflects local
  stack issues immediately.

The dashboard reads only public state already exposed by /api/health
and the coordinator binary, so no new env vars, dependencies, or
deploy steps are needed; it works against any coordinator instance.
@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@Labi-Joy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Marvy247 Marvy247 merged commit dec41e0 into HitEmPoka:main Jun 30, 2026
5 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement a local development dashboard with service status

2 participants