Disclaimer-- I'm not an expert in any of this. I'm open to learning I'm wrong-- but I doubt it! :D
Knowing when someone comes ONLINE is simple. . . you can add an ID to a list of active users through your API. But what happens when someone just closes their browser or turns off their device? Dead clients post no API requests. Even in server-hosted Blazor, it's not that easy to detect exactly when someone has gone OFFLINE.
Where's your API hosted? Do you have access to timers? Can you send some kind of identifier with a requirement to send a keep-alive notification every 10 seconds or so, and remove a user from the list if you don't get it?
I'm interested in how it goes for you, because my company also has a bus department, and I'll be adding similar capabilities soon.