{"repo":"dev-family/next-pwa-pack","free":true,"listed":false,"github":"https://github.com/dev-family/next-pwa-pack","clone":"git clone https://github.com/dev-family/next-pwa-pack.git","description":"A ready-to-use boilerplate for building Progressive Web Apps (PWA) with Next.js 14. Includes service worker setup, offline support, static caching, and best practices for performance and SEO. Perfect for rapid PWA prototyping or production-ready apps.","language":"TypeScript","stars":31,"topics":["boilerplate","nextjs","nextjs14","offline-first","progressive-web-app","pwa","service-worker","starter-kit","static-cache","modern-web"],"license":null,"category":"saas-starters-boilerplates","readme_excerpt":"next-pwa-pack PWA cache provider for Next.js. Automatically registers a service worker, caches pages and static assets, adds a PWA manifest and offline page, supports offline mode, SPA navigation, advanced dev tools, and both server and client actions for cache management. Made with :purple heart: by dev.family --- 🚀 Quick Start 1. Install the package: 2. After installation the following files will automatically appear: - public/sw.js - public/manifest.json - public/offline.html - A file with the server action revalidatePWA will also be automatically created or updated: app/actions.ts or src/app/actions.ts (if you use a src folder structure). If the files did not appear, run: If the server action did not appear, run: This script will create or update app/actions.ts or src/app/actions.ts with the revalidatePWA function for server-side cache revalidation. 3. Wrap your app with the provider: 4. Done! Your app now supports PWA, offline mode, and page caching. --- HOC withPWA If you use SSR/Edge middleware or want to trigger server actions (e.g., for cache revalidation on the server), use the HOC: HOC arguments: - originalMiddleware — your middleware function (e.g., for i18n, auth, etc.) - revalidationSecret — secret for authorizing revalidation requests (required so only you can access it) - sseEndpoint — endpoint for SSE events (default /api/pwa/cache-events ) - webhookPath — endpoint for webhook revalidation (default /api/pwa/revalidate ) Important: In config.matcher , be sure","default_branch":null,"files":null,"tree":[],"storefront":"/r/dev-family","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dev-family/next-pwa-pack/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}