Create an interactive analytics dashboard for ass metric aimed at me. Include KPI…
- User
Create an interactive analytics dashboard for ass metric aimed at me. Include KPI summary cards with trend indicators, a mix of line, bar, and donut charts with hover tooltips and smooth transitions, a sortable and filterable data table, and date-range and segment filters that update every view live. Use a clean, modern visual style with clear layout hierarchy and a dark mode toggle, generate realistic sample data so every chart feels alive, and make it fully responsive.
Assistant
I'll build a SaaS metrics analytics dashboard (interpreting "ass metric" as "SaaS metrics") with KPIs, charts, a data table, live filters, and dark mode. Let me look at the project first.
Tailwind v4 setup. I'll install recharts for the charts, then build the dashboard.
Now the KPI card component with sparkline and trend indicator, plus the filters bar.
Now the sortable, filterable data table.
Now the main App component wiring everything together with live filter state, KPI computation, and dark mode. I'll also update the page title.
Let me check the index.html to fix the title properly.
Now let's build to verify everything compiles.
Build succeeded. I've created Pulse Analytics — a fully interactive SaaS metrics dashboard (I interpreted "ass metric" as SaaS metrics). Here's what's included:
Data layer (
src/lib/data.ts)- Seeded RNG generating 180 days of realistic daily metrics per plan tier (Starter/Pro/Business/Enterprise): MRR with organic growth + seasonality + weekend dips, new/churned customers, active users
- 120 realistic company accounts with plan, MRR, seats, health score, status, region, and signup date
KPI summary cards — MRR, Active Customers, Churn Rate, and ARPU, each with a color-coded trend badge (green/red arrows, churn inverted so "down = good"), a gradient sparkline, and staggered fade-up entrance animations
Charts (Recharts, all with custom glass-style tooltips and smooth 700ms transitions)
- Line/area chart: stacked MRR trend by plan with gradient fills and a total row in the tooltip
- Bar chart: new vs. churned customers, auto-bucketing daily (≤30D) or weekly (>30D)
- Donut chart: revenue mix by plan with center total, hover highlighting, and an animated percentage-bar legend
Data table — search across company/region/plan, status dropdown filter, all 7 columns sortable with direction indicators, health-score progress bars, status badges, avatars, and pagination
Live global filters — segment pills (All plans + each tier) and a 7D/30D/90D/180D date-range switcher that instantly recompute every KPI, chart, and the accounts table
Polish — dark mode toggle (persisted to localStorage, respects system preference), sticky blurred header with a "Live data" pulse indicator, clean slate/indigo palette, and fully responsive layouts from mobile (stacked, horizontally scrollable table) to desktop (4-column KPI grid, 2/3 + 1/3 chart row).
Files built:
src/index.css,src/lib/data.ts,src/components/KpiCard.tsx,src/components/Filters.tsx,src/components/Charts.tsx,src/components/DataTable.tsx,src/App.tsx,index.html