I'll create a comprehensive analytics dashboard for Amazon Shop India's Prime app users. Let me start by exploring the project structure and setting things up.
Now let me install the required packages for charts and icons:
Now let me update the index.html title:
Now let me create the full dashboard. I'll create multiple files:
- First, the data generation utilities
- Then the component files
- Finally, the main App component
Now let me create all the component files:
In newer versions of recharts, defs/linearGradient/stop are not exported separately. Let me fix:
Now let me check if recharts supports JSX elements for defs:
The newer recharts uses activeIndex differently. Let me check and fix:
I see - the newer recharts may not have activeIndex on Pie directly. Let me just simplify the donut chart without active index:
Let me check the recharts version and its API:
Recharts v3+ has changed the API. Let me check:
So activeIndex was removed in v3. Let me simplify:
Now create the segment analysis chart, data table, filters, and main App:
Now create the Filters component and the main App:
Now update the CSS with animations:
Now create the main App.tsx:
Now let me build the project to check for errors:
The project builds successfully. Let me verify the output looks right by checking the build output:
The build is successful - the single file HTML is generated at 678KB (all inlined). Let me verify the project structure is complete:
The project builds successfully with all components. Let me clean up the unused cn.ts file that came with the template:
That's a utility file that came with the template - it's fine to leave. The project builds successfully. Here's a summary of what was created:
Amazon Shop India — Prime Analytics Dashboard
✅ Complete Dashboard Built Successfully
The project is a fully interactive analytics dashboard with the following features:
📊 4 KPI Summary Cards — Total Revenue, Total Orders, Active Users, Conversion Rate — each with trend indicators (up/down arrows with percentage changes), gradient icon backgrounds, and hover animations.
📈 Revenue Line Chart — Smooth animated line chart showing revenue trends over time with custom hover tooltips, gradient fill area, and grid lines.
📊 Orders & Users Bar Chart — Side-by-side bar chart for the last 14 days showing orders and active user counts with custom tooltips.
🍩 Category Donut Chart — Revenue distribution across 6 categories (Electronics, Fashion, Home, Books, Beauty, Groceries) with hover-opacity effects and a custom legend.
📊 Segment Analysis Bar Chart — Grouped bar chart comparing Revenue, Users, and Orders across Prime segments (Shopping, Prime Video, Music, Reading).
📋 Sortable & Filterable Data Table — 50 rows of transaction data with:
- Click-to-sort on any column (with sort direction indicators)
- Search/filter by product name, category, region, or segment
- Pagination (10 rows per page)
- Color-coded conversion rates (green/amber/red)
🔍 Live Filters — Date range filter (7d/30d/90d/All time) and segment filter that instantly update all charts and KPIs with regenerated realistic data.
🌙 Dark Mode Toggle — Complete dark/light theme with smooth transitions, persisted to localStorage, and respecting system preference.
🎨 Design — Clean modern aesthetic with glassmorphism cards, gradient accents, backdrop blur, smooth animations (fadeSlideUp, fadeIn), responsive grid layout, and a sticky header.
📱 Fully Responsive — Works on mobile through desktop with Tailwind's responsive grid system.
Files built: index.html, src/types.ts, src/data.ts, src/components/ThemeProvider.tsx, src/components/KpiCard.tsx, src/components/RevenueLineChart.tsx, src/components/OrdersBarChart.tsx, src/components/CategoryDonutChart.tsx, src/components/SegmentRadarChart.tsx, src/components/DataTable.tsx, src/components/Filters.tsx, src/index.css, src/App.tsx