title: How to model a chat application on Firebase Realtime Database?
body: <p>I am try to design a structure for chat application include private message and 
  groups i by using real time firebase 
  i don't know how to design the structure 
  any help please
  i am try to do something like this is that true
  <a href="https://i.stack.imgur.com/14VJ8.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/14VJ8.jpg" alt="structure for chat application"></a></p>
  
  <pre><code>Users
       |
       |_USER1
       |     |
       |     |__FRIENDS
       |     
       |_USER2
             |
             |__FRIENDS
  </code></pre>