I'll create a comprehensive Clinic CRM analytics dashboard. Let me start by exploring the project structure.
Now I'll build the dashboard. Starting with the HTML shell and global styles.
Now the core data engine with realistic, seeded sample data.
Now the formatting helpers and animation/theme hooks.
Now the chart library — custom SVG charts with tweened transitions and hover tooltips.
Now the UI primitives and icon set.
Now the KPI cards and filter bar.
Now the sortable, filterable data table with dual views.
Now the secondary insight panels (funnel, top providers, operational health).
Now the main app shell that ties everything together.
Build succeeded. Now let me polish: mount-in animations, responsive card headers, and a cleaner settings icon.
Let me refine bucketing so partial periods are labeled honestly rather than looking like a data drop.
The dashboard is complete and building cleanly. Here's what I built:
🏥 Meridian Clinic CRM — Practice Analytics
Data engine (src/lib/data.ts)
- Deterministic seeded generator producing ~36,000 fact rows across 400 days × 18 providers × 5 acquisition channels, plus 1,600 individual appointment records
- Realistic behavior baked in: weekday seasonality (Sundays nearly closed), monthly seasonality (January surge, summer/holiday dips), ~34% growth trend, per-specialty ticket prices, channel-specific no-show and new-patient propensities, improving CSAT and shrinking wait times over time
- A single-pass aggregator slices by date range + location + service + channel into time buckets, and by service/channel/location/provider/weekday
KPI cards — Revenue, Visits Completed, New Patients, No-show Rate, Patient Satisfaction. Each has a rAF-tweened counter, a live sparkline, and a trend pill computed against the preceding equivalent period (auto-normalized when history is truncated), with "good" direction inverted for no-shows.
Charts (hand-built SVG, no chart library)
- Line chart — metric switcher (Revenue / Visits / New patients / No-shows), optional dashed previous-period overlay, dual-axis support, crosshair guide, multi-series tooltip, smooth cubic-eased morphing between filter states
- Stacked bar chart — appointment outcomes (completed/cancelled/no-show) pivotable by Service, Location, or Weekday, with column highlight + enriched tooltip (revenue, show rate)
- Donut chart — acquisition channels by patients or revenue, segments push outward on hover, center label swaps to the hovered slice, and the legend list is hover-synced bidirectionally
Filters — 7D/30D/90D/6M/12M presets, a custom date-range popover (with This month / Last month / YTD shortcuts), and three multi-select segment dropdowns. Every card, chart, panel, and table row recomputes live; granularity auto-shifts day→week→month and partial buckets are labeled honestly.
Data table — two views (Appointments / Provider performance), every column sortable, free-text search, status filter, pagination, CSV export, status badges, utilization bars, and an empty state.
Extras — acquisition funnel with step conversion, top-provider leaderboard, operational health stats, location scorecard, a dynamic insight card in the sidebar, animated dark-mode switch with persistence, and a fully responsive layout down to mobile with a slide-out nav.
Files built: index.html, src/index.css, src/lib/data.ts, src/lib/format.ts, src/hooks/useChartHooks.ts, src/components/charts/parts.tsx, src/components/charts/LineChart.tsx, src/components/charts/BarChart.tsx, src/components/charts/DonutChart.tsx, src/components/charts/Sparkline.tsx, src/components/icons.tsx, src/components/ui.tsx, src/components/KpiCard.tsx, src/components/FilterBar.tsx, src/components/DataTable.tsx, src/components/panels.tsx, src/App.tsx