Adithya Enhanced popularity timeline Backend#1885
Merged
one-community merged 7 commits intodevelopmentfrom Dec 23, 2025
Merged
Conversation
|
Tested the related frontend PR - 4416. The PR changes works as expected. |
sanjeev29
approved these changes
Nov 28, 2025
Anusha-Gali
approved these changes
Dec 4, 2025
bhanuanishakkineni
approved these changes
Dec 6, 2025
Contributor
There was a problem hiding this comment.
Hello Adithya,
I have reviewed and tested both frontend and backend of this PR. Please find the frontend comments at #4416.
I tested the API endpoints using postman.
- http://localhost:4500/api/popularity-enhanced/roles-enhanced
This endpoint returned all roles aggregate and also comprehensive data for each individual role.
2. http://localhost:4500/api/popularity-enhanced/timeline?roles=
This API endpoint returned monthly data for each role provided as params separated by roles.
3. http://localhost:4500/api/popularity-enhanced/role-pairs?roles=
The endpoint returned monthly data for each role separated by months. I have also tested this endpoint with more than two roles and it worked.
All the three endpoints worked as expected.
Contributor
|
Hi Adithya, Reviewed this PR. Everything looks good. Provided detail review in Front end PR. |
Member
|
Thank you all, merging! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Description
[Backend PR: Follow-Up to PR #1704]
This PR implements the enhanced backend to support complex, role-based visualization on the frontend, specifically addressing the need for connected Hits/Applications pairs and optimized filtering.
The original
/popularityendpoint logic has been replaced by the new/popularity-enhancedendpoints designed for flexibility, performance, and multi-role analysis.Key Backend Enhancements
/popularity-enhanced/role-pairsendpoint to return data grouped by Month, with nested Hits/Applications metrics per role./timeline): The main/timelineendpoint is now purely role-focused. It consistently groups and returns all requested data by Role and Month, enabling us to plot multiple distinct timeline lines correctly./roles-enhancedendpoint now returns the aggregate summary for "All Roles," ensuring the multi-select filter works across the entire datasetRelated PRS (if any)
This backend PR is a follow-up enhancement to the original Popularity Timeline backend implementation, PR #1704.
Main changes explained
Backend (src/routes/popularityEnhancedRoutes.js):
/popularitylogic into the new/popularity-enhancedroute.GET /popularity-enhanced/role-pairsto provide month-centric, paired data for visualization interactivity.GET /popularity-enhanced/timelineto always return role-grouped data with detailed monthly summaries.GET /popularity-enhanced/roles-enhancedto provide comprehensive role summaries, including an "All Roles" object, to populate the multi-select filter.How to test
1. Checkout the current branch (
adithya_impl_enhanced_role_analytics_backend).2. Run the backend server (
npm start).3. Use Postman:
GET http://localhost:4500/api/popularity-enhanced/roles-enhanced(Check that the "All Roles" entry is present at the top.)GET http://localhost:4500/api/popularity-enhanced/timeline?roles=Frontend,Backend(Confirm you receive two separate role objects, each containing its 6 monthly data points.)GET http://localhost:4500/api/popularity-enhanced/role-pairs?roles=Frontend,Backend(Verify the top-level array is grouped by month, and each month object contains the paired data for the two selected roles, identified by thepairIdfield.)Screenshots or videos of changes