I don’t know where to put the code, mainly. (I’m still trying to figure out where everything goes in Yii.) Meaning, what file should I put it in? I tried sticking two files authenticateCloud.php and initializeFirestore.php in a random folder called files under common, but it doesn’t sem to work…
Great news! Always use this approach when discovering something new: make it work, try it out, then ask yourself architectural questions
Now about where to place your code, you should study your use cases with firestore. Where are you going to use it? How? I’d probably start by a \app\helpers\Firestore helper.
I would also study the few yii2 extensions dealing with firestore. What do they bring to the table? How are they structured. (Disclaimer: they can be utterly sophisticated and complicated where you don’t need that at all, again, your use case should tell you that)
About the DB component, I’d simply leave it unconfigured as you may need it later in your project.