Skip to content

Added dynamic Match Score 4.0-10.0 scaling and UI badge#813

Open
Soumya1Kesharwani wants to merge 4 commits into
komalharshita:mainfrom
Soumya1Kesharwani:main
Open

Added dynamic Match Score 4.0-10.0 scaling and UI badge#813
Soumya1Kesharwani wants to merge 4 commits into
komalharshita:mainfrom
Soumya1Kesharwani:main

Conversation

@Soumya1Kesharwani

Copy link
Copy Markdown

Good Evening Ma'am

I have introduced a new "Match Score" feature that provides users with a clear, visual indicator of how well project matches their skills, level, and interests.

Key changes-

  1. Backend Scoring Logic (utils/recommender.py)
    • Added logic to calculate the maximum possible score for a perfect match based on the user's specific inputs.
    • Introduced a mathematical normalization that scales the raw AI similarity score to a clean 4.0 to 10.0 range.
    • Preserved cluster logic: projects matched via a cluster receive an appropriate coverage penalty before scaling.

2.Frontend UI Badge (static/script.js & static/style.css)

  • Dynamically injects a beautiful Match Score: X.X / 10 badge below the project title on the project cards.
  • The badge includes an animated, color-filled progress bar corresponding to the score.
  • Fully styled for both Light Mode and Dark Mode.
  1. API & Tests Fix (routes/main_routes.py & tests/test_basic.py)
    • Fixed an API return structure bug so the /api/recommend route safely returns an array of projects for the frontend to iterate over.
    • All 72 backend unit tests pass successfully.

Testing

  • Tested locally on a Flask development server.
  • Verified that all edge cases (like zero matches or missing max scores) safely fall back to a minimum score of 4.0 without crashing.

Ma'am I have not modified any other parts of code .I have only added this feature on the score.Kindly review the changes and merge them with the acutal code base.

Thank You

Soumya Kesharwani added 3 commits June 8, 2026 16:47
- utils/recommender.py: normalize raw score to 0-10 scale and attach
  as match_score field on each returned project dict
- static/script.js: render match score badge (label + number + bar)
  inside buildProjectCard() between title and description
- static/style.css: add styles for .project-match-score, .score-label,
  .score-value, .score-bar, .score-bar-fill

Resolves issue: show score/10 on recommended projects for clarity


# Conflicts:
#	static/style.css
#	utils/recommender.py
@vercel

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting your first pull request to DevPath.

Before review:

  • Complete the PR template fully
  • Ensure all tests pass
  • Link your PR to an issue
  • Keep changes scoped to the issue

A maintainer will review your contribution soon.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant