This document provides comprehensive documentation for TuvixRSS's Progressive Web App capabilities, including installation, offline support, and modern PWA features.
- Overview
- Features
- File Structure
- Development
- Icon Generation
- Installation
- Manifest Configuration
- Service Worker & Offline Support
- Customization
- Browser Support
- Troubleshooting
- Monitoring
- Code References
- Resources
TuvixRSS is configured as a modern 2025 Progressive Web App with offline capabilities, installability, and enhanced mobile experience. The PWA implementation provides:
- Installable: Users can install the app on their devices (desktop, mobile, tablet)
- Offline Support: Core functionality works without internet connection
- Auto-updates: Service worker automatically updates when new versions are available
- App Shortcuts: Quick access to common actions from the home screen/start menu
- Protocol Handlers: Handle
web+rss://andfeed://protocol links - Share Target: Receive shares from other apps on mobile devices
- Installable: Users can install the app on their devices (desktop, mobile, tablet)
- Offline Support: Core functionality works without internet connection
- Auto-updates: Service worker automatically updates when new versions are available
- App Shortcuts: Quick access to common actions from the home screen/start menu
- Protocol Handlers: Handle
web+rss://andfeed://protocol links - Share Target: Receive shares from other apps on mobile devices
- Window Controls Overlay: Modern desktop window appearance on supported platforms
- Maskable Icons: Adaptive icons that work across all platforms
The app uses intelligent caching strategies for optimal performance:
- Static Assets: Cache-first for CSS, JS, images (precached)
- API Calls: Network-first with 5-minute fallback cache
- External Fonts: Cache-first with 1-year expiration
- Images: Cache-first with 30-day expiration
packages/app/
├── public/
│ ├── manifest.webmanifest # Web app manifest with modern features
│ ├── browserconfig.xml # Microsoft tile configuration
│ ├── icons/ # Generated PWA icons
│ │ ├── icon-*x*.png # Standard icons (72-512px)
│ │ ├── icon-maskable-*.png # Maskable icons for adaptive displays
│ │ ├── apple-touch-icon.png # Apple device icon (180x180)
│ │ └── shortcut-*.png # Icons for app shortcuts
│ └── favicon.ico # Browser favicon
├── src/
│ ├── hooks/
│ │ └── use-pwa-install.ts # Hook for PWA installation logic
│ ├── components/
│ │ └── pwa-install-prompt.tsx # Install prompt UI component
│ └── pwa-register.ts # Service worker registration
└── scripts/
└── generate-icons.mjs # Icon generation from SVG
PWA features are enabled in development mode:
pnpm devThe app will be available at http://localhost:5173 with service worker support.
pnpm buildThe build process will:
- Generate optimized service worker
- Precache all static assets
- Create manifest with correct asset paths
pnpm previewThis serves the production build locally to test PWA features.
Icons are generated from the tuvixrss.svg logo:
pnpm generate:iconsThis creates:
- Standard PWA icons (72x72 to 512x512)
- Maskable icons with safe zone padding
- Apple touch icon (180x180)
- Shortcut icons (96x96)
- Favicon (32x32)
To customize, edit scripts/generate-icons.mjs or replace the source SVG.
- Navigate to the app
- Look for the install icon in the address bar
- Click "Install" or use the install prompt
- The app will open in its own window
- Open the app in Safari
- Tap the Share button
- Scroll down and tap "Add to Home Screen"
- Tap "Add"
- Open the app in Chrome
- Tap the three dots menu
- Tap "Install app" or "Add to Home Screen"
- Tap "Install"
The manifest.webmanifest includes modern 2025 PWA features:
window-controls-overlay: Modern desktop appearancestandalone: Full-screen app experienceminimal-ui: Minimal browser UI
Quick access to:
- View Feeds (
/app/feeds) - Unread Articles (
/app/articles?filter=unread) - Settings (
/app/settings)
web+rss://: RSS protocol handlerfeed://: Feed protocol handler
Both redirect to /app/feeds/add?url=%s for easy feed subscription.
The app can receive shares from other apps:
- Shared text, URLs, and titles
- Endpoint:
/share-target(POST) - Use case: Share articles/feeds from other apps
Optimized for Microsoft Edge side panel:
- Preferred width: 400px
- Compact layout for side-by-side browsing
The app provides comprehensive offline support through two complementary systems:
- Cached static assets (JS, CSS, images) work offline
- API calls cached with 5-minute expiration
- Smart cache strategies per resource type
- Auto-cleanup of outdated caches
- Queries automatically pause when offline
- Polling stops to save battery/bandwidth
- Smart retry logic with exponential backoff
- Automatic data sync when reconnecting
- Previous data preserved during offline periods
- Clear UI feedback via offline indicator
See Offline Support Guide for detailed documentation on network-aware query management.
- Checks for updates every hour
- Prompts user when new version is available
- Seamless update with page reload
-
User goes offline:
- Service worker serves cached app shell
- React Query pauses all queries
- Offline banner appears
- Previous data remains visible
-
User comes back online:
- Offline banner shows "Back online!"
- React Query automatically refetches stale data
- Service worker syncs new assets
- Everything updates seamlessly
Edit index.html and manifest.webmanifest:
<!-- index.html -->
<meta name="theme-color" content="#000000" />// manifest.webmanifest
{
"theme_color": "#000000",
"background_color": "#000000"
}Edit src/components/pwa-install-prompt.tsx:
- Delay before showing: Change
setTimeoutdelay (default: 3 seconds) - Re-prompt interval: Modify
daysSinceDismissedcheck (default: 7 days) - UI customization: Update component JSX
Edit vite.config.ts workbox.runtimeCaching:
{
urlPattern: /\/api\/.*/i,
handler: "NetworkFirst", // or "CacheFirst", "StaleWhileRevalidate"
options: {
cacheName: "api-cache",
expiration: {
maxEntries: 100,
maxAgeSeconds: 60 * 5, // 5 minutes
},
},
}- Chrome/Edge/Brave: Desktop & Mobile
- Safari: iOS 11.3+ (with limitations)
- Firefox: Limited support
- Opera: Desktop & Mobile
| Feature | Chrome/Edge | Safari | Firefox |
|---|---|---|---|
| Install prompt | ✅ | iOS only | ❌ |
| Service worker | ✅ | ✅ | ✅ |
| Offline | ✅ | ✅ | ✅ |
| App shortcuts | ✅ | ❌ | ❌ |
| Protocol handlers | ✅ | ❌ | ❌ |
| Share target | ✅ | ✅ (iOS) | ❌ |
| Window controls | ✅ | ❌ | ❌ |
- Check console for errors
- Ensure HTTPS (or localhost)
- Clear browser cache and reload
- Check DevTools > Application > Service Workers
- App must be served over HTTPS
- Must have valid manifest
- Must have service worker
- Chrome requires "engagement" (2 visits, 5 minutes apart)
- User may have previously dismissed
- Visit pages while online first (to cache)
- Check Network tab in DevTools (throttle to offline)
- Verify service worker is active
- Check cache contents in Application tab
- Run
pnpm generate:icons - Check
public/icons/directory - Verify paths in
manifest.webmanifest - Clear browser cache
Open DevTools > Application > Service Workers to:
- View registration status
- Force update
- Skip waiting
- Unregister for testing
Open DevTools > Application > Cache Storage to:
- View cached resources
- Delete specific caches
- Monitor cache size
Use Lighthouse in DevTools:
- Open DevTools
- Go to Lighthouse tab
- Select "Progressive Web App"
- Run audit
Target scores:
- PWA: 100/100
- Performance: 90+
- Accessibility: 90+
- Service Worker Registration:
packages/app/src/pwa-register.ts - PWA Install Hook:
packages/app/src/hooks/use-pwa-install.ts - Install Prompt Component:
packages/app/src/components/pwa-install-prompt.tsx - Manifest:
packages/app/public/manifest.webmanifest - Icon Generation:
packages/app/scripts/generate-icons.mjs - Vite PWA Config:
packages/app/vite.config.ts(workbox configuration)