HelloSciCom
← Back to Dashboard
Build Log · Internal

How the Dashboard Works

A running log of what's been built, how data flows in, what each piece of logic actually does, and what we still need to wire up. Update this as we go.

What the Dashboard Is

The Client Health Dashboard is a live snapshot of every HelloSciCom client we currently work with. Each card shows hours used vs. retainer this month, the hourly rate (with retainer discount), a link to the contract, the creative lead, and the status of next month's retainer. Cards are clickable for a detail/drill-down view.

Goal: at a glance, everyone on the team can answer "are we on track with this client, and is the client looped in?"

Where the Data Comes From

Storage: Cloudflare KV namespace CRM_DATA, key dashboard:v1. Reads via GET /api/dashboard-data, writes via PUT with header X-Potoo-Secret.

The Two Pieces of Logic That Drive Color

1. Countdown to the 15th (next month's retainer)

Each month, by the 15th, creative leads need to confirm next month's retainer with their clients. The countdown box on each card is a gentle nudge to make that happen.

2. Health bar color (hours used vs. retainer)

The bar fills with the percentage of retainer hours used. The colors mean:

Why the under-trigger is conservative: Sarah's note in the build meeting — err on the side of not triggering. Creative leads plan hours their own way and we don't know what's "normal" for each client. The 60% / 5-days / 10-hrs floor combo means this fires rarely, and there's a one-click dismiss for the rest of the month if it's a false alarm. Tunable in dashboard.htmlcomputeUnderTrigger().

The "Client informed of over/under?" toggle

Only appears when a trigger has fired (over or under). The most important thing is always communication to the client — going over or under is fine as long as they know. Once toggled on:

On the 1st of each month, signoff and dismissal state reset automatically (handled by the data layer).

Files & Endpoints

What I Need from Willa / Sarah

Data still to fill in

Changelog

2026-05-14 · later same day
Build Log truth pass
Caught and corrected stale language on this page and on the dashboard: hours are not email-parsed — they sync live from Avaza via the existing REST API integration (LaunchAgent + Python script described above). Roadmap item "build the Avaza integration" reframed as "add a verifier pass to the existing sync."
2026-05-14
v2 — Smarter color logic, countdown windowing, build-log page
Countdown box now hides outside the 8th→15th window (and shows "OVERDUE" after the 15th if unconfirmed). The "Client informed?" pill no longer appears by default — it only surfaces when an over-trigger or under-trigger fires. Added a new under-trigger (≤5 days left + <60% used + retainer ≥10 hrs) with a one-click dismiss for the rest of the month. Created this page and moved all build notes here from the bottom of the dashboard.
earlier
v1 — Live Avaza hours
Hours pull directly from Avaza (current month, all entries). Sub-client roll-ups working for Poley and JLS. Retainer-tier rate discounts (-$20 at 10 hrs, -$30 at 20, -$40 at 40, -$50 at 60) applied to displayed rate. Sticky header + drill-down detail pages live.
v0
v0 — Draft / Internal Tool
Initial cards, seed data, KV-backed signoff toggle.

Roadmap

This page is internal to HelloSciCom. Last meaningful update: 2026-05-14.