Question regarding your book

Hi, I was pointing out by Jay Rogers to write here.
I have a pre-sale question regarding your book, more specifically about PWA.

With proper modifications, does the information in your book also apply to PWA development? I’m clearly referring to the backend aspect since, by necessity, the frontend will be different than the native app example you proposed. Online I can’t find clear information about the correct process (authentication and security) for the development of the backend api architecture and the official Laravel documentation makes me a bit confused about it.

Thanks in advance!

Hi @bytemore,

To be honest, I haven’t created a PWA specifically, but from what I understand the same concepts should apply. From the backend side, the concepts in the book should work 100%. The security is handled through Laravel Sanctum which handles both cookie and token based authentication. Since it’s an API driven app, all permissions and security are on the API side as well and would work for any way you wish to integrate with it.

The front-end, I believe the code would work fine. The code for the frontend works with web and mobile. On the web side, we use a cookie to track authentication where on the mobile side we use an access token. The access token route would be what I’d imagine you’d have to do when deploying a PWA. The only difference would be you’d have to store it directly in local storage instead of persisting to a secure storage layer on mobile first.

NuxtJS has a PWA deployment target so it would take care of some of the headache of actually deploying the PWA.

Hope this helps!

Hi @danpastori ,

That’s what i wanted to heard about the backend side! :smile:

Regarding the PWA integration I am researching what is an effective solution when the user is offline. If anyone is interested I will share it in the future.

Thank you for your reply!

3 Likes

Awesome! Thanks for buying the book as well!

Definitely keep us in the loop on how your PWA goes as well. Would definitely love to see your results!

In addition to this book, you may want to check out Laracasts. They have a course on building an offline-first Vue PWA, which sounds like what you’re after: Laracasts: Let’s Build an Offline-First Vue App