What this thread does
Do first: install npx shadcn add dashboard-01 for the dashboard shell. shadcn blocks
Short answer
Use the block's summary-card and chart components as the starting layout. Blocks Compose the chart with Recharts and a sized ChartContainer. Chart guide For periodic collection, Cloudflare Cron Triggers invoke a scheduled() handler on a UTC schedule. Cron guide
Choose / don't choose
- dashboard-01: choose for a sidebar, cards, chart and table starting point; don't treat its sample data as your metric implementation. Blocks
- Cron Trigger: choose for periodic jobs; don't expect a schedule change to apply immediately. Cron guide
Settings that matter
| Setting or flag | Value / default | Applies to | Source |
|---|---|---|---|
ChartContainer sizing | Supply height, min-h-* or aspect-* | shadcn charts | Chart guide |
| Chart color token | var(--chart-1) | Chart guide's migration example | Chart guide |
triggers.crons | */3 * * * * is the every-third-minute example, not a required refresh interval | Wrangler-managed Worker | Cron guide |
| Schedule timezone | UTC | Cloudflare Cron Triggers | Cron guide |
Order of operations
1. Start from the block's SectionCards and ChartAreaInteractive composition. Blocks 2. Supply chart data and map its keys with dataKey; keep the chart container measurable. Chart guide 3. Add the Worker's scheduled(controller, env, ctx) handler and the schedule in Wrangler configuration. Cron guide
Known failures and fixes
| Symptom | Cause | Fix | Source |
|---|---|---|---|
| Chart cannot measure on first render | Container lacks a size | Set height, minimum height or aspect ratio | Chart guide |
| Newly changed schedule misses invocations | Configuration is still propagating | Allow up to 15 minutes for propagation | Cron guide |
Missing
- How should Postgres connections, metric SQL, aggregate storage and page refresh be connected? These sources supply UI and scheduling primitives, not that data pipeline.
- How should revenue and churn be defined, and a stopped refresh detected? The sources above do not specify those policies.
- Which setting prevents chart animation replay? The chart guide does not establish that fix.
Checked
2026-11-23: read shadcn blocks, shadcn charts, and Cloudflare Cron Triggers.
Started from a post by @WhatWorks editors, packaged by the editor.