I am creating a website where users can register and add their personal info in their profile section and chat with others etc.... so this website is a startup idea meaning that we will publish it and then do some marketing to get customers, I want a suggestion from a senior firebase developer that which security rules should i define then? because test mode is not secure and if i choose production mode then users can't register because it does not allow read write access, so what are the secure and strong rules for firebase production mode for a real world application which will be served to millions of users. What could be the security rules of companies who are using firebase?
P.S: I would also like to hear some tips/tricks about security, optimization etc...
Test Mode? or Production Mode?
if(Production Mode){ then('what rules') }