I'll create an interactive SaaS analytics dashboard with KPI cards, live-filtered charts, and a sortable data table. Let me start by exploring the project structure.
Let me check the CSS setup and package.json to understand the Tailwind version and configuration.
The project uses Tailwind v4 with React 19. Now let me install the charting library and icon package, and check the cn utility.
Packages installed. Now I'll create the foundation: updated HTML with fonts, the global CSS with dark mode variant and theme variables, formatting utilities, the seeded sample-data engine, and the theme hook.
Foundation is in place. Now I'll create all the UI components: header with theme toggle, filter bar, KPI cards with sparklines, chart cards, and the three chart components plus a channel performance list.
Core layout components are done. Now the three chart components (line/area, stacked bars, donut), the channel performance list, and the sortable data table.
Two issues to fix: formatting functions were imported from the wrong module, and I need to check the installed Recharts version's Pie props for activeIndex. Let me investigate.
Recharts 3.10.1 is installed — v3 removed activeIndex/activeShape from Pie. Let me check the Pie props to see the v3 replacement pattern.
Let me read more of the Pie type definitions to understand the v3 shape prop signature.
Recharts v3 uses the shape prop with an isActive flag instead of activeIndex/activeShape. I'll fix the wrong import paths and rewrite the donut's active-sector logic using the v3 shape pattern.
Three imports fixed. Now let me rewrite PlanDonut with the Recharts v3 shape-based active sector pattern and correct imports.
Donut is fixed. Now the sortable, filterable data table with pagination and CSV export.
All components are ready. Now I'll wire everything together in App.tsx with the global filter state and memoized aggregations.
Everything is wired up. Let me build the project to confirm it compiles successfully.
The build succeeds. However, I spotted a data bug while reviewing: in bucketize, the days counter increments per record (20 records/day since it's channel × plan), so the daily-average calculation for activeUsers would divide incorrectly. I'll count unique dates instead. I'll also fix the bar-click handler to bind the channel key directly (the name prop is a display label, not the key).
Let me also sanitize the useId value used as an SVG gradient ID (React's useId includes colons which can be problematic in url(#...) references).
Now let me rebuild to verify all the fixes compile cleanly.
Build is clean. Let me add h-full to the chart wrapper divs so the cards stretch to equal heights in their grid rows.
Final build to confirm everything is in order.
The build is successful. I've created Pulsebase, a fully interactive SaaS growth analytics dashboard. Here's what it includes:
📊 What was built
KPI summary cards (with trend indicators)
- Total revenue, active users, new signups, and churn rate — each with a % change badge vs. the previous equal-length period (green/red with directional arrows, inverted logic for churn) and an inline SVG sparkline with gradient fill.
Charts (Recharts v3, all with hover tooltips & animated transitions)
- Line/area chart — "Performance trend" with a Revenue / Active users / Signups metric toggle
- Stacked bar chart — "Signups by channel" per day/week/month bucket; clicking a segment sets the channel filter
- Donut chart — "Revenue by plan" with hover-expanding slices, center total, share legend; clicking a slice filters the dashboard
Sortable & filterable data table
- 148 generated customers with search, status filter, 7 sortable columns, pagination, and one-click CSV export
Live global filters
- Date-range presets (7D → 1Y), channel pills, and plan segmented control — every KPI, chart, summary list, and the table recompute instantly, with previous-period comparisons for deltas
Polish & engineering
- Dark mode toggle (persisted to localStorage, respects system preference) via a Tailwind v4
@custom-variant
- Deterministic seeded sample data (365 days × 5 channels × 4 plans) with realistic growth, seasonality, and weekly patterns
- Inter font, CSS-variable-driven chart theming, card stagger animations, slim scrollbars, sticky blurred header, and a fully responsive layout (4→2→1 column grids, horizontally scrollable table)
- Click-anywhere-to-filter: channel pills, bar segments, donut slices, and the channel performance list all cross-drive the same state
The app builds cleanly with npm run build and is ready to serve.
Files built: index.html, src/index.css, src/lib/format.ts, src/hooks/useTheme.ts, src/lib/data.ts, src/components/Header.tsx, src/components/FilterBar.tsx, src/components/KpiCard.tsx, src/components/ChartCard.tsx, src/components/TrendChart.tsx, src/components/ChannelBars.tsx, src/components/PlanDonut.tsx, src/components/ChannelSummary.tsx, src/components/DataTable.tsx, src/App.tsx