quran / quran.com-frontend

quran.com frontend
https://quran.com
MIT License
985 stars 360 forks source link

[Feature Request] Make an electron app from Quran.com #967

Open M86xKC opened 6 years ago

M86xKC commented 6 years ago

السلام عليكم,

I think making the Quran.com accessible for offline users (Desktop) is a big deal!, so maybe an electron app will make that possible ? hope you can achieve that.

popo63301 commented 6 years ago

Aleykum salam,

Good idea! There might be 2 solutions: either create a monorepository for the web app and the electron app or create an other repo for the electron app.

The second option sounds better in terms of organisation for me. Although I'm just wondering how we can share most of the code base with the quran.com-frontend repo because if we fix something on quran.com-frontend we might do the exact same modification to the code base of the electron app.

An electron app has specific challenges compared to the web app like the local database and managing the audio, which might be a very interesting challenge IMO.

What do you think guys?

mmahalwy commented 6 years ago

I think the monorepo is a good idea. I don't have a whole lot of experience with electron. I tried it really early on and had some challenges with it but perhaps you guys know better.

popo63301 commented 6 years ago

It definitely solves the problem of code sharing. We just need to set the basic configuration to already have a working electron app. Then, we have to solve the challenges of local data and audio. I'm not an expert as well but I think it's doable. I'm up for this challenge inshaAllah!

mmahalwy commented 6 years ago

How come local data? Probably the only local data would be what we use for cookies no?

popo63301 commented 6 years ago

Well, if I quote @pupyc : "I think making the Quran.com accessible for offline users (Desktop)". It's more than small piece of data that can be store with cookies. It's the complete quran actually. So we might manage a local database to store all the data.

mmahalwy commented 6 years ago

I'd suggest against that, to be honest. IMHO, I am still struggling with the idea why we need to have Quran offline – especially that the DB alone is over 100mb

popo63301 commented 6 years ago

Yes, the DB is the real challenge. It's up to the people if we go for this challenge. It might be a lot of effort for very little people but can be worth for people who have plan to make Electron app in the future so they can get the right snippets for their future projects.

ATouhou commented 6 years ago

What does the Google Analytics say? How many people come from areas with slow/limited internet based locations?

abdulbasitkay commented 6 years ago

I believe a monorepo would work. all we have to do is a separate main/release/master branch for the electron app. This would be a branch out from master and would have all the electron specific configs and files. With this, any commit that needs to be on both apps would get merged into the master branch and the electron release branch at the same time, independent commits can still be made to the master branch of any app.

mmahalwy commented 5 years ago

most of our traffic is on mobile, with USA and Indonesia leading

ammarbinfaisal1 commented 5 years ago

Making an electron app which is completely offline seems to be difficult but a simple electron app which just loads quran.com(directly in the BrowserWindow, not an iframe in an index.html) can have one benefit - the pages get cached and on reopening the app without any internet connection, the surah's which were previously read/scrolled through can be read till where they were read/scrolled through before.

I know this as I just tried making such an app. Note that this is what I noticed in an unpacked app on Ubuntu18.04 with the latest version of electron.

mmahalwy commented 5 years ago

@ammarbinfaisal would love to have you create an electron app for us if you have bandwidth :)

ammarbinfaisal1 commented 5 years ago

I am quite busy this month.
but I would definitely do that when I am free.

ghost commented 5 years ago

a bit late to the party, sorry. in all honesty, i dont think an electron is actually needed since the website already functions as a pwa, meaning it can be installed on the users device and function as a normal app would

carlosdelfino commented 4 years ago

A humble suggestion.

audio files may be reduced in size with reduced quality, and the offline version may have the option of later downloading the installation to a higher quality version, being downloaded in the background as required, ie before the next sura to be recited, if not downloaded in time, it would be signaled that you are still using the low quality version and the percentage of how much is left to lower the actual quality.

carlosdelfino commented 4 years ago

I'm sorry for the question, but what do you consider to be "monorepository"?

I have been designing my projects as modularly as possible to try to make the most of the code, and create a central repository where I add each repository as submodule when appropriate.

But of course some features of quran.com especially quran-core can be modularized through node packages (NPM) and can be installed as required.

when I start analyzing quran-android for integration with my project, I will see how far I can do it using NPM (out of pure Android context, I use NativeScript with Angular), then having success and availability I will see what I can do about using with Electron.

ps. (I am not native English, I am Brazilian and I use a translator, but I read relatively well)