Best Way to Structure Database for Project Management

I am creating an app where the account holder has to add team members to complete the projects, and they’ll sign in as vendors.

Let’s say one is planning a wedding. The bride could then add the baker, venue coordinator, florist and caterer to her “team.”

I am a little stuck on the best way to structure the database, as the “team member” data type, should be affiliated with a vendor’s user account.

Bride creates an account, “adds team member” and then that team member’s account is automatically created. The bride should only be able to communicate with the team member’s she’s added. Vendors will have a slightly different journey (ex: bride will be able to manage all team members and their tasks, while team members will only see tasks assigned/relevant to them).

For the messaging part of the app, for the “send to field”, I am unsure how to structure so that the user can only communicate with their specific team members, and the team members can talk to each other. I can’t think of how to connect the team member data type w/ the user data type.


Notice here that for the dynamic drop-down, I have team members, so you can only message people you’ve added on your team.

Where it gets tricky is creating a new message thread, the “send to”

Hello!

Try to keep the user object free of lists as much as possible.

Think of a user as a free object that can take on different things in your app. He/she can be a part of project, he/she can be a part of a message thread, he/she can be a part of a team, he/she can take on the role of a vendor, etc etc.

This approach could take you to another way of looking at your dB structure. Something along the lines of this:

Project
Title - text
Participants - list of users

Team
Name - text
Project - project
Members - list of users

Vendor
Name - text
Projects - list of projects
Contacts - list of users

Client
Name - text
User - user
Project - project
Team - team

Etc etc etc

Hope this helps :+1:t2:

I will try this out tomorrow. Thanks!