Siri Vavila - feat(api): backend display user skill radar chart data#1861
Open
sirisudheeksha wants to merge 3 commits intodevelopmentfrom
Open
Siri Vavila - feat(api): backend display user skill radar chart data#1861sirisudheeksha wants to merge 3 commits intodevelopmentfrom
sirisudheeksha wants to merge 3 commits intodevelopmentfrom
Conversation
Anusha-Gali
approved these changes
Feb 13, 2026
|
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
This PR implements the backend support for the HGN Questionnaire “User Skill Radar Chart” by adding GET /api/userProfile/:userId/skills-radar, which reads the user’s skill data from the Skills Survey collection, normalizes scores to numbers (0–10), excludes the “overall/Overall” aggregate from the axes, and optionally filters by section via ?section=all|frontend|backend (default all). The controller uses a single optimized query with projection for better performance and returns a compact, chart‑ready payload { userId, section, maxScore: 10, skills: [{ name, score }] }.
Related PRS (if any):
N/A
…
Main changes explained:
…
How to test:
check into current branch
Install and run:
npm install
Option A (dev): npm run dev
Option B (dist): rm -rf dist && npm run build && npm start
Call the endpoint (replace <USER_ID> with a real id):
All skills:
curl -s "http://localhost:4500/api/userProfile/<USER_ID>/skills-radar"
Frontend only:
curl -s "http://localhost:4500/api/userProfile/<USER_ID>/skills-radar?section=frontend"
Backend only:
curl -s "http://localhost:4500/api/userProfile/<USER_ID>/skills-radar?section=backend"
Verify:
200 OK
Response shape:
{ "userId": "<USER_ID>", "section": "all|frontend|backend", "maxScore": ... }
"overall" not present in skills; scores are numeric.
Optional negative check:
Unknown userId → 404 "No skill data found for this user"
Screenshots or videos of changes: