I had to write a firebase firestore rule and didnt have much luck with Googling so I asked chatgpt. I tested it, and it was correct first time. PS: No guarantees this covers all bases. Just an example of the power of chatgpt