quran.com-frontend icon indicating copy to clipboard operation
quran.com-frontend copied to clipboard

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

Open M86xKC opened this issue 7 years ago • 16 comments

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

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.

M86xKC avatar Apr 07 '18 07:04 M86xKC

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?

popo63301 avatar May 01 '18 15:05 popo63301

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.

mmahalwy avatar May 01 '18 19:05 mmahalwy

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!

popo63301 avatar May 01 '18 20:05 popo63301

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

mmahalwy avatar May 02 '18 02:05 mmahalwy

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.

popo63301 avatar May 02 '18 06:05 popo63301

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

mmahalwy avatar May 02 '18 17:05 mmahalwy

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.

popo63301 avatar May 03 '18 08:05 popo63301

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

ATouhou avatar May 06 '18 18:05 ATouhou

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.

abdulbasitkay avatar May 08 '18 22:05 abdulbasitkay

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

mmahalwy avatar Jul 13 '18 17:07 mmahalwy

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.

ammarbinfaisal1 avatar Oct 17 '18 08:10 ammarbinfaisal1

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

mmahalwy avatar Dec 07 '18 18:12 mmahalwy

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

ammarbinfaisal1 avatar Dec 07 '18 19:12 ammarbinfaisal1

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

ghost avatar Mar 19 '19 09:03 ghost

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 avatar Aug 19 '19 23:08 carlosdelfino

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)

carlosdelfino avatar Aug 20 '19 00:08 carlosdelfino