I have never used Firebase, but I think they handle the data store and all the ways to access it's data (auth, sockets, etc.). So if you needed some kind of backend logic or task to happen, you would wire a separate backend app that authenticates to the firebase database and then it could read/update/create data.