feat(pwa): full PWA setup with service worker and PNG icons

- Add @ducanh2912/next-pwa with NetworkFirst runtime caching (24h, 200 entries)
- Disabled in development to avoid SW interference
- Generate icon-192.png, icon-512.png, apple-touch-icon.png from SVG
- Update manifest.json to use PNG icons (required for Android install prompt)
- Add apple-touch-icon + appleWebApp metadata to layout
- Add /offline fallback page shown when network unavailable

Offline behavior: cached reads work on all platforms; background sync
for new events not supported (iOS Safari has no Background Sync API).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 15:50:29 +02:00
parent 78fc31252e
commit 95e02aca57
9 changed files with 2659 additions and 8 deletions
+2
View File
@@ -11,6 +11,7 @@
},
"dependencies": {
"@auth/prisma-adapter": "^2.11.2",
"@ducanh2912/next-pwa": "^10.2.9",
"@hookform/resolvers": "^5.4.0",
"@prisma/adapter-pg": "^7.8.0",
"@prisma/client": "^7.8.0",
@@ -41,6 +42,7 @@
"@types/react-dom": "^19",
"eslint": "^9",
"eslint-config-next": "16.2.9",
"sharp": "^0.35.1",
"tailwindcss": "^4",
"typescript": "^5"
}