Skip to content

DCS-LabsAI/dcs-status

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trd-status — status.trdn.io

Public status dashboard for TRD Network. Vanilla HTML/CSS/JS, no build step. Hosted on Cloudflare Pages.

What it shows

  • Live health of 4 critical endpoints (api.trdn.io, api-eu.trdn.io, compute lane, gateway standby)
  • Region health summary from /api/region-health-summary
  • Last 5 worker reputation SBT mints with Basescan links
  • Auto-refresh every 60 seconds

All data is read-only and public. No auth, no API keys baked in.

Files

index.html       # single page
app.js           # fetch + render logic (vanilla JS)
style.css        # dark theme matching trdn.io
_headers         # Cloudflare Pages headers
wrangler.toml    # Cloudflare Pages config

Local dev

Open index.html in a browser. That's it. The fetches will hit production endpoints directly. If you want a local server to avoid the occasional file:// quirk:

python3 -m http.server 8080
# then visit http://localhost:8080

Deploy — Cloudflare Pages

This repo is wired to deploy automatically on push to main.

Initial setup (one-time)

  1. Log into Cloudflare → Workers & Pages → Create a Pages project.
  2. Connect to Git → pick TRDnetwork/trd-status.
  3. Production branch: main.
  4. Build settings:
    • Framework preset: None
    • Build command: (leave blank)
    • Build output directory: / (or leave default — root)
  5. Save & Deploy. First build takes ~30 seconds.
  6. Pages assigns trd-status.pages.dev. Confirm it works.
  7. Custom domain: Pages project → Custom domains → Add status.trdn.io. Cloudflare adds the CNAME automatically since the trdn.io zone is in the same account.

Subsequent deploys

git push to main → Cloudflare builds and ships in ~30 seconds. No manual step.

Configuration

URLs are hardcoded in app.js constants at the top. To change them:

  • ENDPOINTS[] — the 4 probe URLs
  • REGION_SUMMARY_URL — region-health-summary endpoint
  • MINTS_URL — public recent-mints endpoint
  • REFRESH_MS — poll interval (default 60s)
  • HEALTH_TIMEOUT_MS — per-probe timeout (default 5s)

CORS

The endpoints we hit need to allow CORS from https://status.trdn.io:

  • https://api.trdn.io/health → CORS already open (it's a public health endpoint)
  • https://api.trdn.io/api/region-health-summary → CORS already open
  • https://api-eu.trdn.io/health → CORS already open
  • https://trd-cn-backend-production.up.railway.app/health → CORS already open
  • https://trd-cn-backend-production.up.railway.app/api/sbt/mints/recent → made public + CORS-open in trd-cn-backend/src/routes/sbt-mint.ts as part of this rollout
  • https://gateway-standby.trdn.io/health → relies on Cloudflare Workers' default CORS handling

If a probe is failing with Failed to fetch in the browser console but curl works, it's a CORS gap on the upstream service. Fix it there, not here.

Headers / _headers

The _headers file sets a strict Content-Security-Policy and basic security headers. Tweak there if you add new fetch destinations.

Status page embed (future)

The Better Stack status page subdomain (trd-network.betteruptime.com, see MONITORING_SETUP.md in the ops repo) can be iframe-embedded into a future section here for 90-day uptime history. Not done yet — keep this dashboard lean for now.


Maintained by DK. Issues / PRs welcome at TRDnetwork/trd-status.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors