Skip to content

feat: add student history API endpoint#77

Open
Yashaswini-K-P wants to merge 2 commits into
codepvg:mainfrom
Yashaswini-K-P:feature/student-history-api
Open

feat: add student history API endpoint#77
Yashaswini-K-P wants to merge 2 commits into
codepvg:mainfrom
Yashaswini-K-P:feature/student-history-api

Conversation

@Yashaswini-K-P
Copy link
Copy Markdown
Contributor

Description

This PR introduces a new backend API endpoint to fetch historical LeetCode progress data for a specific student.

The endpoint reads daily snapshot files from the GitHub repository and constructs a time-series response showing a student's coding progress over time.

This enables frontend features like progress graphs and performance tracking.

Linked Issue

Fixes #7

Changes Made

Added new API endpoint:

GET /api/student/:username
Integrated GitHub API to fetch daily JSON snapshot files
Extracted user-specific data across multiple days
Constructed a structured time-series response format
Sorted historical data by date before returning response
Handled missing user data safely across files

Type of Change

  • Bug fix
  • New feature
  • UI/Visual update
  • Documentation update
  • Refactor

Testing

  • Tested locally
  • Tested on mobile viewport (if applicable)
  • No console errors introduced

Checklist

  • My code follows the project's coding style
  • I have formatted my code locally using Prettier
  • I have performed a self-review of my code
  • My changes generate no new warnings or errors
  • I have updated documentation if required
  • I have linked the relevant issue

Screenshots / Screen Recording

Screenshot 2026-06-01 121447

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add API endpoint for student historical data

1 participant