feat: configure service worker and offline support (#34) #56

Merged
makiolaj merged 1 commits from feature/issue-34-service-worker into develop 2026-02-25 00:08:06 +00:00
Owner

Comprehensive service worker configuration with smart caching:

Caching Strategies:

  • Network-first for Supabase REST API (fresh data priority)
  • Network-only for auth endpoints (security)
  • Cache-first for images, fonts, product data (performance)
  • Separate caches for different resource types

Offline Support:

  • Custom /offline fallback page
  • Online/offline status detection composable
  • Visual feedback banner for connection status
  • Auto-retry when connection restored

PWA Features:

  • skipWaiting + clientsClaim for instant updates
  • Comprehensive asset caching (JS, CSS, fonts, images)
  • 30-day cache for Open Food Facts data
  • 7-day cache for product images

Ready for production offline-first experience.

Closes #34

Comprehensive service worker configuration with smart caching: **Caching Strategies:** - Network-first for Supabase REST API (fresh data priority) - Network-only for auth endpoints (security) - Cache-first for images, fonts, product data (performance) - Separate caches for different resource types **Offline Support:** - Custom /offline fallback page - Online/offline status detection composable - Visual feedback banner for connection status - Auto-retry when connection restored **PWA Features:** - skipWaiting + clientsClaim for instant updates - Comprehensive asset caching (JS, CSS, fonts, images) - 30-day cache for Open Food Facts data - 7-day cache for product images Ready for production offline-first experience. Closes #34
makiolaj added 1 commit 2026-02-25 00:07:56 +00:00
feat: configure service worker and offline support (#34)
Some checks failed
Pull Request Checks / Validate PR (pull_request) Has been cancelled
Deploy to Coolify / Code Quality (pull_request) Has been cancelled
Deploy to Coolify / Run Tests (pull_request) Has been cancelled
Deploy to Coolify / Deploy to Development (pull_request) Has been cancelled
Deploy to Coolify / Deploy to Production (pull_request) Has been cancelled
Deploy to Coolify / Deploy to Test (pull_request) Has been cancelled
b98b3bf222
- Enhance Workbox configuration with comprehensive caching strategies
- Add separate caching for Supabase REST API, Storage, and Auth
- Configure Open Food Facts API caching (30-day cache)
- Add offline fallback page with retry functionality
- Create useOnlineStatus composable for network monitoring
- Add OfflineBanner component for user feedback
- Configure skipWaiting and clientsClaim for instant updates
- Cache Google Fonts and product images

Caching strategies:
- Network-first: Supabase REST API (fresh data priority)
- Network-only: Auth endpoints (never cache sensitive auth)
- Cache-first: Images, fonts, product data (performance)
- Offline fallback: /offline page for failed navigations

Closes #34
makiolaj merged commit 28ff53e8cd into develop 2026-02-25 00:08:06 +00:00
Sign in to join this conversation.