App Pages Overhaul + Growth Intelligence Analytics — Design Document

Date: 2026-03-09 Approach: Design System First — define shared components, then apply to account, analytics, and consistency pass.


1. New Design System Components

Stat Card v2 (.stat-card-v2)

Anatomy: Label → Value → Delta → Sparkline (research-backed from Stripe, Linear, Plausible).

Section Header v2 (.section-header-v2)

Every content section gets: heading + description + optional action button, with a bottom border separator.

Status Badge (.status-badge)

Consistent pill badges with colored dot indicators:

Action Empty State

When a section has no data: icon + heading + description + CTA buttons. Replaces dead-end “No data” text with actionable next steps.


2. Account Page Redesign

Layout: Stacked Full-Width Sections

Move from 2-column card grid to single-column stacked sections (Stripe settings pattern). Each section is a glass-card with section-header-v2.

Sections (top to bottom):

  1. Subscription — Plan name, status badge, next billing date, amount, plan features checklist, Manage Billing / Change Plan buttons
  2. Payment Method — Card icon + last 4 digits + expiry, Update Payment button (hidden-until-js, loaded from billing info API)
  3. Billing History — Table of recent invoices with date, description, amount, paid/unpaid status badge, View link (hidden-until-js)
  4. Account Balance — Current balance amount, transaction history (hidden-until-js, only if balance exists)
  5. Profile — Email with verification status badge, Resend Verification button
  6. API Key — Masked key with Copy button, Regenerate with warning text, link to API docs
  7. Security — Change password form (current, new, confirm), Update Password button
  8. Danger Zone — Red-tinted border, Log Out + Delete Account buttons

Backend Changes: None

All data already available from existing endpoints (/auth/me, /billing/info).


3. Analytics Growth Intelligence

New Backend: Expand Breakdown Endpoint

Add to handleGetBreakdown response:

Implementation: ~20 additional lines in the existing pagination loop.

New Frontend Sections (added to analytics.js + analytics.html):

Section A: Signup Velocity Panel (full-width, after KPIs)

Section B: Signup Activity Heatmap (full-width)

Section C: Geographic Distribution + Waitlist Leaderboard (two-column)

Section D: Actionable Insights Card (full-width, bottom)


4. Consistency Pass

Dashboard

Templates Page

Domains Page

Team Page


5. Files Impacted

File Changes Scope
docs/assets/css/style.css New component classes (stat-card-v2, section-header-v2, status-badge, heatmap, velocity) High
docs/account.html Full restructure — stacked sections layout High
docs/assets/js/account.js Rewrite to render new section layout, status badges, billing history table High
terraform/lambda_src/analytics.mjs Expand breakdown endpoint with day×hour heatmap + velocity data Medium
docs/analytics.html Add velocity, heatmap, leaderboard, insights section placeholders Medium
docs/assets/js/analytics.js 4 new render functions + insights rules engine (~250 lines) High
docs/dashboard.html Replace summary cards with stat-card-v2 Medium
docs/assets/js/dashboard.js Render stat-card-v2 with sparklines + deltas, add mini sparklines to waitlist cards Medium
docs/templates.html Add empty state, type icons Low
docs/assets/js/templates.js Render action empty state, template type icons Low
docs/domains.html Status badges, copy buttons Low
docs/assets/js/domains.js Render status badges, copy buttons Low
docs/team.html Role badges, (You) label Low
docs/assets/js/team.js Render role badges, pending status Low

6. Design Principles Applied

  1. Label → Value → Delta → Sparkline card anatomy everywhere (Stripe pattern)
  2. Every metric suggests a next action — no dead-end data (PostHog pattern)
  3. Progressive disclosure — KPIs → charts → breakdowns → insights (Plausible pattern)
  4. Grouped sections with headings + descriptions for settings (Stripe settings pattern)
  5. Status badges for all state indicators — consistent visual language
  6. Action empty states — CTAs instead of “no data” messages
  7. CSS-only visualizations where possible — conic-gradient donuts, grid heatmaps, SVG sparklines
  8. 5-7 KPIs max at the top level to prevent cognitive overload