I'll create a comprehensive personal finance analytics dashboard with all the features you requested. Let me start by exploring the project structure.
Now let me install the necessary packages for charts, icons, and dates.
Now let me build the dashboard. I'll create a complete structure with multiple files for clean organization.
Now let me create the sample data generator, types, and helper utilities.
Let me fix the type issues by removing the 'Все' filter from the Segment type.
Now let me create the analytics aggregation utilities, the UI components, and the dashboard.
Let me fix the unused variable warning.
Now let me create the React components: KPI cards, charts, table, filters, and the main App.
Now let me create the chart components.
Now let me create the transactions table component.
Now let me create the filters component.
Now let me create the main App component that ties everything together.
Let me remove the unused import.
Now let me also update the main.tsx file to import the CSS, and run the build.
Good, that's already set up. Let me now run the build.
The project builds successfully. Let me verify the final result by reading the App once more for any final polish, and also check that everything is coherent.
The dashboard is complete and builds successfully. Here's a summary of what I built for you:
📊 Личные финансы — Интерактивный дашборд
Структура проекта (11 файлов):
src/App.tsx — главный компонент, связывающий всё вместе
src/components/FiltersBar.tsx — шапка с фильтрами, поиском и переключателем темы
src/components/KpiCard.tsx — карточки KPI со встроенными мини-спарклайнами
src/components/TrendChart.tsx — 5 типов графиков (Area, Bar, Donut, Radial, Daily)
src/components/TransactionsTable.tsx — сортируемая таблица с пагинацией
src/utils/sampleData.ts — генератор реалистичных данных (≈ 365 дней, ~1100 операций, 11 категорий, 4 счёта)
src/utils/analytics.ts — агрегации, метрики, сравнение периодов
src/utils/seededRandom.ts — стабильный seedable PRNG
Что реализовано:
- KPI-карточки с трендами — общий доход / расход / чистый поток / норма сбережений, процентное изменение к прошлому периоду, цветные спарклайны, стрелки тренда.
- 5 визуализаций:
- Area-чарт доходов/расходов по месяцам с градиентами
- Donut структуры расходов с центральной суммой и легендой топ-6
- Bar-чарт чистого денежного потока (зелёный/красный по знаку)
- Radial-bar нормы сбережений с целью 40%
- Stacked-bars по счетам с прогресс-барами доход/расход
- Фильтры обновляют всё live — переключатели периода (7д/30д/90д/YTD/12м/Все), мульти-выбор категорий и счетов, поиск с дебаунсом через
useMemo.
- Таблица операций — сортировка по любой колонке, поиск, цветные бейджи статусов/категорий, пагинация.
- Тёмная тема — переключатель в шапке, сохраняется в localStorage, учитывает системные предпочтения.
- Реалистичные данные — 11 категорий с весами (продукты, жильё, транспорт…), русские мерчанты (Пятёрочка, Яндекс Go, Теремок…), месячная зарплата, фриланс-доходы, статус-операции.
- Полная адаптивность — от 1 колонки на мобильных до 4 на XL.
- Плавные анимации — fade-up на появлении,
animationDuration у Recharts, hover-эффекты на карточках, кастомные тултипы.
Files built: index.html, src/index.css, src/utils/cn.ts, src/utils/seededRandom.ts, src/utils/sampleData.ts, src/utils/analytics.ts, src/components/KpiCard.tsx, src/components/TrendChart.tsx, src/components/TransactionsTable.tsx, src/components/FiltersBar.tsx, src/App.tsx