greymass / 2nicove

In development
https://v2.unicove.com
GNU Affero General Public License v3.0
2 stars 1 forks source link

Progressive web app #243

Open deansallinen opened 2 days ago

deansallinen commented 2 days ago

Using the Vite PWA plugin for SvelteKit, we can create a service worker and manifest.

We can then start using the service worker to run data synchronization in the background, off the main thread, to fetch updated network and account data on a regular interval, for example. Or to fetch account activity pre-emptively when landing on the account overview page.

We can also enable installing as an application, which will cache pre-rendered pages to the user's device and enable "offline" mode.

A service worker would also open up the Push API if we wanted to send notifications to the user (e.g. on new activity)

sandroguras commented 2 days ago

I looked into this PWA plugin, v0.1.0, which is currently in a very early stage. Its main benefit is that you can tweak the PWA setup from a single source. Without the plugin, it's straightforward to create a service worker, manifest, and set of icons, so I'm not sure we need another dependency for this task.