This project is an API service for recommending relevant job postings to users based on their profiles, including skills, experience, and preferences. The backend is developed using Node.js and Express, and it interacts with a MongoDB to store job postings.
- POST /api/recommendations: Takes user profile data and returns a list of job recommendations.
- Database Support: MongoDB is used to store job postings.
- Matching Algorithm: Matches jobs based on skill sets, experience levels, preferred job locations, and job types.
- Error Handling: Ensures the API is robust and handles various invalid inputs gracefully.
- Dummy Profile as query: Users can send their profiles as body using Postman or simple, see the results using a dummy profile
https://job-recommendation-api-production.up.railway.app/api/recommendations
Access using postman:
- Clone the repository:
git clone https://github.com/your-repo/job-recommendation-api.git
- Navigate to the project directory:
cd job-recommendation-api
- Install dependencies:
npm install
- Start the server:
npm start
- Use Postman to send post request (along with user profile in the request body) over these links
http://localhost:3000/api/recommendations
http://localhost:3000/api/recommendations?relocate=true
http://localhost:3000/api/recommendations?dummyuser=true
The algorithm is based on a simple weighted scoring where each job is given a score based on the user's profile.
- Scoring Jobs Jobs are assigned scores based on skill overlap, experience match, and location match. A weighted formula is used to compute the score for each job:
Job Score = (0.5 * Skills Match) + (0.3 * Experience Match) + (0.2 * Job Role Match) + (0.2 * Job Type Match) + (0.3 * Location Match)
-
Relocation Preference Relocation preference of the user can be sent through the
?relocate
query. When selectedtrue
, the algorithm sends jobs beyond user's location preferences. -
Mandator Skills Match User must have at least one matching skill to get the job recommendation.
- Skills are Key: The most critical factor in job recommendations is the skill match. Users will only see jobs with at least one skill match.
- Flexibility: The scores conclude a holistic match based on variable weightage that provides the user to explore job beyond preferences.
- Location: Exact matches on location are enforced during the filtering phase based on the user's willingness to relocate. The property is selected
false
by default - Sorting: The jobs are sorted based on their matching score with the top matches on the top. Jobs with zero score are filtered out.
- The assignment was very simple and I kept on writing the code without getting stuck at any specific issue. However, the algorithm took a bit of time to decide the ideal weightage for each property.
- The error handling and debugging also took lots of thoughts and testing.