After adding the user management, we can now move to the next user story that allows users to add stories to their favorites.
Favorites Service
Before we start to implement the favorites service , we need to design the storage structure in the Firebase database. The root path for favorites data will be /favorites. Each user should have its own favorites, so we use the user’s uid as the key for the user’s data. The path for each user’s favorites data is /favorites/${uid}. For each item that the user adds to the favorites, we need to store the item’s id and the timestamp. The timestamp ...