Coming Soon: Price Pipeline Health Widget

Coming Soon: Price Pipeline Health Widget

Leader posted 2 min read

Coming Soon: Price Pipeline Health Widget (join the sprint)

Sprint starts next week — engineers, designers and beta users welcome (DM me).

Context

Pocket Portfolio’s promise is reliability: never show 0.00 and always explain a number. We already run a time-boxed, multi-provider quoting engine (Yahoo Finance, Chart API, Stooq) with deterministic fallbacks. The missing piece is visibility into the pipeline: which provider won, who failed, and when fallbacks/outages happen.

What’s new (planned)

  • US1 — Provider health logging: Record success/failure events, timestamps, and fallback usage (in-memory for dev, Redis/Upstash for prod).
  • US2 — Health endpoint: GET /api/health-price returns aggregated provider metrics (lastSuccess, lastFailure, failureCount, activeFallback), edge-tested and rate-limited.
  • US3/US4 — Typed services & hooks: getPriceHealth() + usePriceHealth() (30s polling) → { health, loading, error }.
  • US5 — Health Card UI: Colour-coded badges per provider:
    • Fresh (green) < 30s,
    • Fallback (amber) < 1 min,
    • Unhealthy (red) ≥ 5 min without success.
  • US6 — Dashboard integration: Sits beside Live Prices for instant status.
  • US7/US8 — Shared logic & config: Extract logging, wire UPSTASH_REDIS_REST_URL/UPSTASH_REDIS_REST_TOKEN; fallback to in-memory when unset.
  • US9 — Documentation: API contract, persistence, UI states, extension.
  • US10/US11 (optional): Symbol-level freshness and extended outage alerts (pending design/business sign-off).

How it works (high level)

  • Parallel + budget: Query providers in parallel with an abortable time budget; first valid wins.
  • LKG safety: If all fail, serve last-known good marked stale.
  • Health layer: Each call records success/failure; the health endpoint aggregates; a polling hook updates the UI; the Health Card renders Fresh/Fallback/Unhealthy.

Impact

  • Users: Trust the numbers; know when data is fresh or on fallback.
  • Engineers: Faster incident triage; a clear contract for the quote pipeline.
  • Designers: Opportunity to model a friendly, accessible status language.

Contribute / join the sprint

  • Claim a story: US1–US9 are ready to start.
  • Design review: Badge palette, density, and mobile behaviours are open for proposals.
  • Beta test: npm run dev, try the widget, and leave notes on polling + error UX.
  • Pair with us: DM to join stand-ups or a pairing slot.

Links

We’re building toward a world where every portfolio value is fresh, explainable, and honest. Help us make it happen.

If you read this far, tweet to the author to show them you care. Tweet a Thanks

More Posts

Designing a “Never-0.00” Price Pipeline in the Real World

Pocket Portfolio - Oct 1

[DISCUSS] The “Never 0.00” Challenge — design a resilient price pipeline (client → edge) together

Pocket Portfolio - Sep 29

Today’s ship: Mock-Trade Lab, 5-min CSV Import, and bulletproof Price Fallbacks

Pocket Portfolio - Sep 29

The Ultimate TypeScript Learning Resource Stack That Every Developer Needs

PranavVerma - Sep 7

How to Auto-Fix and Enforce Sorted Imports Using ESLint

Sunny - Jun 15
chevron_left