I’m currently making a web app using flutter and firebase. To make this short and sweet, I want users in my app to be able to form groups. The group leader will pick base “settings” for the group and the users will add their own settings. Example:
So in the example above, the group leader has formed a group called “Ice cream group” and has chosen its base settings with every user in the group having its own settings. To form this group, the group leader would need to have the usernames of the users they want to invite and have it sent to the users. Within the invite are the group settings. The users will have the opportunity to add their settings and accept the invite. So in the end everyone in the group will be using the settings of the group and their own.
So sequentially this would happen.
- Group Leader creates group settings
- Group Leader makes its own settings.
- Group Leader has the ids of users that they want to invite.
- Group Leader sends the invites.
- Users receive the invite with the base settings. They can accept or reject the invite. Before they accept, they would have to add their own settings.
- Once every user that the group leader invites accepts the invitation, then the group is formed.
For this project I’m using the flutter framework and firebase(nosql) for the back end. Since firestore uses nosql my guess to the solution would be a document that would track the status of the invites. And depending on the status the group would be formed.
Currently my structure for the user looks something like this:
I was thinking about adding an invite field to the user and then adding a invite document that would hold the settings of the group, the status of the invite, and the user settings…
I have some ideas on what I think should done but I wanted to come here first to see if anyone had any suggestion before I try and tackle it. If anyone has any pseudo code, information, or can direct me to a place where I should ask this question, I’d appreciate it. Thanks!