Description
The app already has a service worker for offline support. Add a customized PWA install flow: detect when the app is installable, show an in-app install banner (not just the browser default), and notify users when content is available offline. Use the beforeinstallprompt event.
Definition of Done
Acceptance Criteria
- Visit site on supported browser → install banner appears after 30s engagement
- Dismiss banner → does not reappear for 7 days
- Click install → PWA installed to home screen
- Offline indicator shows when service worker has cached pages
- Manifest icons are correct sizes for all platforms
Files to Modify
frontend/src/components/PWA/InstallPrompt.tsx — enhance install UI
- New file:
frontend/src/hooks/useInstallPrompt.ts — beforeinstallprompt logic
frontend/src/components/PWA/OfflineIndicator.tsx — enhance offline indicator
frontend/public/manifest.json — verify icons and fields
frontend/src/app/layout.tsx — include install prompt component
Description
The app already has a service worker for offline support. Add a customized PWA install flow: detect when the app is installable, show an in-app install banner (not just the browser default), and notify users when content is available offline. Use the
beforeinstallpromptevent.Definition of Done
Acceptance Criteria
Files to Modify
frontend/src/components/PWA/InstallPrompt.tsx— enhance install UIfrontend/src/hooks/useInstallPrompt.ts— beforeinstallprompt logicfrontend/src/components/PWA/OfflineIndicator.tsx— enhance offline indicatorfrontend/public/manifest.json— verify icons and fieldsfrontend/src/app/layout.tsx— include install prompt component