I'll build an interactive analytics dashboard for an Amazon India Prime store. Let me start by exploring the project structure.
I have a clear picture. This is Tailwind v4 with React 19. I'll build a rich dashboard with custom SVG charts (animated, with tooltips), KPI cards, sortable/filterable table, and live filters with dark mode. Let me set up the dark mode variant first, then build the data engine and components.
Now the data engine with realistic sample data:
Now let's create formatting/aggregation utilities:
Now the theme hook and chart components. Let me create the theme handling:
Now the chart components. Starting with the line/area chart:
Now the UI building blocks — Card, KPI cards, and a mini sparkline:
Now the filters and data table:
Now the main App that ties everything together with live aggregation:
Now let me update the page title and build:
The build succeeded. I've created a complete, interactive analytics dashboard for the Amazon.in Prime store. Here's what I built:
Features
KPI Summary Cards (5) — Total Revenue, Orders, Avg Order Value, Prime Signups, and Conversion Rate. Each shows the live value, a trend indicator (▲/▼ % vs the previous equal period), and an inline animated sparkline. Cards fade-up on load and lift on hover.
Charts (all custom SVG, animated, with hover tooltips)
- Line/area chart — Revenue trend for the selected range with a dashed comparison line for the previous period, crosshair + floating tooltip on hover.
- Horizontal bar chart — Revenue by category, auto-sorted, with animated fill bars.
- Donut chart — Revenue share by Prime segment, with interactive legend and a dynamic center label showing the hovered slice's percentage.
- Vertical bar chart — Average orders by weekday (weekends highlighted) to show delivery demand.
Sortable & filterable data table — Top products with click-to-sort on every column, a live search box, prime-share progress bars, rating stars, return-rate highlighting, and pagination.
Live filters — Date-range presets (7/14/30/60/90 days), multi-select Prime segment chips, and category chips. Every KPI, chart, and table row recomputes instantly via a single memoized aggregation pass.
Design — Clean modern layout with clear hierarchy, sticky glass header with a "Live" badge, a persistent dark-mode toggle (defaults to dark, saved to localStorage), and fully responsive grids from mobile to desktop.
Realistic data — A deterministic generator produces 120 days of granular records across 6 categories × 4 segments with weekly seasonality, a growth trend, a "Great Indian Sale" spike, realistic INR pricing (formatted in Lakhs/Crores), and 48 named India-relevant products.
Files built: src/index.css, src/data/types.ts, src/data/generate.ts, src/data/format.ts, src/hooks/useTheme.ts, src/components/charts/LineChart.tsx, src/components/charts/BarChart.tsx, src/components/charts/DonutChart.tsx, src/components/ui/Card.tsx, src/components/KpiCard.tsx, src/components/Filters.tsx, src/components/DataTable.tsx, src/App.tsx, index.html