Skip to content

[Frontend] Implement PWA install prompt with offline-ready notification #175

Description

@Penielka

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

  • Install prompt appears when PWA criteria are met (manifest, SW registered, HTTPS)
  • Custom in-app install banner (not relying on browser default)
  • "Install App" button in settings or header
  • Install prompt is dismissible and does not reappear for 7 days after dismissal
  • Offline-ready indicator in header when SW is active and content cached
  • Post-install analytics event tracked
  • Works on Chrome, Edge, and mobile Safari (iOS standalone mode)

Acceptance Criteria

  1. Visit site on supported browser → install banner appears after 30s engagement
  2. Dismiss banner → does not reappear for 7 days
  3. Click install → PWA installed to home screen
  4. Offline indicator shows when service worker has cached pages
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions