Goal
Create the files for the new redesigned stats dashboard. No real logic yet, stubs only.
The shared (admin)/layout.tsx is created by Ticket 5. This ticket only adds the stats page inside it.
Folders to create
Files to create
Routes
Library
Components
Acceptance criteria
Goal
Create the files for the new redesigned stats dashboard. No real logic yet, stubs only.
The shared
(admin)/layout.tsxis created by Ticket 5. This ticket only adds the stats page inside it.Folders to create
src/app/(admin)/admin/stats/src/app/api/v1/stats/src/lib/stats/src/components/admin/stats/Files to create
Routes
src/app/(admin)/admin/stats/page.tsx— redesigned stats dashboardsrc/app/api/v1/stats/route.ts—GETaggregate stats; stub returns mock shapeLibrary
src/lib/stats/aggregations.ts— Mongo aggregation pipelines (counts by status, school, etc.)src/lib/stats/service.ts—getStats()returning typedStatsPayloadsrc/lib/stats/types.ts—StatsPayload,StatusBreakdown,DemographicsBreakdown,TimelinePointtypesComponents
src/components/admin/stats/StatsDashboard.tsx— top-level layout, grid of stat cards + chartssrc/components/admin/stats/StatCard.tsx— single metric tile (label, value, delta)src/components/admin/stats/StatusBreakdownChart.tsx— pie/donut: applicants by statussrc/components/admin/stats/DemographicsChart.tsx— bar chart: school / year / etc.src/components/admin/stats/SubmissionTimeline.tsx— line chart: submissions over timeAcceptance criteria
/admin/statsrenders the dashboard with mock data and placeholder charts.GET /api/v1/statsreturns a typed mockStatsPayload.