BioDrop icon indicating copy to clipboard operation
BioDrop copied to clipboard

[FEATURE] offline version of Linkfree (PWA)

Open CBID2 opened this issue 1 year ago • 13 comments

Description

Having access to user profiles offline would be great when there is limited internet.

We can make LinkFree into a PWA https://www.npmjs.com/package/next-pwa

Screenshots

No response

Additional information

No response

CBID2 avatar Nov 25 '22 22:11 CBID2

It's great having you contribute to this project

Welcome to the community :nerd_face:

If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our Discord chat and our GitHub Organisation - we help and encourage each other to contribute to open source little and often 🤓 . Any questions let us know.

github-actions[bot] avatar Nov 25 '22 22:11 github-actions[bot]

Could you please explain about this? I would like to contribute.

thevinitgupta avatar Jan 01 '23 15:01 thevinitgupta

@thevinitgupta I have updated the description with more information

eddiejaoude avatar Jan 01 '23 15:01 eddiejaoude

Progressive web app a good idea, It will allow us to install the webapp on our pc and also will give the fast access to linkfree website. It also caches the assets(images).

mohit1607 avatar Jan 03 '23 08:01 mohit1607

I would like to work on this, If someone like to assist me then welcome.

mohit1607 avatar Jan 03 '23 08:01 mohit1607

If Anybody is not assigned then I can do this.

mohit1607 avatar Jan 09 '23 08:01 mohit1607

Sure @mohit1607 👍

eddiejaoude avatar Jan 11 '23 20:01 eddiejaoude

I would like to work on this, If someone like to assist me then welcome.

I’ll assist you @mohit1607! :)

CBID2 avatar Jan 16 '23 05:01 CBID2

Thank you very much @CBID2 I am stuck right now on something I successfully created the pwa but I am having trouble in making it offline. Glad to get help

mohit1607 avatar Jan 16 '23 07:01 mohit1607

Thank you very much @CBID2 I am stuck right now on something I successfully created the pwa but I am having trouble in making it offline. Glad to get help

Okay what have you done so far?

CBID2 avatar Jan 16 '23 07:01 CBID2

Phase-1: I first tried the next-pwa external library but was unable to use that because its whole documentation was available in CJS(common javascript format) so I tried to convert them into the modules but some other plugins already reside there which I have no knowledge about. Phase-2: I manually added the service worker and it already contain manifest.json and wrote the basic funcitons for installing and caching , and activating the serviceworker.js

Three files I edited (one generated) 1._app.js( useEffect for registering serviceworker) Screenshot (5867) 2./pages/index.js( added link tag to manifest.json) Screenshot (5868)

3.serviceWorker.js(service worker code) Screenshot (5869) Screenshot (5870) Screenshot (5871)

mohit1607 avatar Jan 16 '23 09:01 mohit1607

Right now it is installable but not caching the url I provided and is displaying blank page, maybe it is due to I dont cached the bundled files but I am unaware of that completely.

mohit1607 avatar Jan 16 '23 09:01 mohit1607

"/docs" is just a cached url but not displaying when offline

mohit1607 avatar Jan 16 '23 09:01 mohit1607

I am awaiting for your response @CBID2

mohit1607 avatar Jan 21 '23 16:01 mohit1607

I am awaiting for your response @CBID2

Hey @mohit1607. I'm not too well-versed on JavaScript. Hey @loftwah, can you help us?

CBID2 avatar Jan 21 '23 16:01 CBID2

https://web.dev/learn/pwa/caching/ Read this for caching in pwa . This article should help. I'll go through the above screenshots as well. I will be a little slow on replying cuz I'm usually on here during weekends. Also if I am not wrong The net ninja will have their playlist on pwa

stevenovak123 avatar Jan 22 '23 05:01 stevenovak123

Hi @stevenovak123 I am glad to hear from you but now I am not having any idea what to do next and According to me I had made it installable but was not sure to cache the pages so I am quitting this task and hoping for someone to find it and to evaluate it myself. Thanks Glad to be part of this team.

mohit1607 avatar Jan 23 '23 10:01 mohit1607

Oh, alright no worries. Glad you tried and I hope you got to learn something. @CBID2 I'll read up on this on the weekends and let you know if I can help you make this.

stevenovak123 avatar Jan 23 '23 15:01 stevenovak123

I can probably help but this looks like it is more in @krshkun's domain. I'd definitely be keen to be involve but it isn't my area of expertise.

loftwah avatar Jan 28 '23 13:01 loftwah

I don't think this will work because views will not workout this way

gptkrsh avatar Jan 28 '23 13:01 gptkrsh

I think your solution kind of beats this anyway doesn't it?

loftwah avatar Jan 28 '23 15:01 loftwah

I think your solution kind of beats this anyway doesn't it?

Which solution? Can you be specific

gptkrsh avatar Jan 28 '23 17:01 gptkrsh

Your self-hosted version of LinkFree is fast enough that PWA isn't significant?

loftwah avatar Jan 29 '23 02:01 loftwah

Yes, I can implement this on linkfree as well 👍🏻 but the build times will increase a little

gptkrsh avatar Jan 29 '23 05:01 gptkrsh

Yes, I can implement this on linkfree as well 👍🏻 but the build times will increase a little

How does your self-hosted version of Linkfree look @krshkun?

CBID2 avatar Jan 29 '23 07:01 CBID2

Krish's profile

loftwah avatar Jan 29 '23 07:01 loftwah

Krish's profile

Thanks. I agree with @loftwah. @krshkun’s self-hosted version is effective

CBID2 avatar Jan 29 '23 15:01 CBID2

Thanks everyone for the collaboration, but as this conversation has gone off-topic, let's close this issue for now and revisit in the future.

SaraJaoude avatar Feb 03 '23 14:02 SaraJaoude

I don't think this will work because views will not workout this way

Views ?

mohit1607 avatar Feb 03 '23 22:02 mohit1607

I don't think this will work because views will not workout this way

Views ?

The counter of views on your profile

gptkrsh avatar Feb 04 '23 01:02 gptkrsh