feat(frontend): installable PWA with an offline app shell #83

Open
mariusz.pacek wants to merge 0 commits from mariusz.pacek/feat/pwa AGit into master
pull from: mariusz.pacek/feat/pwa
Owner

Manifest, icons, iOS meta tags and a small hand-written service worker that precaches the shell (never /api/), plus nginx manifest type and CSP. Cheap answer to M6.

Manifest, icons, iOS meta tags and a small hand-written service worker that precaches the shell (never /api/), plus nginx manifest type and CSP. Cheap answer to M6.
mariusz.pacek added 1 commit 2026-10-24 14:57:51 +00:00
feat(frontend): installable PWA with an offline app shell
CI / Check (gateway, backend, frontend) (push) Successful in 1m26s
64e1e6ffec
Manifest, icons (192, 512, maskable, apple-touch-icon) and iOS meta tags let the
phone add the app to the home screen. A service worker precaches index.html and
the built files, so the app opens offline and shows its own "offline" state; /api/
and any non-GET or cross-origin request always go to the network. Navigations are
network first so an update shows at once; the cache name carries a hash of the file
list and old caches are deleted on activate.

The worker is hand-written (src/sw.js, ~40 lines) with the file list injected by a
10-line Vite plugin, instead of vite-plugin-pwa: that pulls in Workbox and a large
dependency tree for what is a precache plus one fetch rule. The bottom nav already
pads for the iPhone home indicator (viewport-fit=cover, safe-area-inset-bottom).

nginx: manifest-src in the CSP and application/manifest+json for the manifest
(mime.types lacks it). sw.js and index.html were already no-cache, hashed assets
immutable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
All checks were successful
CI / Check (gateway, backend, frontend) (push) Successful in 1m26s
This branch is already included in the target branch. There is nothing to merge.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin refs/pull/83/head:mariusz.pacek/feat/pwa
git checkout mariusz.pacek/feat/pwa
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mariusz.pacek/home-pump#83