feat: Phase 5.3 - PWA Offline Support with Workbox
Code Style & Quality / Laravel Pint (push) Waiting to run
Code Style & Quality / PHPStan Static Analysis (push) Waiting to run
Code Style & Quality / Test Suite (push) Waiting to run
Code Style & Quality / Browser Tests (Dusk) (push) Waiting to run

- Add vite-plugin-pwa + workbox-window
- Configure PWA manifest with icons (SVG)
- Configure Workbox runtime caching:
  - API routes: NetworkFirst (10s timeout, 100 entries, 24h)
  - Media files: CacheFirst (50 entries, 7 days)
  - Pages: NetworkFirst (10s timeout, 50 entries, 24h)
- Register service worker in app.js with update notification
- Generate icons (SVG) for all sizes

Tests: 101 passing (319 assertions)
This commit is contained in:
Javier Braña
2026-09-01 14:00:14 +02:00
parent 55b1a9276a
commit 356c4773fc
12 changed files with 4637 additions and 33 deletions
+4
View File
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 100 100">
<rect width="100" height="100" rx="20" fill="#2563eb"/>
<text x="50" y="62" font-family="Arial, sans-serif" font-size="50" font-weight="bold" fill="white" text-anchor="middle">CP</text>
</svg>

After

Width:  |  Height:  |  Size: 285 B

+4
View File
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="144" height="144" viewBox="0 0 100 100">
<rect width="100" height="100" rx="20" fill="#2563eb"/>
<text x="50" y="62" font-family="Arial, sans-serif" font-size="50" font-weight="bold" fill="white" text-anchor="middle">CP</text>
</svg>

After

Width:  |  Height:  |  Size: 285 B

+4
View File
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="152" height="152" viewBox="0 0 100 100">
<rect width="100" height="100" rx="20" fill="#2563eb"/>
<text x="50" y="62" font-family="Arial, sans-serif" font-size="50" font-weight="bold" fill="white" text-anchor="middle">CP</text>
</svg>

After

Width:  |  Height:  |  Size: 285 B

+4
View File
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="192" height="192" viewBox="0 0 100 100">
<rect width="100" height="100" rx="20" fill="#2563eb"/>
<text x="50" y="62" font-family="Arial, sans-serif" font-size="50" font-weight="bold" fill="white" text-anchor="middle">CP</text>
</svg>

After

Width:  |  Height:  |  Size: 285 B

+4
View File
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="384" height="384" viewBox="0 0 100 100">
<rect width="100" height="100" rx="20" fill="#2563eb"/>
<text x="50" y="62" font-family="Arial, sans-serif" font-size="50" font-weight="bold" fill="white" text-anchor="middle">CP</text>
</svg>

After

Width:  |  Height:  |  Size: 285 B

+4
View File
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 100 100">
<rect width="100" height="100" rx="20" fill="#2563eb"/>
<text x="50" y="62" font-family="Arial, sans-serif" font-size="50" font-weight="bold" fill="white" text-anchor="middle">CP</text>
</svg>

After

Width:  |  Height:  |  Size: 285 B

+4
View File
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" viewBox="0 0 100 100">
<rect width="100" height="100" rx="20" fill="#2563eb"/>
<text x="50" y="62" font-family="Arial, sans-serif" font-size="50" font-weight="bold" fill="white" text-anchor="middle">CP</text>
</svg>

After

Width:  |  Height:  |  Size: 283 B

+4
View File
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="96" height="96" viewBox="0 0 100 100">
<rect width="100" height="100" rx="20" fill="#2563eb"/>
<text x="50" y="62" font-family="Arial, sans-serif" font-size="50" font-weight="bold" fill="white" text-anchor="middle">CP</text>
</svg>

After

Width:  |  Height:  |  Size: 283 B