-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
apiAPI endpoints & integrationAPI endpoints & integrationbackendIssues related to backendIssues related to backendhacktoberfestSpecial issue for HacktoberfestSpecial issue for Hacktoberfesthacktoberfest-2025Special issue for Hacktoberfest 2025Special issue for Hacktoberfest 2025mongodbMongoDB & database managementMongoDB & database managementmongooseMongoDB ODM / schema & model work (queries, models, migrations)MongoDB ODM / schema & model work (queries, models, migrations)node.jsBackend JavaScript / runtime (Express, APIs, server work)Backend JavaScript / runtime (Express, APIs, server work)priority: highNeeds attention ASAPNeeds attention ASAP
Milestone
Description
Priority: High
Difficulty: Intermediate
Type: Backend (Node.js + Express + MongoDB)
Description:
We need to implement a new backend API endpoint to serve "Highly Recommended Products" for each product page.
When a user opens a product (e.g., "CoreX Whey Protein"), the frontend should fetch and display products that are contextually related to it — based on shared attributes like category, goals, or collections.
Requirements:
- Add new route:
GET /api/products/:id/recommended
- Find the product by ID
- Return up to 6 related products that share:
- Same
category
, or - At least one matching
goal
, or - At least one matching
collection
- Same
- Exclude the original product from the results
- Sort randomly or by rating
- Return an empty array if no matches found
Acceptance Criteria:
- Endpoint works with existing MongoDB schema
- Proper error handling for invalid IDs
- Returns up to 6 valid product objects
- Follows existing backend structure and coding style
- Tested via Postman or frontend call
Metadata
Metadata
Assignees
Labels
apiAPI endpoints & integrationAPI endpoints & integrationbackendIssues related to backendIssues related to backendhacktoberfestSpecial issue for HacktoberfestSpecial issue for Hacktoberfesthacktoberfest-2025Special issue for Hacktoberfest 2025Special issue for Hacktoberfest 2025mongodbMongoDB & database managementMongoDB & database managementmongooseMongoDB ODM / schema & model work (queries, models, migrations)MongoDB ODM / schema & model work (queries, models, migrations)node.jsBackend JavaScript / runtime (Express, APIs, server work)Backend JavaScript / runtime (Express, APIs, server work)priority: highNeeds attention ASAPNeeds attention ASAP
Type
Projects
Status
In Progress