I'll build a comprehensive analytics dashboard with all the requested features. Let me start by exploring the project structure and then implement everything.
Now let me install the required packages and start building the dashboard.
Now I'll create the data generator and all dashboard components. Let me start with the data file and index.html.
Now let me create all the dashboard components:
I need to fix the TypeScript errors. Let me update the files with proper type handling:
Let me fix all the TypeScript errors by rewriting the chart components with proper typing:
Almost done - just need to fix the unused variable in KPICard. Let me fix it and then create the main App component:
Now let me create the main App component that ties everything together:
Now let me update the global CSS for proper styling:
Now let me build the project to check for errors:
Let me check the Tailwind and Vite configuration:
This is Tailwind v4 which has different syntax. Let me fix the CSS:
The build succeeded. Let me verify the recharts v3 API is compatible and also ensure the dark mode works properly. Let me check the recharts version and its API:
Good - recharts v3 is installed and the build succeeds. Let me improve the data filtering to be deterministic (no random on each render) and polish the dashboard further. Let me also enhance the visual design:
Now let me update the App.tsx with deterministic filtering and improved styling:
Let me build to verify everything works:
Build succeeds. Now let me implement proper dark mode toggling so it actually changes the visual theme:
I need to update all child components to accept the darkMode prop. Let me do this systematically:
Good - the child components are now properly typed. I just need to clean up the unused variables in App.tsx:
I need to fix the <style> tag that references removed variables. Let me see and fix the App.tsx:
Now let me build:
Build succeeds with no errors. Let me verify everything is clean and do a final check:
All clean. Let me verify the complete file structure:
All files are in place. Let me do one final build to confirm everything is working:
The build is successful. Here's a summary of the Strike Analytics Dashboard I built for it-m.digital:
🎯 Features
KPI Summary Cards (5 cards)
- Total Revenue, Total Orders, Active Users, Conversion Rate, Avg. Order Value
- Trend indicators (↑/↓ arrows with percentage change vs. prior period)
- Color-coded with icon badges and smooth hover effects
Charts with Tooltips & Animations
- Revenue Trend — Area chart with gradient fill
- User Growth — Area chart tracking user acquisition
- Weekly Revenue vs Orders — Bar chart with dual metrics
- Traffic Sources — Donut chart showing channel breakdown
- Order Volume — Area chart for order trends
- All charts have custom hover tooltips and 800ms smooth entry animations
Sortable & Filterable Data Table
- 12 campaigns with spend, revenue, orders, conversion rate, ROI, and status
- Click column headers to sort ascending/descending
- Search by campaign name or ID
- Filter by channel and status (Active/Paused/Completed)
- Pagination with page navigation
Live Filters
- Date Range: 7, 14, 30, or 90 days — updates all charts and KPIs instantly
- Segment: All Segments, Enterprise, Mid-Market, SMB, Consumer — applies proportional scaling deterministically
Dark Mode Toggle
- Switches between dark (slate/indigo) and light (white/slate) themes
- All components (cards, charts, table, filters) adapt their styling
Responsive Design
- Full-width layout on desktop with collapsible sidebar
- Mobile hamburger menu with overlay
- Grid layouts adapt from 1 to 5 columns based on viewport
Files built: index.html, src/data.ts, src/components/KPICard.tsx, src/components/LineChartCard.tsx, src/components/BarChartCard.tsx, src/components/DonutChartCard.tsx, src/components/DataTable.tsx, src/components/Filters.tsx, src/components/DarkModeToggle.tsx, src/App.tsx, src/index.css