What problem does it solve?
Ensures your Next.js Progressive Web App works reliably offline and delivers new service worker updates without silently breaking user sessions or losing in-progress work.
Core Features & Use Cases
- Managed Service Worker selection: Guides when to use Serwist for Next.js App Router, when to use next-pwa for Pages Router legacy apps, and when to fall back to a manual register flow for non-standard needs.
- Safe update-available UX: Implements an explicit “New version available—Reload” flow instead of using skipWaiting in a way that forces reloads.
- Offline strategy by resource type: Defines caching rules per content category (HTML, static assets, images, public GET APIs, authenticated/mutations, and sensitive data) plus an offline fallback page requirement.
- Web Push with VAPID: Covers VAPID key handling, client subscription, server persistence, small payload design, and notification click deep linking behavior.
- Deferred install prompt: Uses beforeinstallprompt capture with a user-intent “Install” affordance, and clears it on appinstalled.
Quick Start
Ask the AI to “Design my Next.js App Router PWA using Serwist, including offline caching rules by resource type, a user-driven update prompt (no silent skipWaiting), a navigation offline fallback page, VAPID push setup, and a deferred beforeinstallprompt install flow.”