I'll build a comprehensive personal finance analytics dashboard with all the requested features. Let me start by exploring the project and planning the implementation.
Now let me install the necessary dependencies for charts and icons:
Let me check the existing files:
Now let me build the entire dashboard. I'll create all the files in parallel where possible. Let me start with the data layer and core components:
Now let me create all the components in parallel:
Let me fix the unused imports and create the remaining components:
Now let me create the profit comparison chart and the main App component:
Now let me create the main App.tsx that ties everything together:
Let me fix the unused imports:
Now let me update the index.html title and add dark mode styles:
Now let me build the project to check for any errors:
The build succeeds. Let me verify the final project structure:
The build is successful. Here's a summary of what was created:
FinanceFlow — Business Analytics Dashboard
Architecture
- 13 files organized across components, data, and utilities
- React + Vite + Tailwind CSS with recharts for charts and lucide-react for icons
Features Implemented
KPI Summary Cards (4 cards)
- Total Revenue, Total Expenses, Net Profit, Total Invoices
- Trend badges with up/down arrows and percentage change (vs previous month)
- Hover effects with gradient accent bars and scale animations
- Color-coded icons (indigo/rose/emerald/amber)
Charts (5 visualizations)
- Area/Line Chart — Revenue & Profit trend with gradient fills and animated dots
- Bar Chart — Monthly expenses with gradient bar fills
- Donut Chart (x2) — Expense breakdown by category + Revenue by segment, with inline progress bars and percentage labels
- Grouped Bar Chart — Revenue vs Expenses vs Profit side-by-side comparison
- All charts have custom hover tooltips, smooth
ease-in-out animations, and dark mode support
Sortable & Filterable Data Table
- 6 sortable columns (Date, Description, Category, Segment, Type, Amount)
- Full-text search across all fields
- Income/Expense/All toggle filter
- Paginated with 10 rows per page
- Color-coded type badges and currency formatting
Filters (update all views live)
- Year selector (2024 / 2025)
- Month range dropdowns (start → end)
- Business segment filter (All / Enterprise / SMB / Startup / Freelance)
- Reset button to restore defaults
Dark Mode
- Toggle in the header with smooth slider animation
- Respects system preference on first load
- All components adapt with proper dark palette
Responsive
- Grid layouts collapse from 4→2→1 columns
- Table scrolls horizontally on mobile
- Filter controls stack vertically on small screens
Realistic Sample Data
- 350 seeded transactions across 2024–2025
- 15 business-relevant expense categories with realistic descriptions
- 4 business segments with varied distributions
- 24 months of revenue/expense/profit data
Files built: src/data/sampleData.ts, src/components/Header.tsx, src/components/Filters.tsx, src/components/KPICards.tsx, src/components/RevenueLineChart.tsx, src/components/ExpenseBarChart.tsx, src/components/DonutChart.tsx, src/components/DataTable.tsx, src/components/ProfitComparisonChart.tsx, src/App.tsx, index.html, src/index.css