feat(family): deploy Single-Writer DuckDB backend, Mila parent cockpit & feeding analytics, and Moritz macro tracker
|
After Width: | Height: | Size: 8.8 KiB |
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"id": "/tracking/mila/",
|
||||
"name": "Mila — Schlaf & Entwicklung",
|
||||
"short_name": "Mila",
|
||||
"description": "Schlaf-, Trink- und Windeltagebuch für Mila Graf",
|
||||
"start_url": "/tracking/mila/",
|
||||
"scope": "/tracking/mila/",
|
||||
"display": "standalone",
|
||||
"orientation": "portrait-primary",
|
||||
"background_color": "#090A0F",
|
||||
"theme_color": "#090A0F",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/tracking/mila/mila-icon-192-v3.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/tracking/mila/mila-icon-192-v3.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "/tracking/mila/mila-icon-512-v3.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/tracking/mila/mila-icon-512-v3.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "/tracking/mila/mila-apple-touch-icon-v3.png",
|
||||
"sizes": "180x180",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/tracking/mila/mila-icon.svg",
|
||||
"sizes": "any",
|
||||
"type": "image/svg+xml"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 593 B |
|
After Width: | Height: | Size: 593 B |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 164 KiB |
|
After Width: | Height: | Size: 164 KiB |
|
After Width: | Height: | Size: 219 KiB |
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"id": "/tracking/mila/",
|
||||
"name": "Mila — Schlaf & Entwicklung",
|
||||
"short_name": "Mila",
|
||||
"description": "Schlaf-, Trink- und Windeltagebuch für Mila Graf",
|
||||
"start_url": "/tracking/mila/",
|
||||
"scope": "/tracking/mila/",
|
||||
"display": "standalone",
|
||||
"orientation": "portrait-primary",
|
||||
"background_color": "#090A0F",
|
||||
"theme_color": "#090A0F",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/tracking/mila/mila-icon-192-v3.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/tracking/mila/mila-icon-192-v3.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "/tracking/mila/mila-icon-512-v3.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/tracking/mila/mila-icon-512-v3.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "/tracking/mila/mila-apple-touch-icon-v3.png",
|
||||
"sizes": "180x180",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/tracking/mila/mila-icon.svg",
|
||||
"sizes": "any",
|
||||
"type": "image/svg+xml"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
// Minimal service worker for Mila PWA with instant cache-bypassing navigation
|
||||
const CACHE_NAME = 'mila-pwa-v5';
|
||||
|
||||
self.addEventListener('install', (event) => {
|
||||
self.skipWaiting();
|
||||
});
|
||||
|
||||
self.addEventListener('activate', (event) => {
|
||||
event.waitUntil(
|
||||
caches.keys().then((keys) =>
|
||||
Promise.all(
|
||||
keys.map((key) => {
|
||||
if (key !== CACHE_NAME) return caches.delete(key);
|
||||
})
|
||||
)
|
||||
).then(() => self.clients.claim())
|
||||
);
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', (event) => {
|
||||
if (event.request.method !== 'GET') return;
|
||||
|
||||
// For HTML documents/navigations: ALWAYS bypass HTTP cache to get latest live server rendering
|
||||
if (event.request.destination === 'document' || event.request.mode === 'navigate') {
|
||||
event.respondWith(
|
||||
fetch(event.request, { cache: 'no-cache' })
|
||||
.then((response) => {
|
||||
if (response && response.status === 200) {
|
||||
const clone = response.clone();
|
||||
caches.open(CACHE_NAME).then((cache) => cache.put(event.request, clone));
|
||||
}
|
||||
return response;
|
||||
})
|
||||
.catch(() => caches.match(event.request))
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// Assets (images, fonts, scripts): network-first with offline cache fallback
|
||||
event.respondWith(
|
||||
fetch(event.request)
|
||||
.then((response) => {
|
||||
if (response && response.status === 200) {
|
||||
const clone = response.clone();
|
||||
caches.open(CACHE_NAME).then((cache) => cache.put(event.request, clone));
|
||||
}
|
||||
return response;
|
||||
})
|
||||
.catch(() => caches.match(event.request))
|
||||
);
|
||||
});
|
||||