I'll create an interactive personal finance analytics dashboard for students. Let me start by exploring the project structure.
I'll build the entire dashboard using custom SVG-based charts (no external chart libs needed), Tailwind v4, with dark mode via a class toggle. Let me set up dark mode support in CSS and then build the app.
Now let me create the sample data generator, chart components, and the main App.
Let me fix that lint error in BarChart.
Now let me build the KPI card, filters, data table, and the main App.
Now the main App with filters and layout.
Build succeeded. Here's a summary of what I built:
PocketLedger — an interactive personal finance analytics dashboard for students, built with React, TypeScript, and Tailwind CSS v4.
Features implemented
KPI summary cards (4 cards with trend indicators):
- Total Income, Total Spent, Net Savings, Avg/Day
- Each shows % delta vs. previous equivalent period, colored based on intent (positive/negative), and a mini sparkline area chart
Charts (all custom-built SVG, no chart lib):
- Line chart — Income vs. Spending over time with animated draw-in, area gradients, hover crosshair + shared tooltip
- Donut chart — Spending by segment, with animated arc reveal, hover-to-highlight (dims other slices, thickens the hovered one), center swap to slice value
- Bar charts — Vertical (weekday spending, weekends highlighted) and horizontal (top categories, income sources) with grow-in animation and hover tooltips
- Budget progress bar — Animated fill, color shifts by usage %
Filters — every view updates live:
- Date-range presets (7d / 30d / 90d / 6m / All)
- Segment chips (Essentials, Academic, Lifestyle, Income) — toggleable, colored
Sortable + filterable data table:
- Sort by any column (click headers, toggles direction)
- Free-text search across merchant/category/segment/method
- Type filter pill (all/income/expense)
- Category chips with color coding, pagination
Dark mode toggle — persisted to localStorage, respects system preference on first load; all charts re-theme accordingly.
Realistic seeded sample data — 180 days of transactions generated from category-aware rules (rent hits monthly, tuition hits at semester start, weekend dining boost, monthly subscriptions, scholarship + part-time income, etc.) with a seeded PRNG so charts always feel populated and consistent.
Responsive layout — 1/2/4-col KPI grid, stacking charts, sticky header, horizontal-scroll table on mobile, custom scrollbars.
Files built: index.html, src/index.css, src/data.ts, src/components/Tooltip.tsx, src/components/LineChart.tsx, src/components/BarChart.tsx, src/components/DonutChart.tsx, src/components/KpiCard.tsx, src/components/DataTable.tsx, src/App.tsx