Sam1247 / Instagram_Clone

A clone of instagram iOS app created using Swift 5 and Firebase
78 stars 22 forks source link

firebase database structure #1

Open ragnar-homekit opened 4 years ago

ragnar-homekit commented 4 years ago

hi can you tell me how to structure the database on farebase?

Sam1247 commented 4 years ago

it's quite complex but bare with me

Direct

Screen Shot 2020-04-28 at 1 47 14 PM

FeedPosts

Screen Shot 2020-04-28 at 1 53 33 PM

Comments

Screen Shot 2020-04-28 at 2 00 21 PM

Followers and Followings

Screen Shot 2020-04-28 at 2 03 18 PM

Likes

Screen Shot 2020-04-28 at 2 03 54 PM

Posts

Screen Shot 2020-04-28 at 2 04 46 PM

Users

Screen Shot 2020-04-28 at 2 06 13 PM
ragnar-homekit commented 4 years ago

I see that it is quite articulated. I try to build it. thank you very much

Sam1247 commented 4 years ago

You're welcome 😊

ragnar-homekit commented 4 years ago

sorry if I keep asking for info, but the rules of the database, some I have understood, others not.

Sam1247 commented 4 years ago

Feel free to ask anything but please be specific as you can, FYI Firebase is not a sql database it's a nosql database that has rules not tied to sql but it's much easier thought.

ragnar-homekit commented 4 years ago

I try to explain myself, to register the user correctly I had to set it like this:

"rules": { "users": { "$uid": { ".read": "$uid === auth.uid", ".write": "$uid === auth.uid"

the user search does not work, on xcode i have this error, lost both for a question of permissions

Failed to fetch users for search: Error Domain=com.firebase Code=1 "Permission Denied" UserInfo={NSLocalizedDescription=Permission Denied} 2020-04-28 17:21:18.152408+0200 Instagram_Clone_SW5[12178:222485] 5.20.0 - [Firebase/Database][I-RDB038012] Listener at /users failed: permission_denied

ragnar-homekit commented 4 years ago

if you can export a standard copy of your test database, in json format, I would appreciate it

m00nbek commented 3 years ago

Hi. How did you learn how to do this bro?

Sam1247 commented 3 years ago

Hi. How did you learn how to do this bro?

I took the Stanford iOS development course then took some tutorial from channel called let's build that app

m00nbek commented 3 years ago

"Let's build that app" has a lot of videos. Which one did you took specifically? or any playlist? Can you give me link?

Sam1247 commented 3 years ago

"Let's build that app" has a lot of videos. Which one did you took specifically? or any playlist? Can you give me link?

I don't remember, pick any tutorial you like

m00nbek commented 3 years ago

Thanks bro 😊

m00nbek commented 3 years ago

BTW your project is awesome i loved it 😍