hatchways / team-cherry

1 stars 1 forks source link

Transfer new mentions from BE to FE #63

Closed powerseed closed 4 years ago

powerseed commented 4 years ago
  1. After BE scrapes and gains mentions, it filters them to figure out which are new. And in those new, BE check each connected user's info (keywords, platforms selected and companies) to figure out which of the new mentions are needed by that particualr user, then send them to the FB of that user.
  2. FE receives mentions sent from BE, displayed a snackbar at the bottom-right corner, which could be clicked on and then a popup window will show up containing the new mentions.

Note:

  1. I commented out the emailQueue
  2. Twitter scraper is not running as there is an up-limit of requests per month.
  3. For testing, the reddit sub-section to be scraped is set to be "hearthstone" instead of "all". Thus, please register an account with company set to be "hearthstone" so that you can observe new mentions poping up after waiting for a few minutes. The reason why I did that is that the Reddit endpoint for "all" doesn't really return all posts. In fact, it only returns a fraction of posts and it is unlikely for the posts to contain the companies we are searching for. So, for testing, being more specific is better. And the "Hearthstone" sub-section is an active section so we can observe a new post poping up every few minutes.