I'll build a premium fitness analytics dashboard — "PULSE" — with custom animated SVG charts, live filters, and full dark/light theming. Let me first explore the project structure.
Tailwind v4 with CSS-based config. Let me check the current CSS and HTML entry.
Tailwind v4 setup with CSS-based config. Now I'll install animation/icon libraries and set up the foundation (fonts, theme tokens, dark-mode variant).
Packages installed. Now the design system in index.css — theme tokens that respond to the .dark class, fonts, and polish utilities.
CSS foundation done. Now the data engine, formatters, and animation hooks — the guts that make every view feel alive.
Data engine done. Now the animation hooks — a spring-smooth number/series tweener that morphs charts when filters change, plus a ResizeObserver measure hook.
Now the chart library — a shared spring-following tooltip plus four hand-built SVG chart components with hover states and morphing transitions.
Now the flagship area/line chart with crosshair hover, animated gradients, and morphing series.
Area chart done. Now the bar chart and donut chart.
Charts complete. Now the UI shell components — Card, KPI cards with animated counters, and the side rail.
Now the header, filter bar (with sliding segmented control + hub dropdown), and the sortable data table.
Now the sortable, filterable data table.
Now the main App.tsx that wires it all together — state, computations, theming, layout.
Quick fix — the KPI data uses spark, but the component expects sparkValues. Let me check main.tsx too.
Now replacing the four spark: keys with sparkValues using the helper.
All type errors resolved. Now let me harden the animation hooks against array-identity churn (memoize tween targets in charts) and swap the revenue icon.
All edits applied (the lint errors were transient mid-edit states). Let me build to verify.
Build succeeded. One responsive refinement — the header search hides on small screens, so I'll add a mobile-visible search field inside the table itself.
Final build to confirm everything is clean.
Build is clean. PULSE — Fitness Analytics Hub is live and ready.
What was built
Interactive analytics command center for a fitness hub business, with every view driven by one shared state so filters update everything simultaneously with buttery morphing transitions.
Core features
- 4 KPI cards — Active Members, Gym Check-ins, Avg Class Fill Rate, Revenue — each with an animated counter, trend delta chip (vs. previous period), corner icon micro-interaction, and a live sparkline that re-morphs when filters change
- 3 custom SVG chart types, all hand-built with spring-following hover tooltips:
- Area/line chart — daily training volume with crosshair hover, gradient fill, nice-number axes, and switchable metrics (check-ins / revenue / calories)
- Bar chart — weekday traffic with rounded bars, peak-bar highlighting, and value labels
- Donut chart — activity mix with hover-to-expand segments, live center readout, and an interactive two-way legend
- Sortable + filterable data table — 18-class roster with click-to-sort headers (9 columns), category filter pills, full-text search (header on desktop, in-table on mobile), fill-rate progress bars, trend chips, and pagination
- Live filters — 7D / 30D / 90D segmented range control (sliding pill) and a hub/segment dropdown (All Hubs + 4 locations); charts tween fluidly between states thanks to array interpolation that handles length changes
Engineering details
- Realistic seeded data engine — 240 days of daily metrics per hub with weekly seasonality (weekend peaks, Sunday dips), slow member growth, churn wobble, and revenue derived from day-passes + membership allocation. Deterministic so data is stable but distinct per segment
- Dark / light mode — animated Sun/Moon toggle, persisted to localStorage, respects system preference; theme flows through CSS variables into both UI and SVG chart strokes
- Fully responsive — icon side rail collapses to a compact header on mobile, KPI grid stacks 1→2→4 columns, chart rows reflow from single column to 8/4 splits, table scrolls horizontally with sticky affordances
- Design system: Space Grotesk + Inter typography, volt-lime accent on porcelain/near-black surfaces, staggered entrance choreography, custom scrollbars and focus rings
Files built: index.html, src/index.css, src/lib/format.ts, src/data/fitness.ts, src/hooks/useAnimated.ts, src/hooks/useMeasure.ts, src/components/charts/ChartTooltip.tsx, src/components/charts/Sparkline.tsx, src/components/charts/AreaChart.tsx, src/components/charts/BarChart.tsx, src/components/charts/DonutChart.tsx, src/components/ui/Card.tsx, src/components/ui/KpiCard.tsx, src/components/SideRail.tsx, src/components/Header.tsx, src/components/FilterBar.tsx, src/components/DataTable.tsx, src/App.tsx