Skip to content

MentoNest/skillSync_g

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Discord Backers on Open Collective Sponsors on Open Collective Donate us Support us Follow us on Twitter

Description

Nest framework TypeScript starter repository.

Project setup

$ npm install

Compile and run the project

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Run tests

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Deployment

When you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the deployment documentation for more information.

If you are looking for a cloud-based platform to deploy your NestJS application, check out Mau, our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps:

$ npm install -g @nestjs/mau
$ mau deploy

With Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure.

Resources

Check out a few resources that may come in handy when working with NestJS:

  • Visit the NestJS Documentation to learn more about the framework.
  • For questions and support, please visit our Discord channel.
  • To dive deeper and get more hands-on experience, check out our official video courses.
  • Deploy your application to AWS with the help of NestJS Mau in just a few clicks.
  • Visualize your application graph and interact with the NestJS application in real-time using NestJS Devtools.
  • Need help with your project (part-time to full-time)? Check out our official enterprise support.
  • To stay in the loop and get updates, follow us on X and LinkedIn.
  • Looking for a job, or have a job to offer? Check out our official Jobs board.

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.


Mentor-Mentee Recommendation Algorithm Documentation

Overview

This system provides intelligent mentor recommendations for mentees by combining state-of-the-art collaborative filtering (CF) and content-based (semantic skill matching) approaches. The hybrid algorithm leverages both historical interaction data and semantic similarity of skills, ensuring accurate, relevant, and explainable matches.

Architecture

Components:

  • NestJS Backend: Orchestrates data flow, exposes API endpoints, and combines recommendation signals.
  • Python Microservice (FastAPI): Computes semantic similarity between mentee and mentor skills using sentence-transformers.
  • Collaborative Filtering Service (Python, e.g., LightFM): Provides mentor recommendations based on historical interaction data.

Data Flow:

  1. Mentee requests recommendations via the NestJS API.
  2. NestJS fetches mentee and mentor profiles from the database.
  3. NestJS batches all mentor skills and sends them, along with the mentee’s skills, to the Python microservice for semantic similarity scoring.
  4. NestJS queries the collaborative filtering service for top mentor recommendations based on past interactions.
  5. NestJS combines both signals (and optionally other features) into a hybrid score, ranks mentors, and returns the top N.

Algorithm Details

1. Content-Based (Semantic Skill Matching)

  • Input: Mentee’s skills, each mentor’s skills.
  • Process:
    • Both skill lists are embedded using a pre-trained sentence-transformer model.
    • The maximum cosine similarity between any mentee and mentor skill embedding is computed.
  • Output: A semantic similarity score (0–1) for each mentor.

2. Collaborative Filtering

  • Input: Mentee ID, historical mentor-mentee interaction data.
  • Process:
    • A collaborative filtering model (e.g., LightFM) is trained on past pairings, feedback, and ratings.
    • The model predicts the top N mentors for the given mentee.
  • Output: A list of mentor IDs, optionally with confidence scores.

3. Hybrid Scoring

  • Inputs: Semantic similarity scores, collaborative filtering results, and optional features (e.g., availability, reputation).
  • Process:
    • Each mentor receives a hybrid score, e.g.:
      hybridScore = 0.6 * semanticSkillScore + 0.3 * cfScore + 0.1 * (other features)
      
      • semanticSkillScore: From the Python microservice.
      • cfScore: 1 if mentor is in the CF top-N, else 0.
      • other features: e.g., availability, reputation, feedback.
    • Mentors are sorted by hybrid score.
  • Output: Top N mentors, ranked.

API Endpoints

1. NestJS Recommendation Endpoint

GET /user/recommend-mentors?menteeId=<mentee_id>&n=<N>

Parameters:

  • menteeId (string): The UUID of the mentee.
  • n (number, optional): Number of recommendations to return (default: 5).

Response:

{
  "recommendations": [
    {
      "id": "mentor-uuid-1",
      "name": "Jane Mentor",
      "skills": ["AI", "ML", "Python"],
      "semanticSkillScore": 0.92,
      "hybridScore": 0.85,
      "availability": "available",
      "reputationScore": 4.8
    },
    ...
  ]
}

2. Python Microservice Endpoints

a. Batch Semantic Similarity

POST /batch-similarity

Request Body:

{
  "mentee_skills": ["AI", "machine learning"],
  "mentors": [
    {"id": "mentor-uuid-1", "skills": ["AI", "ML", "Python"]},
    {"id": "mentor-uuid-2", "skills": ["Data Science", "Statistics"]}
  ]
}

Response:

{
  "similarities": [
    {"id": "mentor-uuid-1", "similarity": 0.92},
    {"id": "mentor-uuid-2", "similarity": 0.67}
  ]
}

b. Collaborative Filtering

GET /recommend?mentee_id=<mentee_id>&n=<N>

Response:

{
  "recommendations": ["mentor-uuid-1", "mentor-uuid-3", ...]
}

Extensibility

  • Add more features: Incorporate mentor availability, reputation, or feedback into the hybrid score.
  • Tune weights: Adjust the hybrid score formula to optimize for your platform’s goals.
  • A/B testing: Experiment with different algorithms and weights to maximize user satisfaction.
  • Caching: For large mentor pools, cache or precompute similarity scores for efficiency.

Deployment

  • Docker Compose is recommended for orchestrating the NestJS and Python services.
  • Environment variables should be used to configure service URLs and ports.
  • Scalability: Both services can be scaled independently.

Frontend Integration

  • Call the /user/recommend-mentors endpoint to fetch recommendations.
  • Display mentor cards with names, skills, and match explanations (e.g., “Top match due to shared skills in AI and ML”).
  • Optionally, allow mentees to provide feedback to further improve recommendations.

Example Hybrid Score Calculation

const hybridScore = 0.6 * semanticSkillScore + 0.3 * cfScore + 0.1 * (availabilityScore + reputationScore);
  • semanticSkillScore: [0, 1] from semantic similarity.
  • cfScore: 1 if mentor is in CF top-N, else 0.
  • availabilityScore: 0.1 if available, else 0.
  • reputationScore: (mentor.reputationScore / 5) * 0.1.

References

Contact

For questions or contributions, please contact the maintainers or open an issue in the repository.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 14