Now I'll build a comprehensive school analytics dashboard. Let me start by installing the necessary packages and then create all the components.
Now let me create all the files. I'll start with the data layer and work up.
Now the dashboard context for state management:
Now let me create all the components. I'll create the KPI cards, charts, data table, filters, and the main dashboard:
Now update the entry point and HTML title:
Now let me build the project to verify everything compiles:
Build succeeded. Let me fix a non-standard Tailwind class and add smooth transitions:
Let me also add smooth transition styles and a few polish touches:
Build successful! Let me do a final review of all components to make sure everything is polished:
All files are in place. Here's a summary of the complete dashboard:
Oakridge Academy — Admin Analytics Dashboard
The dashboard is fully built and compiles cleanly. Here's what was created:
Architecture
src/data/sampleData.ts — 60 realistic students across grades 6–12, 12 months of metric history, and computed KPIs with deterministic seeded randomness
src/context/DashboardContext.tsx — Central state for dark mode, date range (3M/6M/12M/ALL), segment filters, and all derived data
src/components/ — 8 focused components
Features
| Feature | Implementation |
|---|
| KPI Cards | 4 cards (Enrollment, Attendance, GPA, Graduation Readiness) with trend arrows, color badges, and decorative blobs |
| Line Chart | Dual-axis Attendance % + GPA trend over time with smooth animations |
| Bar Chart | Grade-level GPA and Attendance grouped bars with gradient fills |
| Donut Charts | Enrollment breakdowns by Program and Demographic with inner-radius donuts |
| Data Table | Sortable columns, live search filter, color-coded attendance/GPA, status badges, row animations |
| Filters | Pill-style date range selector + 15 segment filters (grades, programs, demographics) with clear button |
| Dark Mode | Toggle in header with smooth 200ms transitions on all elements |
| Responsive | Grid layouts adapt from 1→2→4 columns, table scrolls horizontally, filters wrap on mobile |
Charts all include hover tooltips with custom styling, 800ms animation durations, and responsive containers via Recharts.
Files built: src/data/sampleData.ts, src/context/DashboardContext.tsx, src/components/KPICards.tsx, src/components/AttendanceChart.tsx, src/components/PerformanceChart.tsx, src/components/EnrollmentDonuts.tsx, src/components/DataTable.tsx, src/components/Filters.tsx, src/components/Header.tsx, src/components/Dashboard.tsx, src/App.tsx, index.html, src/index.css