Katana uses three of Firebase's features: Authentication, Database (firestore), and Functions. This will guide you through settings up all three on a brand new instance. If you already have an instance set up, but need to set up your instance's Firebase service account key, you'll just need to generate a new private key.
In order for the server to be able to authenticate each request that is sent to it (i.e. to run a tool), it needs to have access to a "Service Account." This is essentially a developer key, but for firebase. It just allows an application to act as an admin on Firebase without an actual account.
To create the key for the service account:
auth.json and move it into the server directory in your instance of KatanaIntegrating Firebase by creating a private key, as described above, will complete the needed steps for setting up authentication, but there are a few things to be aware of. Currently:
Katana uses Firestore. It is a NoSQL database, similiar to Firebase Database, but with greater functionality. It is currently used just to store logs.
Follow Firebase's Instructions to set up your instance of Firestore. After that, you will need to create these collections:
server_logsstatisticstool_logsuser_logsThese are identified by name by Katana, so having these names match exactly is important. Additional collections can be added as needed - they won't interfere.
Firebase Functions is a feature that allows you to deploy event listeners that fire on certain database actions. It is entirely backend. Currently, its only purpose is to verify that the user is using a Google BYUI account ("@byui.edu"). This can be adjusted for any instance, or entirely excluded.
Deploying Firebase Functions is very simple. The instructions can be found here.
You may need to create a git repository or a submodule. I would recommend a submodule (which is currently not being used, ironically).