This is a verified interview question from Amazon. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "MovieDB(MERN): Actor Follow - Notification System amazon-web-development-ai-based-online-assesment" covers key patterns like System Design.
"MovieDB is an online app that allows users to explore movies, submit ratings, and share reviews. The actor follow and notification feature keeps users informed when new movies featuring their favorite actors are launched. Currently, this system is not working as expected and your task is to fix the backend for it. ### Problem The actor follow and notification feature keeps users informed when new movies featuring their favorite actors are launched. Currently, this system is not working as expected. ### Issue Summary: When users follow an actor, they should receive a notification whenever a new movie featuring that actor is launched on the app. Currently, users are not receiving these notifications. In addition, the notification number displayed is incorrect, showing unread notifications that do not exist when clicked. ### Steps to Reproduce: - Log in using the following user credentials: Email: sam.river@email.com Password: Password@123 - Click on the user profile present in the navbar and select Follow Actors. - One or more actors to receive updates when their new movies are added. - Log out as the user and log in as an admin using the following credentials: Email: admin@moviedb.com Password: Admin@123 - Click on the Admin in the navbar and select Add movie. - Click on the Admin in the navbar and select Add movie. - Launch an upcoming movie or add a new movie manually that features one of the following actors. - Log out as Admin and log back in as the user. - The user should receive a notification, but there are no new notifications. ### Expected Behavior: - When a new movie featuring a followed actor is launched, the user should receive a notification. - The bell icon should display the correct count of unread notifications. - Clicking the bell icon should show the list of notifications. - Once a notification is viewed, the bell icon count should update accordingly. ### Expected API Behavior #### GET /api/follow/ Purpose Retrieves all actors that the authenticated user is currently following Auth: Required (Bearer token) Success Responses (200 OK) [ "Aaron Eckhart", "Al Pacino", "Andy Serkis" ] #### POST /api/follow/follow Purpose Allows authenticated users to follow an actor Auth: Required (Bearer token) Request Body { "actorName": "Aaron Eckhart" // Required: Actor name string } Success Responses (201) { "message": "You are now following Aaron Eckhart" } Error Responses: Missing actor name (400):   "
Join thousands of developers practicing for Amazon.