I am new to firestore database and I have developed an app in android studio accessing data from firestore database. My application has 2 types of user category 1. Admin 2. Users I have implemented Mobile number authentication logic using API of sms service provider. I am not using google's firebase authentication. How should I write the rules for the firestore database I am unable to understand.
Admin --> can read and write to all collections
Users --> can read all collections but write only few collections
Can anyone guide me how can I achieve this.