Skip to main content
vibld

Template

Churnwatch

A customer-success dashboard that plots every account as a dot in a beeswarm by health score, sized by ARR, with a risk threshold, portfolio stats and a watchlist of the most exposed accounts. Scores are explainable from six named drivers, and CS leaders can prioritize renewals and outreach.

Account churn-risk monitor · App · Small tools and apps · front-end app (local state)

A mock-up of the homepage, drawn from this design’s layout, palette and typefaces. A build follows the full prompt below.

Start from this templateRead the build prompt

Typefaces

Newsreader and Work Sans are already uncommon here, and with Plex Mono they read like a financial newspaper data desk, so the set stays as it is.

  • NewsreaderHeadings: titles 28-32px, section heads 24px
  • Work SansBody: body 16px, dense tables 15px
  • IBM Plex MonoFigures and code: 12px uppercase labels, figures

Who it is for

  • Customer success leaders
  • Account managers and CSMs
  • B2B SaaS founders tracking retention risk
  • RevOps teams prototyping health scores

Layout

  1. Header: pulse icon + serif title, mono uppercase portfolio summary (accounts / ARR), outlined guide pill and light-mode toggle pill
  2. Stat bar of four columns between hairline rules: ARR at risk, accounts at risk, median health, renewals in the next 90 days, each with a colored delta
  3. Controls row: Combined / By segment toggle; segment filters (All, Enterprise, Mid-Market, SMB)
  4. Beeswarm chart across the full width: dots colored from terracotta (at risk) to warm grey (healthy), a vertical risk-threshold line and label, x-axis 20-100
  5. Watchlist card: table of the eight most exposed accounts with ARR, health, 13-week sparkline, drawdown, runway to risk, seats, week-over-week change, last touch and renewal date; footnote about dashes
  6. Slide-out account detail panel with trajectory chart, driver waterfall and facts grid

Palette

editorial, warm, serious, sophisticated, calm. Dark paper and ink make risk data feel considered rather than alarmist.

  • background warm ink#110c08
  • panel#1a1410
  • text warm paper#f2eee6
  • muted text#bbb7af
  • at-risk terracotta#d0694a
  • healthy warm grey#b5aca1
  • rule/border#3a322b

Every checked pair, measured again

SampleWhereRatioNeeds
Aabody text on background16.80:14.5:1
Aatext on panel15.76:14.5:1
Aamuted text on background9.73:14.5:1
Aamuted text on panel9.12:14.5:1
Aaterracotta risk text on background5.37:14.5:1
Aaterracotta risk text on panel5.04:14.5:1
healthy dot on background8.69:13:1
input / pill border on background3.44:13:1
Aalight theme text15.77:14.5:1
Aalight theme risk text4.66:14.5:1

As vibld’s tokens

The palette on the fifteen colour tokens vibld styles a project with, each text colour on the fill it is read on. Marked tokens are solved from the palette, because no swatch held that role at 4.5:1.

  • background
  • card
  • muted
  • primary
  • secondary
  • accent
  • destructive *

Type scale

Display
Newsreader Regular 30px title, 24px section heads, slight negative tracking
Body
Work Sans 16px body (15px in dense tables); IBM Plex Mono 12px uppercase with wide 0.2em tracking for labels and figures

An editorial serif with a mono data layer: it reads like a financial newspaper's data desk.

Spacing and imagery

Centered 1088px column, hairline rules framing the stat bar, spacious chart area, dense watchlist rows of about 45px, pill buttons.

Pure data graphics: a force-simulated beeswarm, inline sparklines, and a waterfall in the detail panel; no photos.

Components

  • Serif header with mono summary
  • Guide slide-out
  • Theme toggle pill
  • Portfolio stat bar
  • Combined/by-segment toggle
  • Segment filter chips
  • Beeswarm chart with force layout
  • Risk threshold line
  • Hover tooltip
  • Watchlist table with sparklines
  • Runway-to-risk projection
  • Account detail slide-out
  • Driver waterfall
  • Facts grid (renewal, seat utilization, owner, last touch)

