After considering the idea of trying Firebase, I have spent hours browsing through example projects and documentation. Unfortunately, it seems like there is a misunderstanding on my part possibly because of being accustomed to server/client-side architectures where the core functionalities would typically reside on the server side.
From what I gathered in the examples, most of the code involves using Firebase commands in client-side JavaScript. However, wouldn't this mean that almost all of my codebase and logic are exposed to the public?
With Firebase, how can I ensure the security of my code if everything is visible to the client?