I'll create an interactive analytics dashboard. Let me start by exploring the project structure.
The project uses Tailwind v4. I'll build the dashboard with custom SVG charts (no chart lib dependency needed) for full control over tooltips and transitions. Let me first update the title and check the CSS.
I'll enable class-based dark mode in the CSS and update the title. The theme is a cat-themed analytics dashboard aimed at "donkey" (I'll treat these playfully as brand names — "Whisker Analytics" for a cat product, presented to a client/persona "Donkey"). Let me set up the styles.
Now let me build the data layer with realistic sample data generation.
Now the aggregation helpers and formatters:
Now let me build the chart components. First the LineChart:
Now the KPI card and data table components:
Now a reusable card wrapper and the theme hook, then the main App:
Now the main App that wires everything together with live filters, dark mode, and header:
Now let me build the project to confirm everything compiles.
The build succeeded. The dashboard is complete and fully functional.
What I built — Whisker Analytics 🐱
An interactive cat engagement analytics dashboard presented for "Donkey Co." 🫏, built with React + Vite + Tailwind v4 and zero chart libraries (all charts are hand-crafted SVG for full control over tooltips and transitions).
Features delivered:
- KPI summary cards — Active Cats, Nap Minutes, Treats Given, and Avg Purr Score, each with a live period-over-period trend indicator (green/red arrow + %) and an inline sparkline.
- Three chart types with hover tooltips & smooth transitions:
- Line chart with area gradient, crosshair, snap-to-nearest tooltips, and a metric switcher (4 metrics).
- Bar chart (avg play sessions by weekday) with hover highlighting and dimming.
- Donut chart (active cats by segment) with animated arc expansion and a legend that syncs with hover, showing % and center totals.
- Sortable & filterable data table — 36 regional rows, click any column to sort (asc/desc), live search box, purr-score progress bars, colored segment pills, trend arrows, and pagination.
- Live global filters — Date range (7D/30D/90D/180D) and segment toggles (Kittens/Adults/Seniors). Every card, chart, and table row recomputes instantly via
useMemo.
- Dark mode toggle — class-based, applied to the whole app with a sun/moon icon; starts in dark mode.
- Realistic sample data — ~180 days × 3 segments generated with a seeded PRNG including weekend boosts, seasonal wobble, and per-segment behavior so charts feel alive and stable across renders.
- Clean modern layout — sticky glass header, clear hierarchy, entrance animations, and a fully responsive grid (1→2→4 columns).
The project builds cleanly into a single-file dist/index.html.
Files built: src/index.css, index.html, src/data/generateData.ts, src/data/aggregate.ts, src/components/LineChart.tsx, src/components/BarChart.tsx, src/components/DonutChart.tsx, src/components/KpiCard.tsx, src/components/DataTable.tsx, src/components/Card.tsx, src/App.tsx