A Base-first health dashboard for the infrastructure Vortex users depend on.
- Base RPC: verifies chain ID 8453 and reads the latest block every 30 seconds.
- Base block freshness: reports whether the latest block timestamp is within 30 seconds.
- Base gas price: records
eth_gasPricein gwei as network-cost telemetry. - Vortex quotes: creates BUY and SELL quotes for BRL, EUR, USD, MXN, COP, and ARS on Base with USDT. BUY amounts are static, approximate 1,000 USD equivalents; SELL inputs are 1,000 USDT.
- DEX indexers: checks
_metablock freshness and indexing errors separately for the BRLA/USDC and EURC/USDC subgraphs. - History: aggregates the last hour, 24 hours, and 7 days.
Quote checks only call POST /v1/quotes; they never register or start a ramp. Creating a quote does persist a short-lived quote record and can invoke provider pricing, so probes are disabled by default. Enabling them requires Supabase and, for the production API, a VORTEX_PUBLIC_KEY. The web service performs one 12-corridor batch on shared 15-minute boundaries; expected volume is 1,152 quote requests per day. A create-only Supabase cadence claim prevents overlapping deploys or replicas from running the same batch twice.
This Bun workspace contains:
backend/— Express/TypeScript metric collection and persistence.frontend/— React/Vite status dashboard.
The root bun.lock is the single canonical lockfile for both workspaces; install and build from the repository root.
Requires Bun 1.3.1 or newer.
bun install --frozen-lockfile
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.env
bun run devSet VITE_API_URL=http://localhost:3000 in frontend/.env.
BASE_RPC_URL has a public default, but production should use a reliable dedicated provider. Configure each indexer URL together with its expected deployment ID; identity is required before a subgraph check can become enabled. If either pair is omitted, its dashboard row remains Disabled instead of reporting an outage. Endpoint URLs, deployment IDs, and API keys stay on the backend and are not exposed by /config.
Supabase persistence is optional unless quote probes are enabled. This revamp writes metrics-data4.json, intentionally starting fresh because the previous persisted file contains obsolete Pendulum and Moonbeam metric keys.
Quote history is isolated in quote-metrics-data1.json, so infrastructure saves never overwrite it. Before enabling production quote probes, run bun run quote-seed exactly once. The command creates the complete empty schema and refuses to overwrite an existing object.
For the first deployment, configure Supabase with ENABLE_QUOTE_PROBES=false, run the seed command, then set ENABLE_QUOTE_PROBES=true and deploy the web service. No separate worker or scheduled job is required.
bun run test
bun run typecheck
bun run lint
bun run buildRun both services with bun run dev, or use bun run dev:backend and bun run dev:frontend separately.
The Render web service keeps infrastructure observations in memory between persistence writes, so configure it with exactly one instance for this first iteration. Scale-out requires moving infrastructure collection to its own canonical writer. Quote collection is additionally protected by a create-only Supabase cadence claim so a rolling deployment cannot duplicate a batch.
| Variable | Default | Purpose |
|---|---|---|
BASE_RPC_URL |
https://mainnet.base.org |
Base JSON-RPC endpoint |
BRLA_INDEXER_URL |
empty | BRLA/USDC subgraph endpoint |
EURC_INDEXER_URL |
empty | EURC/USDC subgraph endpoint |
VORTEX_API_URL |
https://api.vortexfinance.co |
Quote API origin |
VORTEX_PUBLIC_KEY |
empty | Public attribution key; required for production probes |
ENABLE_QUOTE_PROBES |
false |
Enable synthetic quote checks in the web service |
COLLECTION_INTERVAL_MS |
30000 |
Base/indexer check cadence |
REQUEST_TIMEOUT_MS |
10000 |
Outbound request timeout |
STORAGE_REQUEST_TIMEOUT_MS |
10000 |
Supabase request timeout |
SUPABASE_URL / SUPABASE_SERVICE_KEY |
empty | Optional Storage persistence |
See backend/.env.example for freshness thresholds and indexer identity settings.
GET /health— backend liveness.GET /metrics/v2— server generation time plus current Base-era observations and historical bins.GET /config/v2— public time-window, enabled-check, and cadence configuration.GET /metricsandGET /config— temporary legacy compatibility contract for the previous frontend.
Deploy the Render backend first, verify the v2 endpoints and quote cadence, then deploy the Netlify frontend. The legacy endpoints keep the previous frontend from crashing during propagation; remove them only after the new frontend is fully live.