Initial commit
10
frontend/public/favicon.svg
Normal file
@@ -0,0 +1,10 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<defs>
|
||||
<linearGradient id="g" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" stop-color="#4ecdc4"/>
|
||||
<stop offset="100%" stop-color="#ff6b9d"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="32" height="32" rx="7" fill="url(#g)"/>
|
||||
<text x="16" y="22" text-anchor="middle" font-size="18" fill="#0d0d0f">⚒</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 408 B |
BIN
frontend/public/icon-192.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
frontend/public/icon-512.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
7
frontend/public/icon.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
||||
<rect width="512" height="512" rx="80" fill="#0d0d0f"/>
|
||||
<rect x="40" y="40" width="432" height="432" rx="60" fill="#111114"/>
|
||||
<text x="256" y="200" text-anchor="middle" font-family="monospace" font-weight="bold" font-size="140" fill="#4ecdc4">DD</text>
|
||||
<text x="256" y="340" text-anchor="middle" font-family="monospace" font-size="52" fill="rgba(255,255,255,0.35)">DOCK</text>
|
||||
<rect x="100" y="370" width="312" height="3" rx="2" fill="#4ecdc4" opacity="0.4"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 540 B |
BIN
frontend/public/koepi/aldi.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
frontend/public/koepi/edeka.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
frontend/public/koepi/hornbach.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
frontend/public/koepi/kasten_033.png
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
frontend/public/koepi/kasten_033_05.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
frontend/public/koepi/kasten_033_055.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
frontend/public/koepi/kasten_050.png
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
frontend/public/koepi/kasten_11er.png
Normal file
|
After Width: | Height: | Size: 112 KiB |
BIN
frontend/public/koepi/kasten_lang.png
Normal file
|
After Width: | Height: | Size: 112 KiB |
BIN
frontend/public/koepi/kasten_steini.png
Normal file
|
After Width: | Height: | Size: 104 KiB |
BIN
frontend/public/koepi/kaufland.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
frontend/public/koepi/koepi_platzhalter.png
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
frontend/public/koepi/lidl.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
frontend/public/koepi/netto.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
frontend/public/koepi/netto_getraenkemarkt.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
frontend/public/koepi/palette_050.png
Normal file
|
After Width: | Height: | Size: 100 KiB |
BIN
frontend/public/koepi/penny.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
frontend/public/koepi/rewe.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
frontend/public/koepi/traeger.png
Normal file
|
After Width: | Height: | Size: 129 KiB |
BIN
frontend/public/koepi/trinkgut.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
28
frontend/public/manifest.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "Dicken Dock",
|
||||
"short_name": "DickenDock",
|
||||
"description": "Dein 3D-Druck Verwaltungstool",
|
||||
"start_url": "/",
|
||||
"display": "standalone",
|
||||
"orientation": "portrait",
|
||||
"background_color": "#0d0d0f",
|
||||
"theme_color": "#4ecdc4",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/favicon.svg",
|
||||
"type": "image/svg+xml",
|
||||
"sizes": "any",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "/icon-192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
},
|
||||
{
|
||||
"src": "/icon-512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
]
|
||||
}
|
||||
55
frontend/public/sw.js
Normal file
@@ -0,0 +1,55 @@
|
||||
// Service Worker – Version wird zur Build-Zeit injiziert via Dockerfile
|
||||
// Dadurch erkennt der Browser bei jedem Deploy einen neuen SW → Cache-Purge
|
||||
const VERSION = '__BUILD_VERSION__'; // wird im Dockerfile ersetzt
|
||||
const CACHE_NAME = 'dickendock-' + VERSION;
|
||||
|
||||
self.addEventListener('install', () => {
|
||||
self.skipWaiting(); // neuen SW sofort übernehmen
|
||||
});
|
||||
|
||||
self.addEventListener('activate', e => {
|
||||
e.waitUntil((async () => {
|
||||
// alle alten Caches löschen
|
||||
const keys = await caches.keys();
|
||||
await Promise.all(keys.filter(k => k !== CACHE_NAME).map(k => caches.delete(k)));
|
||||
await self.clients.claim();
|
||||
// allen offenen Clients sagen: neue Version aktiv → reload
|
||||
const clients = await self.clients.matchAll({ type: 'window' });
|
||||
clients.forEach(c => c.postMessage({ type: 'SW_ACTIVATED', version: VERSION }));
|
||||
})());
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', e => {
|
||||
const url = new URL(e.request.url);
|
||||
|
||||
// Cross-Origin-Requests nicht abfangen
|
||||
if (url.origin !== self.location.origin) return;
|
||||
|
||||
// API immer direkt ans Netz
|
||||
if (url.pathname.startsWith('/api/')) {
|
||||
e.respondWith(fetch(e.request));
|
||||
return;
|
||||
}
|
||||
|
||||
// sw.js selbst nie cachen
|
||||
if (url.pathname === '/sw.js') {
|
||||
e.respondWith(fetch(e.request, { cache: 'no-store' }));
|
||||
return;
|
||||
}
|
||||
|
||||
// HTML-Navigation: IMMER frisch vom Netzwerk
|
||||
if (e.request.mode === 'navigate') {
|
||||
e.respondWith(
|
||||
fetch(e.request, { cache: 'reload' })
|
||||
.catch(() => caches.match('/index.html'))
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// Same-Origin Assets: durchreichen
|
||||
e.respondWith(fetch(e.request).catch(() => caches.match(e.request)));
|
||||
});
|
||||
|
||||
self.addEventListener('message', e => {
|
||||
if (e.data === 'SKIP_WAITING') self.skipWaiting();
|
||||
});
|
||||
10
frontend/public/vite.config.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
server: { proxy: { '/api': 'http://localhost:4000' } },
|
||||
define: {
|
||||
__BUILD_TIME__: JSON.stringify(new Date().toISOString()),
|
||||
},
|
||||
})
|
||||