clevaway / bond

Send your loved ones a vibe with a lovely sound, so they know you miss them. Anytime you want to, anywhere they are.

Home Page:https://bond-nu.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Db structure!

RonaldColyar opened this issue · comments

Assuming we are just going to continue using firebase:

Users

  • DisplayName
  • Username
  • DisplayPhoto
  • Groups(priority groups like family , lovers,friends etc) the groups will contain the usernames of the people and its priority. The priority will be normal , above normal , and number 1.
  • Sounds
  • Contacts (a list of usernames)
  • Received sounds (the sounds that others sent to you! This will just be a link to the sound in the other person's storage , but you may think this is an issue because it seem like users can read each other's data. We can solve this issue by making rules that limit users to only reading a specfic portion of the user's data model)
  • Contact Requests.
    when someone sends a contact request it will be placed on both parties user and if the user accepts , it will validate that both users have agreed to become contacts.

I don't want users to be able to write to each other's contacts .

So :

  1. initally the user 1 will log in send the contact request to user 2 ,
  2. once accepted each will become friends/contacts.

so it would look something like this for visualization!!:

user1/requests = {
type: outgoing ,
to: user2,
status: pending
}

user2/requests = {
type: received
from : user1,
status : pending
}

Are we finally sticking to firebase? Because I think we should get something we can have more control on like I talked with @RonaldColyar. Both now and later

@FotieMConstant it could work well.

We could collect our data and have a separate database also

But not the same data that we store in firebase it would be redundant,

Yeah, i think so as well. Please does anyone has Postgre or Mongo db online we can use?

@FotieMConstant we could configure a postgre db on heroku but it will be limited as they grant a max of 20 simultenous connections to the db

How much does it cost if we want to upgrade! Any idea?

@FotieMConstant the pricing plan varies greatly, here is a link you can check it out
postgreSQL db Heroku pricing plan

Relational Database Structure

@FotieMConstant @RonaldColyar before we join anything i'll share the structure of the db here so we could discuss it

  • Here we have the class diagram of the database

class diagram

  • Here have the Physical datamodel

pdm

NB : I used the information i had in mind on the project and that which @RonaldColyar shared recently to come up with this database