Interactions

  • Dots settle into place with a force simulation on load
  • Animate between combined and per-segment rows
  • Segment filter dims the others instead of hiding them
  • Hover a dot for name, ARR, score and segment
  • Click to select and dim others; open the detail panel
  • Watchlist row click opens the same panel
  • Staged page-load reveal
  • Light/dark toggle

Data

  • Account{id, name, segment enterprise|mid_market|smb, arr, owner, renewal_date, seats_purchased, seats_active, last_touch_at}
  • HealthSnapshot{account_id, week, score, drivers{usage, adoption, support, sentiment, engagement, billing}}
  • PortfolioStats{arr_at_risk, accounts_at_risk, median_health, renewals_90d_arr, deltas_4w}
  • Config{risk_threshold, driver_weights}

Build prompt

The baseline every prompt in the catalog assumes, then this design’s own ten sections, from goal to guardrails.

The baseline
### How to use these prompts
Paste a template's build prompt into your coding agent as the first message. Each prompt names its own stack, tokens and acceptance criteria; the rules below apply to all of them and can be prepended once per project.

### Engineering baseline
- TypeScript strict mode, no `any`, small typed components, feature folders, and one source of truth for design tokens (CSS variables consumed by Tailwind).
- Validate every input with a shared zod schema on the client and again on the server or edge function. Never trust client-side checks alone.
- Show loading, empty and error states for every async view. Surface errors in plain language with a retry, and log details to the console in development only.
- Keep secrets out of the bundle. Only publishable keys (for example a Supabase anon key) belong in client code; service-role keys, API keys and webhooks live in server or edge-function environment variables.

### Data and auth baseline (full-stack templates)
- Enable Row Level Security on every table before inserting data. Default-deny, then add owner-scoped policies (`auth.uid() = user_id`) and explicit role checks for admin views.
- Store roles in a separate table checked by a security-definer function, never in a user-editable profile field.
- Upload files to private storage buckets with size and MIME limits, and serve them through signed URLs.
- Rate-limit public endpoints (forms, auth, AI calls) and add a honeypot field or captcha to anonymous forms.
- Take payments through a hosted checkout and verify webhooks by signature. Never handle raw card data.

### Accessibility and UX baseline
- Target WCAG 2.2 AA: 4.5:1 contrast for normal text and 3:1 for large text, input borders, focus rings and meaningful icons or chart lines. Every palette in this catalog lists its verified pairs; re-check with a contrast tool after any colour change.
- Keep body text at 16px or larger with 1.5 line height, nothing below 12px, no light weights under 24px, and uppercase only for short labels.
- Give every interactive element a visible focus ring, full keyboard support, semantic landmarks, labelled form fields, and alt text on meaningful images.
- Respect `prefers-reduced-motion` for every animation. Give drag-and-drop and carousels keyboard and button alternatives.
- Build mobile-first and test at 375px, 768px and 1280px.

### Content guardrails
- Use original copy, fictional sample data and placeholder or licensed imagery. Do not reuse another product's name, logo, screenshots or marketing text.
- Label demo testimonials and metrics as samples. Collect the minimum personal data the feature needs.
### Goal
Build **Churnwatch**, a customer-health dashboard for B2B customer-success teams. It shows the whole portfolio at once, with every account a dot positioned by health and sized by revenue, and it surfaces the accounts that most need a call this week. It explains each score through named drivers so CSMs trust it.

### Stack
React 18 + TypeScript + Vite, Tailwind CSS and lucide-react, plus shadcn/ui (Radix: Sheet, ToggleGroup, Tooltip) for primitives. Use d3-force and d3-scale with hand-built SVG for the beeswarm and sparklines, Framer Motion for the staged reveal and layout morphs, date-fns and zod. It is front-end only with a seeded dataset module; the data layer is an interface that can later point at a warehouse or CS platform export.

