Skip to content

Stats Dashboard File Creation #455

@adityapat24

Description

@adityapat24

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

  • 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 dashboard
  • src/app/api/v1/stats/route.tsGET aggregate stats; stub returns mock shape

Library

  • src/lib/stats/aggregations.ts — Mongo aggregation pipelines (counts by status, school, etc.)
  • src/lib/stats/service.tsgetStats() returning typed StatsPayload
  • src/lib/stats/types.tsStatsPayload, StatusBreakdown, DemographicsBreakdown, TimelinePoint types

Components

  • src/components/admin/stats/StatsDashboard.tsx — top-level layout, grid of stat cards + charts
  • src/components/admin/stats/StatCard.tsx — single metric tile (label, value, delta)
  • src/components/admin/stats/StatusBreakdownChart.tsx — pie/donut: applicants by status
  • src/components/admin/stats/DemographicsChart.tsx — bar chart: school / year / etc.
  • src/components/admin/stats/SubmissionTimeline.tsx — line chart: submissions over time

Acceptance criteria

  • All folders and files listed above exist and the project compiles.
  • /admin/stats renders the dashboard with mock data and placeholder charts.
  • GET /api/v1/stats returns a typed mock StatsPayload.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions