One thing you need to consider when designing your #Firestore database is how much data you'll need to build each document reference.
This will be important if you ever add notifications to your #flutter app since the notification should bring the user to a relevant screen.
For example, say you have the following collections:
Users -> Posts -> Comments
And you want to notify a user about a comment on their own post. In this case, the notification will only need the post ID and the comment ID since we can infer the user ID.
But what if you wanted to notify a user about a reply to their comment on someone else's post?
You'd need to send all 3 IDs so your app can resolve the destination.
Alternatively, you could flatten the database so that users, posts, and comments are top-level.
Encryption on the other hand is a foreign language to me. From my research, I learned that each user needs an #AsymmetricKeyPair that can be used to #encrypt and #decrypt data.
To generate these, I used the rsa_encrypt package.