Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progressive Web app? #14

Open
avinashvarna opened this issue Feb 21, 2022 · 4 comments
Open

Progressive Web app? #14

avinashvarna opened this issue Feb 21, 2022 · 4 comments

Comments

@avinashvarna
Copy link
Owner

After the recent posting of this website on many mailing lists, a few people (especially from India) asked if this tool could be installed as an app, so that it could be used offline. This seems like a reasonable goal.

The easiest path I could think of to achieve this was to create a progressive web app so that the site could be "installed". We can leverage the existing flask/jinja templates in nunjucks and create a service worker that caches files that the user has visited recently using something like workbox, so that they can be used offline as well. I will try to test out some of these tools.

Any thoughts? @hrishikeshrt @shreevatsa

@shreevatsa
Copy link

I like the idea of it being available as an app — I'm not sure why so many people prefer it to a web page, but clearly they do, so it would be useful to them.

Just to get a sense of things, what is the total size of all the audio files? (as I imagine that would dominate the size of any "app", PWA or not)

I thought Google was trying to make it easier to make progressive web apps but I've never tried it myself to see how much work it might be… support for PWAs is poorer on iOS as I hear, but anyway most of the interested people in India would be using Android phones, I imagine?

@hrishikeshrt
Copy link
Contributor

This sounds like a good idea. I'll comment a bit more soon, have been crazy busy and traveling etc in this week.

@avinashvarna
Copy link
Owner Author

Just to get a sense of things, what is the total size of all the audio files? (as I imagine that would dominate the size of any "app", PWA or not)

The ramayaNa-audio by itself is 1.2G. I don't think it makes sense to download all of the audio. I followed up with one of the people who requested the app, and they didn't think it was necessary either - their rationale was that users will probably try to memorize a few sargas/vargas/paadas at a time. I feel that a simple and reasonable solution is to cache audio for the pages that a user visits while online. They can then listen to those files (along with the alignment) offline, but if they want to listen to something that they haven't navigated to before, they would need an internet connection.

support for PWAs is poorer on iOS

From what I can find online, e.g. here, most of the basic features needed for a PWA are supported on iOS as well. We probably don't need the fancy features such as push notifications.

I did a quick test of using nunjucks to render the templates. I was able to get them working with some modifications. So I think we have a line of sight to a PWA if we re-implement some of the python/flask code in JavaScript, and combine it with a service worker that caches resources using workbox, for example.

I am open to other suggestions as well.

@hrishikeshrt
Copy link
Contributor

PWA definitely seems like a good option for those who want to repeatedly use a small set of chapters (memorization use-case)

It also makes sense that entire audio is not downloaded at once.

I do not have experience with PWA, but I am more than willing to take a look into them (however currently there are other priorities till the end of this month).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants