All Progressive Web App requirements have been implemented. The app is installable on mobile devices and supports offline functionality with intelligent caching.
Location: frontend/public/manifest.json
Features:
- App metadata (name, description, theme colors)
"display": "standalone"for native-like experience- Complete icon set (8 sizes: 72–512px)
- App shortcuts (Dashboard, New Goal)
- Screenshots for app store listings
- Categories:
["finance", "productivity"]
Colors:
- Theme:
#00d4c0(Nestera teal) - Background:
#061a1a(dark slate)
Location: frontend/public/sw.js
Caching Strategy:
- App shell (HTML/JS/CSS): Network-first, fallback to cache
- Static assets (images, fonts, icons): Cache-first
- API requests: Network-only (never cache financial data)
- Offline fallback:
/offline.html
Advanced Features:
- Cache versioning (
nestera-shell-v1,nestera-assets-v1) - Automatic cleanup of stale caches
- Background sync for pending transactions
- Push notifications with click handling
- Auto-registration with 60s update checks
Security:
- Financial data never cached
- Sensitive endpoints excluded from SW scope
Location: frontend/public/icons/
Sizes:
| File | Size | Purpose |
|---|---|---|
| icon-72x72.svg | 72×72 | Notification badge (Android) |
| icon-96x96.svg | 96×96 | Shortcut icons |
| icon-128x128.svg | 128×128 | Chrome Web Store |
| icon-144x144.svg | 144×144 | MS Tiles |
| icon-152x152.svg | 152×152 | iPad touch icon |
| icon-192x192.svg | 192×192 | Maskable — Android home screen |
| icon-384x384.svg | 384×384 | High-DPI Android |
| icon-512x512.svg | 512×512 | Maskable — splash/install prompt |
Format: SVG (development placeholders)
Production: Replace with branded PNG files using npm run generate:pwa-assets after installing sharp
Location: frontend/public/splash/
Sizes:
splash-430x932.svg— iPhone 14 Pro Max, 15 Pro Maxsplash-393x852.svg— iPhone 14 Pro, 15 Prosplash-390x844.svg— iPhone 13, 14, 15splash-375x812.svg— iPhone X, 11 Pro, 12 mini, 13 minisplash-414x896.svg— iPhone 11, XRsplash-375x667.svg— iPhone SE (2nd/3rd gen), 8
Integration: Linked in layout.tsx via <link rel="apple-touch-startup-image"> with media queries
Location: frontend/public/offline.html
Features:
- Standalone HTML (no external dependencies)
- Branded UI matching Nestera theme
- "Try Again" and "Go to Home" buttons
- Connection status indicator with auto-retry
- Mobile-responsive
Component: app/components/InstallPrompt.tsx
Features:
- Chrome/Edge/Android: Intercepts
beforeinstallpromptevent - iOS Safari: Manual instructions tooltip (Share → Add to Home Screen)
- 30-day dismissal cooldown (localStorage)
- Branded banner with "Install" and "Not now" buttons
- Automatically hidden if already installed (
display-mode: standalone)
Component: app/components/ServiceWorkerRegistration.tsx
Features:
- Client-side registration on mount
- Auto-update checks every 60 seconds
- Graceful degradation (logs warning if unsupported)
- Rendered once in root layout
File: app/layout.tsx
Meta Tags:
<meta name="theme-color" content="#00d4c0"><link rel="manifest" href="/manifest.json">- Apple-specific:
apple-mobile-web-app-capable,apple-mobile-web-app-status-bar-style - Microsoft tiles:
msapplication-TileColor,msapplication-TileImage
Splash Screens: 6 sizes linked via media queries
File: next.config.ts
Custom Headers:
/sw.js:Cache-Control: no-cache+Service-Worker-Allowed: //manifest.json:Content-Type: application/manifest+json/icons/*.svg:Content-Type: image/svg+xml+ immutable cache/splash/*.svg:Content-Type: image/svg+xml+ immutable cache
- Open DevTools → Application → Manifest (verify all fields)
- Application → Service Workers (check registration)
- Network → Offline (verify offline page loads)
- Run Lighthouse PWA audit (target: >90)
- Visit app → see "Install app" prompt
- Install → launches in standalone mode
- Add to home screen → icon displays correctly
- Offline: airplane mode → offline fallback works
- Push notification test (if backend connected)
- Install banner shows manual instructions
- Share → Add to Home Screen
- App opens in standalone mode
- Splash screen displays on launch
- Icon shows on home screen
- Offline fallback works
Target: >90
Requirements Met:
- ✅ Registers a service worker that controls page and start_url
- ✅ Web app manifest meets installability requirements
- ✅ Configured for a custom splash screen
- ✅ Sets a theme color for the address bar
- ✅ Provides fallback content when JavaScript is unavailable (offline.html)
- ✅ Content is sized correctly for the viewport
Expected Score: 95+
-
Replace SVG placeholders with branded PNG icons
cd frontend npm install -D sharp npm run generate:pwa-assets -
Update manifest.json, layout.tsx, sw.js to reference
.pngfiles -
Test on real devices:
- Android Chrome (latest)
- iOS Safari (16+)
- Desktop Chrome/Edge
-
Configure push notification server (if using)
- Update backend push notification endpoint
- Test with
self.registration.showNotification()
-
Run Lighthouse audit in production mode
npm run build npm run start # Open DevTools → Lighthouse → Desktop + Mobile -
Verify HTTPS (required for service workers)
-
Check service worker scope (must be served from root
/)
-
SVG icons: Current implementation uses SVG placeholders for rapid development. Replace with PNG for production.
-
iOS splash screens: Only covers common device sizes. May need updates for new iPhone models.
-
Push notifications: Backend implementation required. SW setup is complete but backend push endpoint must be configured.
-
Background sync: Placeholder implementation — frontend must handle
SYNC_TRANSACTIONSmessage from service worker.
- Generate at required size using
generate-pwa-assets.js - Add entry to
manifest.jsonicons array - Update
next.config.tsheaders if needed
- Increment
CACHE_VERSIONconstant - Old caches automatically deleted on activation
# DevTools → Network → Throttling → Offline
# Or use: navigator.serviceWorker.ready.then(reg => reg.unregister())