mmazzarolo / breathly-app

A tiny breath training app built with React-Native
https://breathly.app
Mozilla Public License 2.0
520 stars 69 forks source link

PWA support (using react-native-web) #70

Open lborgman opened 3 years ago

lborgman commented 3 years ago

PWA:s are much more safe for users. It would be nice to be able to recommend them a PWA url.

mmazzarolo commented 3 years ago

Hi @lborgman! I like the idea, but this is not a PWA / Web App. I have some experience in making React Native apps run on the web, and while being totally doable it's also time-consuming, so I don't think I'll be able to work on it anytime soon (contributions are welcome though! I even wrote a tutorial about this if anyone wanna tackle this work).

are much more safe for users

I like PWAs, but safety is not something I would define as their strength. Pretty sure native apps are way safer than PWAs -- that by definition run uncontrolled in the browser and skip the additional play/app store layer of checks for updates.

BradKML commented 3 years ago

Okay, but even then there are flags for PWAs. https://developer.chrome.com/blog/new-in-chrome-73/

And another problem: Why a PWA when you can just package the whole app into one single page, so that people can just save the page and use it when they are offline?

lborgman commented 3 years ago

Hi @mmazzarolo , Unfortunately I don't use React. (React is not able to do what I need. Performance problems.)

But at the time I posted this I noticed someone did some work with React and PWA. It looked like a general recipe and not much work or difficult.

Unfortunately I forgot up post the link here. 😐

lborgman commented 3 years ago

@mmazzarolo When it comes to security it was of course one of the reasons behind the concept of PWA. For all I've seen about it a PWA looks much safer than a native app. For the user.

lborgman commented 3 years ago

Hi @BrandonKMLee ,

No, that is a misunderstanding. A single page web app is basically a concept orthogonal to a PWA.

A PWA is (among other things) logically a package. That is actually one of its main strength. Please see how it integrates with the browser cache.

mmazzarolo commented 3 years ago

But at the time I posted this I noticed someone did some work with React and PWA. It looked like a general recipe and not much work or difficult.

Just to clarify, Breathly is written in React Native, not React. To make it a PWA you can either:

Both options are doable but they're not a 10 minutes thing, so I'm not sure if/when I'd be able to tackle them... especially because the return of investment here might be small (I don't think many people would use the PWA over the native app)

For all I've seen about it a PWA looks much safer than a native app. For the user.

The only reason for it to be more secure would be that on the web, on Android, you don't have the same access to resources as you would on a native app (which is a "con", not a "pro"). But for Breathly, that wouldn't matter since we're not asking for any permission natively.

BradKML commented 3 years ago

@mmazzarolo mmm what about https://microsoft.github.io/react-native-windows/ ?

mmazzarolo commented 3 years ago

@BrandonKMLee that's for creating native Windows/macOS apps, not PWAs. It can be used with this codebase, but it would still require a bunch of work.

lborgman commented 3 years ago

Someone just asked for a desktop app like this:

https://www.facebook.com/groups/1469946653030957/permalink/6503799669645605/

BradKML commented 3 years ago

@lborgman that is the reason why making this is a good idea, it is really useful.

gsantiago commented 1 year ago

I'm working on a webapp very similar to Breathly and I intend to make it a PWA.

It's called SereneBreath, it has the same techniques that Breathly has, including the guide breath and the option to do a custom exercise.

So I think it's a good alternative who those that prefer to do the breathing exercises in the browser. That's was my motivation to create the project.

Like Breathly, it's also open source: https://github.com/gsantiago/SereneBreath

mmazzarolo commented 1 year ago

Love it, great job @gsantiago :)