Skip to content

feat: add skill gap analyzer to show skills that unlock more projects (Issue #138)#645

Open
pragathip005 wants to merge 1 commit into
komalharshita:mainfrom
pragathip005:feat/skill-gap-analyzer-138
Open

feat: add skill gap analyzer to show skills that unlock more projects (Issue #138)#645
pragathip005 wants to merge 1 commit into
komalharshita:mainfrom
pragathip005:feat/skill-gap-analyzer-138

Conversation

@pragathip005
Copy link
Copy Markdown

Summary

This PR implements the Skill Gap Analyzer feature (Issue #138). After a user submits the recommendation form and results load, a "Want More Matches?" section appears below the project cards. It analyses the user's current skills against the full project dataset and shows up to 8 skills they could learn to unlock more matches.

Two types of suggestions are shown: project-based gaps (skills that directly unlock specific projects in the database, shown as expandable rows with clickable project links) and trending skills (curated by interest area for users who already have broad skills, shown as a combined chip card labeled "Trending in [Interest]"). Both update dynamically on every search based on the user's current skill set.

Related Issue

Closes #138

Type of Change

  • Feature - adds new functionality
  • Bug fix - resolves a broken behaviour

What Was Changed

File Change made
utils/recommender.py Added _get_skill_matched_projects(), _project_based_gaps(), get_skill_gap() with greedy deduplication; added TRENDING_SKILLS_BY_INTEREST curated fallback per interest area
routes/main_routes.py Added POST /api/skill-gap route; updated import
static/script.js Added fetchSkillGap() and renderSkillGap(); fixed missing }); closing form.addEventListener and duplicate if block in renderResults that left the function unclosed (caused JS syntax error blocking all interactivity); fixed #github-modal-overlay blocking chip clicks
templates/index.html Added #skill-gap-section HTML block; fixed #github-modal-overlay missing display:none
static/style.css Added styles for skill gap items, expandable dropdown, trending card, and chip tags

How to Test This PR

  1. pip install -r requirements.txt && python app.py
  2. Open http://127.0.0.1:5000
  3. Test project-based gaps: Enter html, select Beginner / Web / Low → Submit. Scroll to "Want More Matches?" — expandable rows appear. Click one to see specific project names as links.
  4. Test trending fallback: Enter many skills (Python, JavaScript, HTML, CSS, Flask), select Intermediate / Games / High → Submit. Scroll to "Want More Matches?" — a "Trending in Games" card appears with skill chips (Unity, C#, Godot, etc.) — only skills you don't already have.
  5. Test dynamic update: Change skills and re-submit — the skill gap section updates to reflect the new skill set.
  6. Test clear: Click Clear Filters — the skill gap section disappears.
  7. pytest tests/

Test Results

tests/test_basic.py::test_projects_json_loads PASSED
tests/test_basic.py::test_each_project_has_required_fields PASSED
tests/test_basic.py::test_find_project_by_id_found PASSED
tests/test_basic.py::test_find_project_by_id_missing PASSED
tests/test_basic.py::test_parse_skills_basic PASSED
tests/test_basic.py::test_parse_skills_empty_string PASSED
tests/test_basic.py::test_parse_skills_single_entry PASSED
tests/test_basic.py::test_score_single_project_full_match PASSED
tests/test_basic.py::test_score_single_project_no_match PASSED
tests/test_basic.py::test_score_single_project_alias_matching PASSED
tests/test_basic.py::test_get_recommendations_returns_results PASSED
tests/test_basic.py::test_get_recommendations_max_three PASSED
tests/test_basic.py::test_get_recommendations_no_match_returns_empty PASSED
tests/test_basic.py::test_get_recommendations_result_format PASSED
tests/test_basic.py::test_validate_all_valid PASSED
tests/test_basic.py::test_validate_missing_skills PASSED
tests/test_basic.py::test_validate_missing_level PASSED
tests/test_basic.py::test_validate_missing_interest PASSED
tests/test_basic.py::test_validate_missing_time PASSED
tests/test_basic.py::test_validate_all_missing PASSED
tests/test_basic.py::test_home_route PASSED
tests/test_basic.py::test_security_headers_present PASSED
tests/test_basic.py::test_recommend_api_valid PASSED
tests/test_basic.py::test_recommend_api_interest_not_available PASSED
tests/test_basic.py::test_recommend_api_missing_field PASSED
tests/test_basic.py::test_recommend_api_empty_body PASSED
tests/test_basic.py::test_project_detail_found PASSED
tests/test_basic.py::test_project_detail_not_found PASSED
tests/test_basic.py::test_internal_server_error_page PASSED
tests/test_basic.py::test_view_code_found PASSED
tests/test_basic.py::test_download_code_found PASSED
tests/test_basic.py::test_health_check PASSED
tests/test_basic.py::test_scoring_weights_has_all_keys PASSED
tests/test_basic.py::test_sitemap_returns_200 PASSED
tests/test_basic.py::test_sitemap_content_type PASSED
tests/test_basic.py::test_sitemap_contains_homepage PASSED
tests/test_basic.py::test_sitemap_contains_all_project_ids PASSED
tests/test_basic.py::test_robots_txt_returns_200 PASSED
tests/test_basic.py::test_robots_txt_references_sitemap PASSED
tests/test_basic.py::test_project_links_have_noopener PASSED

============================== 40 passed in 0.17s ==============================

Screenshots

Before After
Results section ends after project cards "Want More Matches?" section appears below with expandable skill rows and a Trending chip card
image image

Self-Review Checklist

  • I have read CONTRIBUTING.md and followed all guidelines
  • My branch name follows the convention: feat/skill-gap-analyzer-138
  • I have run pytest tests/ and all 40 tests pass
  • I have not introduced any print() or console.log() debug statements
  • Every new function I wrote has a docstring
  • I have not modified files outside the scope of the linked issue
  • If I changed the UI, I tested it at 375px (mobile) and 1280px (desktop)

Notes for Reviewer

The JS bug fixes in script.js (missing }); for form.addEventListener, unclosed renderResults due to a duplicate nested if block, and the #github-modal-overlay `d

…komalharshita#138)

- Add get_skill_gap() and _count_skill_matched_projects() to recommender.py
- Add POST /api/skill-gap route to main_routes.py
- Render 'Want More Matches?' section below recommendations
- Fix broken form-submit error handler (duplicate nested fetch in catch)
- Hide skill gap section when Clear Filters is clicked

Closes komalharshita#138
@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

@pragathip005 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.

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.

[Feature]: Skill gap analyzer - show which skills unlock more project matches

1 participant