Skip to content

feat: implement user engagement study streaks and dynamic activity heatmap#3913

Open
Neelr1912 wants to merge 11 commits into
Premshaw23:masterfrom
Neelr1912:feat/study-streak-heatmap
Open

feat: implement user engagement study streaks and dynamic activity heatmap#3913
Neelr1912 wants to merge 11 commits into
Premshaw23:masterfrom
Neelr1912:feat/study-streak-heatmap

Conversation

@Neelr1912

Copy link
Copy Markdown
Contributor

Is your feature request related to a problem? Please describe.

Sustaining student motivation is one of the biggest challenges in e-learning platforms. Currently, users don't have a visual representation of their consistency or daily learning habits. (Resolves #3795)

Describe the solution you'd like

I have integrated user study streak tracking and a dynamic GitHub-style activity heatmap:

  1. Activity Log Upgrades: Updated the backend activities schema to accept "login" and "video" activity types, and increased query bounds to support fetching up to 1000 records for yearly calendar views.
  2. Auto-Logged Logins: Automatically appends today's date to a new activeDays array in Firestore and records a login activity on the student's first daily visit.
  3. Module Completions & Video Watching: Logs completed lessons/modules and lecture videos watched (triggered when a user plays a video for at least 10 cumulative unique seconds), updating the profile's active days.
  4. Daily Streak stats card: Displayed a dedicated, flame-themed card showcasing the current daily streak on the profile dashboard.
  5. Interactive Timeframe Selector: Enabled dynamically filtering the activity heatmap between a Month, 3 Months, and Year view, with dynamic container widths for clean responsiveness.

Describe alternatives you've considered

A simpler alternative is just a "Total Hours Studied" counter, but a daily streak/heatmap specifically encourages daily platform engagement.

Additional Context

Utilized react-calendar-heatmap styled with Tailwind's utility classes to achieve premium visual quality, interactive hover tooltips, and dynamic intensity colors.

@Neelr1912

Copy link
Copy Markdown
Contributor Author

Hi @Premshaw23 now you can merge and close

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.

Feature: User Engagement - Study Streaks & Activity Heatmap

1 participant