I have referred on the below sites for getting ideas on better Firebase schema design for a social network application.
- https://firebase.googleblog.com/2015/10/client-side-fan-out-for-data-consistency_73.html
- Firebase fan-out structure for news feed
- https://highlyscalable.wordpress.com/2012/03/01/nosql-data-modeling-techniques/
- https://www.airpair.com/firebase/posts/structuring-your-firebase-data
But I fail to understand the recent developments and features available in Cloud FireStore of Firebase.
I have below requirements to be store.
- To Store Image Upload
- Comments for the Image
- Likes activity
- User following activity
I should be able to get them individually or all activities in a single call. How best can I organize the data model?
All the above is present in the below example. But I have question on getting all types of activities to show the master news feed in a single call sorted by time.
https://github.com/firebase/friendlypix/blob/master/design.md
PS: I will be using it with Flutter.
Other models discussed: Firestore - how to structure a feed and follow system