Initial commit

This commit is contained in:
2026-07-18 23:50:32 +02:00
commit 8baba7b51f
98 changed files with 30017 additions and 0 deletions

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

7
frontend/public/icon.svg Normal file
View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View 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
View 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();
});

View 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()),
},
})