feat: add project recommendation service for freelancers - #200
Open
Muhd010 wants to merge 1 commit into
Open
Conversation
Implements a weighted scoring algorithm that recommends open projects to freelancers based on skills, budget preferences, category affinity, and recency. Includes paginated REST endpoint, in-memory caching, fallback to recent projects, and comprehensive test coverage. Closes Lumina-eX#185 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
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.
Overview
This PR adds a Project Recommendation Service (issue #185) that recommends relevant open projects to freelancers based on their profile. The recommendation engine uses a weighted scoring algorithm combining skills, budget preferences, category affinity, and recency to surface the most relevant projects.
Related Issue
Closes #185
Changes
📈 Recommendation Engine
[ADD] lib/projectRecommendations.ts[ADD] app/api/projects/recommendations/route.tsGET /api/projects/recommendations— authenticated REST endpoint.withAuthmiddleware (only freelancers can request).user.idfrom wallet address, returns paginated recommendations.[ADD] scripts/012-project-recommendation-columns.sqlskills TEXT[]andcategory VARCHAR(100)columns toprojectstable.skillsfor array overlap queries.(category, budget_usdc)for open projects.[ADD] __tests__/api/project-recommendations.test.tsVerification Results
TypeScript typecheck:
✅ No type errors in new files (
tsc --noEmit)Build:
✅
pnpm buildsucceeds;/api/projects/recommendationsroute appears in outputUnit/Integration tests:
✅
npx vitest run __tests__/api/project-recommendations.test.ts— 40/40 passedAcceptance Criteria