'making a simple reccommendation system in JavaScript

So I have 3 collections in a MongoDB, Users

_id                          username
6276d5426d879bfbec9f3b87     test1
6276f2ae533ed9e94b2fbb70     test2
627720a1af0a62d00042958b     test3

...and so on

posts

_id                          content             likes
6281bec6272bb7b89b2e9ce8     dsaadsadsadsasdsad  [userid1, 2, 3, so on]
6282ec5c4c15cbcc7aba721f     sadasdasdasdasd     [userid1, 2, 3, so on]
6282ec5e4c15cbcc7aba7221     asdsadasdasdasd     [userid1, 2, 3, so on]

...and so on

and replies, but its structure is identical to the posts so I wont bother putting it here since its redundant. So I want to have posts recommended to a user using the users likes. I know it should be relating users to other users but I have looked for ways to do this but I don't quite understand them that much.

How hard would this to store in this same DB, and would JavaScript be a good user for this (its the simplest for me since my API is running JavaScript) or would I have to use python for this since its the best for data science and AI.

Regards, Julian.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source