Firebase rules, need help to create

Hello people,
i want to create rules for my Firebase Database.
I want to have rules that makes it possible that a user have is own child,where he can write if the user is auth. but he can only write his own (list dont know i could say)
And in the same Database i would have a the possibility to that user can read and write if they are auth in the chat section.

So once again
I have my chat system in firebase and i want to save the user data too in the same Database read and write for auth user for the chat and read and write only in their own section in firebaseto save thier user data.

here is a video about Firebase rules and some examples, but i am not a java developer, so i have no idea to do that

Maybe someone know it and can help me:

You will need to experiment with this, however this “should” allow anyone authenticated to ready /posts/ . Only the user to write to /$uid/, and anyone authenticated to read and write chat.

“rules”: {
“posts”: {
“.read”: “auth !== null”,
“$uid”: {
“.write”: “$uid === auth.uid”
“chat”:{
“.read”: “auth !== null”,
“.write”: $auth !== null",
}
}
}
}

1 Like

This post of Cian on another topic may be helpful:

Thank you but i know that post.
I read normaly each new post.