Let me start by exploring the project structure and then build this comprehensive analytics dashboard.
Now I'll install Recharts for the charting library and build out the entire dashboard. Let me start by installing dependencies.
Now let me create all the dashboard files. I'll start with the sample data generator, then build each component.
Now let me create the theme context for dark mode:
Now the KPI Cards component:
Now the Charts component with line, bar, and donut charts:
Now the sortable and filterable Data Table:
Now the Header component with dark mode toggle:
Now the Filters component for date range and segment:
Now let me create the main App.tsx that ties everything together:
Now update the index.html title and add dark mode CSS:
Let me now build the project to check for any errors:
Good, the build succeeded. Let me fix a small bug in the data table's amount display:
Let me also improve the tooltip formatting to handle different data types better:
Let me enhance the charts section with an additional user growth chart and better layout:
Let me build to verify everything works:
Now let me enhance the KPI cards with mini sparklines:
Let me do a final build:
Let me add the Inter font for professional typography:
The build is successful. Let me give you a summary of what was built:
FinPulse - Financial Analytics Dashboard
📊 Features Built
KPI Summary Cards (4 cards):
- Total Revenue, Net Profit, Active Users, Operating Expenses
- Each card has sparkline trend indicators, % change badges (green/red), and hover animations
- Accent gradient lines on hover
Interactive Charts (5 chart areas):
- Revenue vs Expenses - Dual area chart with gradient fills, 6M/12M time range toggle, and custom tooltips
- Fund Allocation - Donut chart with center label, color-coded legend, and hover tooltips
- Monthly Profit - Gradient bar chart with rounded corners
- User Growth - Green area chart tracking active user base
- Quick Stats - Mini stat cards (Avg Transaction, Conversion Rate, Churn Rate, LTV/CAC Ratio)
Sortable & Filterable Data Table:
- 120 realistic transactions with ID, date, description, category, segment, and amount
- Click-to-sort on any column (ascending/descending)
- Full-text search across description, ID, and category
- Category and income/expense type filters
- Clear filters button
- Pagination with smart page number display
Live Filters:
- Date range picker (7d, 30d, 90d, 6m, 12m)
- Segment dropdown (All, Enterprise, Mid-Market, SMB, Startup)
- All views update reactively when filters change
Design & UX:
- 🌗 Dark mode toggle with smooth transitions and system preference detection
- 📱 Fully responsive - mobile to ultra-wide layouts
- ✨ Smooth transitions on hover states, theme changes, and chart animations
- 🎨 Clean hierarchy with slate/indigo color palette
- 🔤 Inter font for professional typography
📁 File Structure
src/data/sampleData.ts - Realistic data generation
src/contexts/ThemeContext.tsx - Dark mode state management
src/components/KPICards.tsx - Summary cards with sparklines
src/components/Charts.tsx - All chart components (Recharts)
src/components/DataTable.tsx - Sortable/filterable table
src/components/Filters.tsx - Date range & segment filters
src/components/Header.tsx - Sticky header with dark mode toggle
src/App.tsx - Main dashboard layout
Files built: src/data/sampleData.ts, src/contexts/ThemeContext.tsx, src/components/KPICards.tsx, src/components/Charts.tsx, src/components/DataTable.tsx, src/components/Header.tsx, src/components/Filters.tsx, src/App.tsx, index.html, src/index.css