I am building a PWA application that works like a pomodoro clock. So it counts down 25 minutes and informs the user when the time is up.
I was thinking of several solutions. - When the PWA application starts it sets the alarm built into the phone - The PWA app runs in the background all the time, and it triggers its own alarm.
My application keeps data in a realtime database in firebase about when the timer will end. So I was thinking about using the firebase function that checks how much time is left, but it's probably not possible because the functions are quickly lost.
I am also thinking about a separate back end that would check if the time has already elapsed and send a push notification to the phone but I do not know how to go about it and whether it will be a good solution.
I would like the application PWA to inform the user when the time runs out. Especially when it is turned off. For example, by notification or alarm. What tool can I use to make it possible (getting notifications / beep sound when the time is up)?