Creating a Firestore document manager bot?

I got the room setup running nicely for my app Görtan and the lobby is working out great.

There is this annoying issue that when the last player leaves the room, nobody updates the roomlist in Firestore, and i don’t want to have every player reading every document, to check if this last player is in the room or not.

So my idea is that i´ll make a game instance for Görtan that is acting as my broker, a “document manager bot” if you will.

The basic idea is that i have a game instance hosted and online 24/7 with websites like + (can i run an exported html web build on it?), and then the player base communicates to that bot via p2p and the bot brokers the firestore document data to the player and keeps the documents up to date.

I have not yet looked too deeply into this idea, but maybe someone here had a similar idea?

@arthuro555 what do you think?
is that idea theoretical possible, or am i thinking impossible here?

I think it is theoretically possible, though I wonder if it wouldn’t be more worth it to use firebase functions for such tasks. The risk is that those require using the blaze plan, so if you get to the limits of free firebase you would start paying instead of it stopping working.