I'll create a comprehensive gaming analytics dashboard. Let me start by exploring the project structure and then build it out.
Now let me install the charting library and other dependencies needed:
Now let me build the dashboard. I'll create the data generation utilities, components, and main app file.
Now let me create the theme context for dark mode:
Now let's create the KPI cards component:
Now let me create the chart components:
Now create the bar chart component:
Now the donut chart:
Now the performance chart (K/D & Win Rate):
Now the data table component:
Now let me create the filter bar component:
Now the header with dark mode toggle:
Now let me create the XP chart:
Now let me create the main App component that ties everything together:
Now let me update the index.html title and the CSS:
Now let me update the CSS with custom styles and dark mode support:
Let me build the project to check for any errors:
The project builds successfully. Let me verify the output looks complete by checking the structure:
The project is complete and builds successfully. Here's what I built:
GamePulse - Gaming Analytics Dashboard
Features:
-
Header — Brand logo with "GamePulse" title, animated live indicator, and a smooth dark/light mode toggle with sun/moon icons.
-
Filter Bar — Date range presets (7D/14D/30D/60D/90D), custom date pickers, genre dropdown (FPS, RPG, MOBA, Battle Royale, Strategy, Sports), and platform dropdown (PC, PlayStation, Xbox, Nintendo, Mobile). All filters update every view live.
-
6 KPI Summary Cards — Total Games Played, Hours Played, Win Rate, K/D Ratio, Total XP Earned, and Avg Games/Day. Each shows the current value plus a trend indicator with percentage change vs. the previous equivalent period. Cards have hover scale animations and colored accent icons.
-
Charts (4 types):
- Area Chart — Games & Hours trend over time with gradient fills and smooth curves
- Stacked Bar Chart — Weekly Wins vs Losses breakdown
- Two Donut Charts — Genre distribution and Platform split with labeled legends
- Bar Chart — Weekly Win Rate percentage
- Area Chart — Cumulative XP Progression
- All charts have custom styled tooltips with hover effects and smooth animations
-
Sortable & Filterable Data Table — 300 game sessions with columns for Date, Game, Genre, Platform, Duration, Result (with colored badges), K/D/A, and Score. Features search filtering, result type filter, column sorting (click headers), pagination, and responsive column hiding on smaller screens.
-
Realistic Sample Data — Seeded random generator creates 90 days of daily stats and 300 game sessions across real game titles (Valorant, Elden Ring, League of Legends, etc.), with weekend activity spikes and a growth trend built in.
-
Dark Mode — Full dark/light theme toggle with smooth transitions, custom color palette, and properly themed scrollbars and date pickers.
-
Fully Responsive — Grid layouts adapt from 1 to 6 columns for KPIs, charts stack on mobile, table columns hide progressively on smaller screens.
Files built: src/data/gameData.ts, src/context/ThemeContext.tsx, src/components/KPICards.tsx, src/components/GamesLineChart.tsx, src/components/WinLossBarChart.tsx, src/components/DonutChart.tsx, src/components/PerformanceChart.tsx, src/components/DataTable.tsx, src/components/FilterBar.tsx, src/components/Header.tsx, src/components/XPChart.tsx, src/App.tsx, index.html, src/index.css