feat: Set up PWA infrastructure with service worker, offline support, and manifest

- Created service worker (public/sw.js) with caching strategies
  - Cache-first strategy for static assets
  - Stale-while-revalidate for API responses and pages
  - Network-first fallback strategy
- Implemented offline fallback page (/offline)
- Updated manifest.json with complete PWA metadata
- Added service worker registration in app layout
- Created ServiceWorkerRegistration component for client-side registration
- Generated SVG icons for PWA (192x192 and 512x512)
- Added PWA meta tags for iOS Safari support

Validates Requirements: 4.1, 4.3, 4.4
This commit is contained in:
2025-12-01 20:30:07 +00:00
parent 4f29a48ae1
commit ef6a0bf5af
10 changed files with 369 additions and 9 deletions

7
public/icon-192.svg Normal file
View File

@@ -0,0 +1,7 @@
<svg width="192" height="192" viewBox="0 0 192 192" xmlns="http://www.w3.org/2000/svg">
<rect width="192" height="192" rx="48" fill="#3B82F6"/>
<path d="M57.599999999999994 96L86.4 124.80000000000001L134.39999999999998 67.19999999999999"
stroke="white" stroke-width="15.36" stroke-linecap="round" stroke-linejoin="round"/>
<rect x="48" y="115.19999999999999" width="96" height="15.36" rx="3.84" fill="white"/>
<rect x="48" y="138.24" width="76.80000000000001" height="15.36" rx="3.84" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 523 B