I’m currently developing my first offline capable PWA which integrates a PC-project.
It took my a while to wrap my head around the PWA stuff (Service Workers …) but now it works.
As some parts of the development are a bit tedious, I thought about writing my own PWA Generator.
I don’t use any JS/PWA-Frameworks, and usually write small php scripts to automate tasks.
(like creating a lists of files to be cached by the service worker)).
A similar approch is used here:
Here are my initial thoughts on such a workflow, but as I don’t have much experience in Webdevelopment / Deployment maybe you have some feedback / ideas on it or even better workflows:
Local / Serperated PHP Project (PWA-Generator -> pwa-generator/):
Function “Edit PWA” -> Json-Editor für Manifest.json (Theme / Background Color and so on)
Function “Create File-List” -> Read in files under pwa-generator/app/ and update Service Worker Cache list
Function “Update Playcanvas Project”:
Use Rest API -> Download App: Get Download-Url -> Download & unzip Project File
(pwa-generator/app/pc)
Function “Deploy”:
Upload all Files under pwa-generator/app to Live Environment (by SFTP for example)
(app.client-domain.com)