Make cashup installable as a PWA

vite-plugin-pwa with manifest scoped to /cashup/, purple £ icons matching
portal style, auto install prompt when opened with ?install=1 from the
portal dashboard, nginx no-cache rules for sw.js and manifest.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-11 10:54:50 +00:00
parent dec7ac2f3e
commit 4a46bcf45f
7 changed files with 6327 additions and 2 deletions

View file

@ -8,6 +8,23 @@ server {
try_files $uri =404;
}
location = /cashup/manifest.webmanifest {
default_type application/manifest+json;
add_header Cache-Control "no-cache";
try_files $uri =404;
}
# Service worker scripts must revalidate so new deploys reach installed PWAs
location = /cashup/sw.js {
add_header Cache-Control "no-cache";
try_files $uri =404;
}
location = /cashup/registerSW.js {
add_header Cache-Control "no-cache";
try_files $uri =404;
}
location /cashup/api/ {
proxy_pass http://backend:3001/api/;
proxy_set_header Host $host;