System architecture
Data Freshness & Staleness Check Architecture
- 01List each tracked source and
A freshness panel that watches the heartbeat of each data source feeding the dashboards — last lead, last subscriber, last booking event, last blog...
- 02SQL that returns the latest
Write SQL that returns the latest timestamp per source (max(created_at)/max(updated_at)) and computes age, mirroring the lastLead/lastWaitlist pattern already in lib/monitoring.ts.
- 03Supabase Postgres
Supabase Postgres contributes the trusted model for Data Freshness & Staleness Check so metrics are defined before they are visualized.
- 04SQL
Build a freshness strip (server component) showing each source with its last-update age and a stale/ok badge, sorted so stale sources float to the top.
- 05Review Queue
If per-source windows aren't tuned yet, show last-update ages as plain informational timestamps (no red/green) so owners self-judge, then layer thr...
- 06Dashboard Action
Stops the worst dashboard failure mode — confidently acting on stale numbers.