Skip to content

feat: Add Study Streak Tracker and Achievement Badges (Fixes #520)#535

Open
anushkagupta200615-jpg wants to merge 1 commit into
lovelymahor:mainfrom
anushkagupta200615-jpg:feature/study-streak-badges
Open

feat: Add Study Streak Tracker and Achievement Badges (Fixes #520)#535
anushkagupta200615-jpg wants to merge 1 commit into
lovelymahor:mainfrom
anushkagupta200615-jpg:feature/study-streak-badges

Conversation

@anushkagupta200615-jpg

Copy link
Copy Markdown

Resolves #520

This pull request introduces a gamified Study Streak Tracker and Achievement Badges system to improve user engagement and study consistency over time.

Changes Included:

  • Backend (server/models/User.js & server/routes/auth.js):
    • Updated the User schema to track currentStreak, longestStreak, lastStudyDate, and earned badges.
    • Added a new /study-streak API endpoint that safely increments the streak logic based on 24-hour intervals and awards milestone badges (3-Day, 7-Day, 30-Day).
    • Fixed pre-existing syntax errors and duplicate module imports in server/index.js that were crashing the server.
  • Frontend (client/src/pages/Profile.js & Profile.css):
    • Overhauled the Profile dashboard to prominently display a "Streak & Achievements" card.
    • Implemented dynamic fire icons that track the current and longest streaks.
    • Added a "Log Study Session" action button that communicates with the backend.
    • Built a responsive badge grid to display earned achievements.
    • Fixed an unclosed CSS block in Navbar.css and removed lingering git merge conflict markers that were failing compilation.

Testing Instructions:

  • Ensure MongoDB is running locally.
  • Navigate to the Profile page and click "Log Study Session".
  • Verify the streak increments properly and restricts multiple clicks on the same day.

@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

@anushkagupta200615-jpg is attempting to deploy a commit to the Lovely Mahour's projects Team on Vercel.

A member of the Team first needs to authorize it.

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 Study Streak Tracker and Achievement Badges

1 participant