I have successfully built a complete, interactive analytics dashboard for videogame stat tracking. All requirements have been met, and the project is fully functional, styled, and builds properly without errors.
Here's a breakdown of the implementation:
-
Realistic Mock Data (src/data/mockData.ts)
- Implemented a scalable mock data generator that creates a realistic timeline of 200 matches.
- Generates varying results based on map, mode (Ranked, Casual, Battle Royale, etc.), and randomly distributes kills/deaths/assists to mimic real player performance.
-
Core App State & Filters (src/components/Dashboard.tsx)
- Acts as the central state hub holding the
DateRange and GameMode filters.
- Whenever filters are toggled, the main
useMemo hooks parse the data and dynamically recalculate stats across the entire page seamlessly, keeping every UI element in sync.
- Includes a fully functioning Dark Mode toggle (supporting Tailwind CSS v4's custom variant methodology).
-
KPI Summary Cards (src/components/KPICard.tsx)
- Created beautiful, reusable layout cards measuring core stats such as K/D Ratio, Win Rate, Matches Played, and Time Played.
- Includes color-coded trend indicators to provide context at a glance.
-
Interactive Data Visualization (src/components/Charts.tsx)
- Used
recharts to build responsive, animated visualizations.
- Performance Chart: A smoothed
AreaChart with beautiful gradients tracking K/D Ratio and Win Rate over time.
- Mode Distribution: A stacked
BarChart illustrating Wins, Losses, and Draws broken down by the specific Game Mode.
- Win Rate: An inner-padded
PieChart functioning as a Donut graph displaying total win distribution percentage in the center.
- Includes fully custom, styled hover tooltips supporting both light and dark themes.
-
Sortable Match History (src/components/MatchTable.tsx)
- Implemented an elegant data table allowing gamers to review specific match records.
- Features click-to-sort column headers across numerical calculations (K/D ratios, exact match timestamps, accuracies, etc.).
- Utilizes custom visual badges and icons based on win/loss conditions to make information extremely scannable.
The dashboard layout is designed beautifully utilizing Tailwind CSS, making it strictly responsive from mobile up to widescreen desktop platforms. I have tested the build and everything compiles flawlessly!
Files built: src/lib/utils.ts, src/data/mockData.ts, src/components/KPICard.tsx, src/components/Charts.tsx, src/components/MatchTable.tsx, src/components/Dashboard.tsx, src/App.tsx, index.html, src/index.css