### Pages & layout
1. **Header**: an icon, a serif title, a mono summary ("160 accounts / $26.6M ARR"), an outlined guide pill and a theme pill.
2. **Stat bar** framed by hairline rules: ARR at risk, accounts at risk, median health and renewals due in 90 days, each with a four-week delta (worsening in terracotta).
3. **Controls**: Combined / By segment and segment chips.
4. **Beeswarm**: full width with an x-axis for health 0-100, a labelled risk-threshold line and dot color interpolated from terracotta to warm grey.
5. **Watchlist**: the eight accounts most exposed by revenue at risk, with columns for ARR, health, a 13-week sparkline, drawdown from peak, projected weeks to threshold, seat utilization, week-over-week change, last touch and renewal.
6. **Account sheet**: a trajectory chart with the threshold, a driver waterfall (base plus six drivers equals the score) and a facts grid.
7. **Guide sheet**: how to swap in real data and tune the threshold and weights.

### Design system
- Dark (default): `--background: #110c08`, `--panel: #1a1410`, `--foreground: #f2eee6`, `--muted-fg: #bbb7af`, `--risk: #d0694a`, `--healthy: #b5aca1`, `--rule: #3a322b` (decorative), `--input-border: #756456`.
- Light: `--background: #f6f1e8`, `--foreground: #1d1712`, risk `#b04f2e`.
- Fonts: Newsreader (titles 28-32px, sections 24px), Work Sans (body 16px at line-height 1.5, dense tables 15px) and IBM Plex Mono (short labels 12px uppercase with 0.2em tracking; figures).
- Spacing on a 4px base; container 1088px; radius full on pills, 6px on panels.
- Motion: staged reveal (header, stats, chart, watchlist) at 120ms intervals; force settle under about 1.5s; 500ms layout morph between views.

### Components & interactions
StatBar, ViewToggle, SegmentChips (dim, don't hide), Beeswarm (hover tooltip; click to select and dim others; Esc clears; keyboard focus moves through dots in score order), ThresholdLine, WatchlistTable (sortable; row opens the sheet; "–" means not applicable), Sparkline, AccountSheet (loading and empty trajectory states), DriverWaterfall, GuideSheet, ThemeToggle.

### Data & state
`Account` and `HealthSnapshot` as in the data model. Score = weighted sum of the six drivers, clamped 0-100, in a pure, tested function. Exposure = ARR × (threshold − score) adjusted by drawdown. Runway = weeks until a linear fit of the last six weeks crosses the threshold (show "–" when the trend is flat or improving). Keep view, segment, selected account and theme in the URL or localStorage. Seed 160 accounts with invented names across three segments.

### Accessibility
Muted text (9.7:1) and terracotta (5.4:1) both pass on `#110c08`; the light theme uses `#b04f2e` for risk text. Pair the beeswarm with a "view as table" alternative and a text summary per segment. Dots need accessible names via a roving tabindex, or a list fallback. Show risk with a text label in the tooltips and table, not color alone. Under reduced motion, skip the force animation and render final positions.
Verified contrast: body: #f2eee6 on #110c08 = 16.8:1; muted: #bbb7af on #110c08 = 9.7:1; risk: #d0694a on #110c08 = 5.4:1.

### Security
There is no backend by default and no keys in the client build. When wiring real data, go through an authenticated API with RLS so CSMs see only accounts they own or all accounts by role, validate payloads with zod, and render account names as text.

### Performance & SEO
Run the force simulation in a web worker or precompute positions per view and cache them. Throttle hover. Keep SVG node count under about 1,000 and switch to canvas above that. Internal tool: noindex, with a descriptive title.

### Guardrails
- Write fresh copy; use invented accounts only and no real company names.
- Describe scores as heuristics, not predictions.
- Keep components small and typed; no `any`. Show data errors visibly.
- Done when: (1) the portfolio stats reconcile with the account data; (2) every score's waterfall sums exactly to it; (3) the watchlist ranks by exposure correctly; (4) chart, table and sheet are keyboard-accessible; (5) both themes pass AA.

Open the builderAll templatesThis palette on its own