commit f2615c9e07e56dd7a6a3fdf6fcb415c3cad223e9 Author: rene Date: Sun May 17 11:31:13 2026 +0200 Initial commit: SvelteKit PWA + PocketBase Setup für checkflo.de - Landing Page mit Logo, Hero, Features, Steps, CTA - QR-Scan Checklisten-Flow (/s/[id]) - PocketBase Client (pb.ts) - Makefile für DS-Deployment (SSH) - Setup-Scripts: setup-db.sh, seed-demo.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4b987cf --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.env +.env.* +*.local +.DS_Store diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f7dbd78 --- /dev/null +++ b/Makefile @@ -0,0 +1,110 @@ +# ============================================================== +# CHECKFLO — Makefile +# Deploy-Strategie: SSH zur DS, Docker Compose +# ============================================================== + +DS_HOST := ds +DS_IP := 10.47.11.10 +DS_SSH_PORT := 4711 +DS_PATH := /volume1/docker/checkflo +CONTAINER_PB := checkflo-pocketbase +DOCKER := sudo /usr/local/bin/docker + +.PHONY: help check-ssh start stop restart status logs logs-f shell-pb pb-admin + +# ---------------------------------------------------------- +# Hilfe +# ---------------------------------------------------------- +help: + @echo "" + @echo " Checkflo — verfügbare Befehle:" + @echo "" + @echo " make start PocketBase starten" + @echo " make stop PocketBase stoppen" + @echo " make restart PocketBase neu starten" + @echo " make status Container-Status anzeigen" + @echo "" + @echo " make logs Letzte 100 Zeilen" + @echo " make logs-f Live-Log-Stream" + @echo " make shell-pb Shell in PocketBase-Container" + @echo " make pb-admin PocketBase Admin-URL anzeigen" + @echo "" + +# ---------------------------------------------------------- +# SSH-Prüfung +# ---------------------------------------------------------- +check-ssh: + @if ! nc -z -w3 $(DS_IP) $(DS_SSH_PORT) 2>/dev/null; then \ + echo ""; \ + echo " ✗ DS nicht erreichbar ($(DS_IP):$(DS_SSH_PORT))"; \ + echo ""; \ + exit 1; \ + fi + +# ---------------------------------------------------------- +# START +# ---------------------------------------------------------- +start: check-ssh + @ssh $(DS_HOST) "cd $(DS_PATH) && $(DOCKER) compose up -d" + @echo " ✓ PocketBase gestartet." + +# ---------------------------------------------------------- +# STOP +# ---------------------------------------------------------- +stop: check-ssh + @ssh $(DS_HOST) "cd $(DS_PATH) && $(DOCKER) compose down" + @echo " ✓ Gestoppt." + +# ---------------------------------------------------------- +# RESTART +# ---------------------------------------------------------- +restart: check-ssh + @ssh $(DS_HOST) "cd $(DS_PATH) && $(DOCKER) compose restart" + @echo " ✓ Neugestartet." + +# ---------------------------------------------------------- +# STATUS +# ---------------------------------------------------------- +status: check-ssh + @ssh $(DS_HOST) "$(DOCKER) ps \ + --filter name=$(CONTAINER_PB) \ + --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}'" + +# ---------------------------------------------------------- +# LOGS +# ---------------------------------------------------------- +logs: check-ssh + @ssh $(DS_HOST) "$(DOCKER) logs $(CONTAINER_PB) --tail=100" + +logs-f: check-ssh + @ssh $(DS_HOST) "$(DOCKER) logs $(CONTAINER_PB) -f" + +# ---------------------------------------------------------- +# SHELL in PocketBase +# ---------------------------------------------------------- +shell-pb: check-ssh + @ssh -t $(DS_HOST) "$(DOCKER) exec -it $(CONTAINER_PB) sh" + +# ---------------------------------------------------------- +# POCKETBASE Admin +# ---------------------------------------------------------- +pb-admin: + @echo " PocketBase Admin: https://api.checkflo.de/_/" + +# ---------------------------------------------------------- +# SETUP-DB — Datenmodell in PocketBase anlegen +# ---------------------------------------------------------- +setup-db: + @PB_URL=https://api.checkflo.de \ + PB_EMAIL=$(PB_EMAIL) \ + PB_PASSWORD=$(PB_PASSWORD) \ + ./scripts/setup-db.sh + +# ---------------------------------------------------------- +# SEED-DEMO — Demo-Tenant mit Stationen anlegen +# ---------------------------------------------------------- +seed-demo: + @PB_URL=https://api.checkflo.de \ + PB_EMAIL=$(PB_EMAIL) \ + PB_PASSWORD=$(PB_PASSWORD) \ + ./scripts/seed-demo.sh diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..3b462cb --- /dev/null +++ b/app/.gitignore @@ -0,0 +1,23 @@ +node_modules + +# Output +.output +.vercel +.netlify +.wrangler +/.svelte-kit +/build + +# OS +.DS_Store +Thumbs.db + +# Env +.env +.env.* +!.env.example +!.env.test + +# Vite +vite.config.js.timestamp-* +vite.config.ts.timestamp-* diff --git a/app/.npmrc b/app/.npmrc new file mode 100644 index 0000000..b6f27f1 --- /dev/null +++ b/app/.npmrc @@ -0,0 +1 @@ +engine-strict=true diff --git a/app/.vscode/extensions.json b/app/.vscode/extensions.json new file mode 100644 index 0000000..28d1e67 --- /dev/null +++ b/app/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["svelte.svelte-vscode"] +} diff --git a/app/README.md b/app/README.md new file mode 100644 index 0000000..fcf8305 --- /dev/null +++ b/app/README.md @@ -0,0 +1,42 @@ +# sv + +Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli). + +## Creating a project + +If you're seeing this, you've probably already done this step. Congrats! + +```sh +# create a new project +npx sv create my-app +``` + +To recreate this project with the same configuration: + +```sh +# recreate this project +npx sv@0.15.3 create --template minimal --types ts --install yarn app +``` + +## Developing + +Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: + +```sh +npm run dev + +# or start the server and open the app in a new browser tab +npm run dev -- --open +``` + +## Building + +To create a production version of your app: + +```sh +npm run build +``` + +You can preview the production build with `npm run preview`. + +> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment. diff --git a/app/package-lock.json b/app/package-lock.json new file mode 100644 index 0000000..3fecc98 --- /dev/null +++ b/app/package-lock.json @@ -0,0 +1,1385 @@ +{ + "name": "app", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "app", + "version": "0.0.1", + "dependencies": { + "pocketbase": "^0.26.9" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^7.0.1", + "@sveltejs/kit": "^2.57.0", + "@sveltejs/vite-plugin-svelte": "^7.0.0", + "svelte": "^5.55.2", + "svelte-check": "^4.4.6", + "typescript": "^6.0.2", + "vite": "^8.0.7" + } + }, + "node_modules/@emnapi/core": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", + "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.1", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", + "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", + "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.4.tgz", + "integrity": "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.130.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.130.0.tgz", + "integrity": "sha512-ibD2usx9JRu7f5pu2tMKMI4cpA4NgXJQoYRP4pQ7Pxmn1l6k/53qWtQWZayhYy3X4QZkt90Ot+mJEaeXouio6Q==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, + "node_modules/@polka/url": { + "version": "1.0.0-next.29", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz", + "integrity": "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.1.tgz", + "integrity": "sha512-fJI3I0r3C3Oj/zdBCpaCmBRZYf07xpaq4yCfDDoSFm+beWNzbIl26puW8RraUdugoJw/95zerNOn6jasAhzSmg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.1.tgz", + "integrity": "sha512-cKnAhWEsV7TPcA/5EAteDp6KcJZBQ2G+BqE7zayMMi7kMvwRsbv7WT9aOnn0WNl4SKEIf43vjS31iUPu80nzXg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.1.tgz", + "integrity": "sha512-YKrVwQjIRBPo+5G/u03wGjbdy4q7pyzCe93DK9VJ7zkVmeg8LJ7GbgsiHWdR4xSoe4CAXRD7Bcjgbtr64bkXNg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.1.tgz", + "integrity": "sha512-z/oBsREo46SsFqBwYtFe0kpJeBijAT48O/WXLI4suiCLBkr03RTtTJMCzSdDd2znlh8VJizL09XVkQgk8IZonw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.1.tgz", + "integrity": "sha512-ik8q7GM11zxvYxFc2PeDcT6TBvhCQMaUxfph/M5l9sKuTs/Sjg3L+Byw0F7w0ZVLBZmx30P+gG0ECzzN+MFcmQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.1.tgz", + "integrity": "sha512-QoSx2EkyrrdZ6kcyE8stqZ62t0Yra8Fs5ia9lOxJrh6TMQJK7gQKmscdTHf7pOXKREKrVwOtJcQG3qVSfc866A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.1.tgz", + "integrity": "sha512-uwNwFpwKeNiZawfAWBgg0VIztPTV3ihhh1vV334h9ivnNLorxnQMU6Fz8wG1Zb4Qh9LC1/MkcyT3YlDXG3Rsgg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.1.tgz", + "integrity": "sha512-zY1bul7OWr7DFBiJ++wofXvnr8B45ce3QsQUhKrIhXsygAh7bTkwyeM1bi1a2g5C/yC/N8TZyGDEoMfm/l9mpg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.1.tgz", + "integrity": "sha512-0frlsT/f4Ft6I7SMESTKnF3cZsdicQn1dCMkF/jT9wDLE+gGoiQfv1nmT9e+s7s/fekvvy6tZM2jHvI2tkbJDQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.1.tgz", + "integrity": "sha512-XABVmGp9Tg0WspTVvwduTc4fpqy6JnAUrSQe6OuyqD/03nI7r0O9OWUkMIwFrjKAIqolvqoA4ZrJppgwE0Gxmw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.1.tgz", + "integrity": "sha512-bV4fzswuzVcKD90o/VM6QqKxnxlDq0g2BISDLNVmxrnhpv1DDbyPhCIjYfvzYLV+MvkKKnQt2Q6AO86SEBULUQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.1.tgz", + "integrity": "sha512-/Mh0Zhq3OP7fVs0kcQHZP6lZEthMGTaSf8UBQYSFEZDWGXXlEC+nJ6EqenaK2t4LBXMe3A+K/G2BVXXdtOr4PQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.1.tgz", + "integrity": "sha512-+1xc9X45l8ufsBAm6Gjvx2qDRIY9lTVt0cgWNcJ+1gdhXvkbxePA60yRTwSTuXL09CMhyJmjpV7E3NoyxbqFQQ==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "1.10.0", + "@emnapi/runtime": "1.10.0", + "@napi-rs/wasm-runtime": "^1.1.4" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.1.tgz", + "integrity": "sha512-1D+UqZdfnuR+Jy1GgMJwi85bD40H21uNmOPRWQhw4oRSuolZ/B5rixZ45DK2KXOTCvmVCecauWgEhbw8bI7tOw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.1.tgz", + "integrity": "sha512-INAycaWuhlOK3wk4mRHGsdgwYWmd9cChdPdE9bwWmy6rn9VqVNYNFGhOdXrofXUxwHIncSiPNb8tNm8knDVIeQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sveltejs/acorn-typescript": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@sveltejs/acorn-typescript/-/acorn-typescript-1.0.9.tgz", + "integrity": "sha512-lVJX6qEgs/4DOcRTpo56tmKzVPtoWAaVbL4hfO7t7NVwl9AAXzQR6cihesW1BmNMPl+bK6dreu2sOKBP2Q9CIA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^8.9.0" + } + }, + "node_modules/@sveltejs/adapter-auto": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-7.0.1.tgz", + "integrity": "sha512-dvuPm1E7M9NI/+canIQ6KKQDU2AkEefEZ2Dp7cY6uKoPq9Z/PhOXABe526UdW2mN986gjVkuSLkOYIBnS/M2LQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@sveltejs/kit": "^2.0.0" + } + }, + "node_modules/@sveltejs/kit": { + "version": "2.60.1", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.60.1.tgz", + "integrity": "sha512-mQjlkNo+rJvpln7V2IGY2j99BqhcFbS4UN0AQNKNYfhBAFZTuCDAdW3a1sgf330mvtNvsBXn3HpAhcmvdJTcIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.0.0", + "@sveltejs/acorn-typescript": "^1.0.5", + "@types/cookie": "^0.6.0", + "acorn": "^8.14.1", + "cookie": "^0.6.0", + "devalue": "^5.8.1", + "esm-env": "^1.2.2", + "kleur": "^4.1.5", + "magic-string": "^0.30.5", + "mrmime": "^2.0.0", + "set-cookie-parser": "^3.0.0", + "sirv": "^3.0.0" + }, + "bin": { + "svelte-kit": "svelte-kit.js" + }, + "engines": { + "node": ">=18.13" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1 || ^5.0.0 || ^6.0.0-next.0 || ^7.0.0", + "svelte": "^4.0.0 || ^5.0.0-next.0", + "typescript": "^5.3.3 || ^6.0.0", + "vite": "^5.0.3 || ^6.0.0 || ^7.0.0-beta.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@opentelemetry/api": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/@sveltejs/vite-plugin-svelte": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-7.1.2.tgz", + "integrity": "sha512-DrUBA2UXRfDmUX/ZTiEopd3X40yavsJF1FX2RygcuIScHL7o5YX1fMvoYnDhjeJQC4weCOklirpNWlcb2NiSeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "deepmerge": "^4.3.1", + "magic-string": "^0.30.21", + "obug": "^2.1.0", + "vitefu": "^1.1.2" + }, + "engines": { + "node": "^20.19 || ^22.12 || >=24" + }, + "peerDependencies": { + "svelte": "^5.46.4", + "vite": "^8.0.0-beta.7 || ^8.0.0" + } + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz", + "integrity": "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@types/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "dev": true, + "license": "MIT" + }, + "node_modules/acorn": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/aria-query": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.1.tgz", + "integrity": "sha512-Z/ZeOgVl7bcSYZ/u/rh0fOpvEpq//LZmdbkXyc7syVzjPAhfOa9ebsdTSjEBDU4vs5nC98Kfduj1uFo0qyET3g==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/axobject-query": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", + "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/devalue": { + "version": "5.8.1", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.8.1.tgz", + "integrity": "sha512-4CXDYRBGqN+57wVJkuXBYmpAVUSg3L6JAQa/DFqm238G73E1wuyc/JhGQJzN7vUf/CMphYau2zXbfWzDR5aTEw==", + "dev": true, + "license": "MIT" + }, + "node_modules/esm-env": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.2.2.tgz", + "integrity": "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/esrap": { + "version": "2.2.9", + "resolved": "https://registry.npmjs.org/esrap/-/esrap-2.2.9.tgz", + "integrity": "sha512-4KijP+NxCWthMCUC3qHbE6n4vCjqgJS1uAYKhuT/GWfFTf1Qyive2TgOjep+gzbSzRfnNyaN/UU9YmdOt8Eg0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "peerDependencies": { + "@typescript-eslint/types": "^8.2.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/types": { + "optional": true + } + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/is-reference": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz", + "integrity": "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.6" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/locate-character": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", + "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", + "dev": true, + "license": "MIT" + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/mrmime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz", + "integrity": "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/nanoid": { + "version": "3.3.12", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz", + "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/obug": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.1.tgz", + "integrity": "sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==", + "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pocketbase": { + "version": "0.26.9", + "resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.26.9.tgz", + "integrity": "sha512-Tiv1/hNuUzRdvT0d8hF03dfzuefQ1WdSRp1A1q3wzFC/WYhQcbU/Qlaubl/3ZDo6xvFXBS8JAgBS/L+ms7nkVQ==", + "license": "MIT" + }, + "node_modules/postcss": { + "version": "8.5.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.14.tgz", + "integrity": "sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/rolldown": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.1.tgz", + "integrity": "sha512-X0KQHljNnEkWNqqiz9zJrGunh1B0HgOxLXvnFpCOcadzcy5qohZ3tqMEUg00vncoRovXuK3ZqCT9KnnKzoInFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.130.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm64": "1.0.1", + "@rolldown/binding-darwin-arm64": "1.0.1", + "@rolldown/binding-darwin-x64": "1.0.1", + "@rolldown/binding-freebsd-x64": "1.0.1", + "@rolldown/binding-linux-arm-gnueabihf": "1.0.1", + "@rolldown/binding-linux-arm64-gnu": "1.0.1", + "@rolldown/binding-linux-arm64-musl": "1.0.1", + "@rolldown/binding-linux-ppc64-gnu": "1.0.1", + "@rolldown/binding-linux-s390x-gnu": "1.0.1", + "@rolldown/binding-linux-x64-gnu": "1.0.1", + "@rolldown/binding-linux-x64-musl": "1.0.1", + "@rolldown/binding-openharmony-arm64": "1.0.1", + "@rolldown/binding-wasm32-wasi": "1.0.1", + "@rolldown/binding-win32-arm64-msvc": "1.0.1", + "@rolldown/binding-win32-x64-msvc": "1.0.1" + } + }, + "node_modules/sade": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", + "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "mri": "^1.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/set-cookie-parser": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-3.1.0.tgz", + "integrity": "sha512-kjnC1DXBHcxaOaOXBHBeRtltsDG2nUiUni+jP92M9gYdW12rsmx92UsfpH7o5tDRs7I1ZZPSQJQGv3UaRfCiuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/sirv": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.2.tgz", + "integrity": "sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/svelte": { + "version": "5.55.7", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.55.7.tgz", + "integrity": "sha512-ymI5ykLPwIHW839E053FQbI1G+jnRFJEw3Kv5Y4njixVWywQBx+NUFpkkKyk5LIb36Fg9DVXSYpqiGekLD0hyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.4", + "@jridgewell/sourcemap-codec": "^1.5.0", + "@sveltejs/acorn-typescript": "^1.0.5", + "@types/estree": "^1.0.5", + "@types/trusted-types": "^2.0.7", + "acorn": "^8.12.1", + "aria-query": "5.3.1", + "axobject-query": "^4.1.0", + "clsx": "^2.1.1", + "devalue": "^5.8.1", + "esm-env": "^1.2.1", + "esrap": "^2.2.4", + "is-reference": "^3.0.3", + "locate-character": "^3.0.0", + "magic-string": "^0.30.11", + "zimmerframe": "^1.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/svelte-check": { + "version": "4.4.8", + "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.4.8.tgz", + "integrity": "sha512-67adfgBox5eNSNIvIIwgFizKGdcRrGpiMoNO2obHcYuLz7iTa8Xgm/NGU3ntMFnNm8K1grFOIG6HhMLX/vcN8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "chokidar": "^4.0.1", + "fdir": "^6.2.0", + "picocolors": "^1.0.0", + "sade": "^1.7.4" + }, + "bin": { + "svelte-check": "bin/svelte-check" + }, + "engines": { + "node": ">= 18.0.0" + }, + "peerDependencies": { + "svelte": "^4.0.0 || ^5.0.0-next.0", + "typescript": ">=5.0.0" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/totalist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", + "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD", + "optional": true + }, + "node_modules/typescript": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/vite": { + "version": "8.0.13", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.13.tgz", + "integrity": "sha512-MFtjBYgzmSxmgA4RAfjIyXWpGe1oALnjgUTzzV7QLx/TKxCzjtMH6Fd9/eVK+5Fg1qNoz5VAwsmMs/NofrmJvw==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.32.0", + "picomatch": "^4.0.4", + "postcss": "^8.5.14", + "rolldown": "1.0.1", + "tinyglobby": "^0.2.16" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.1.18", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vitefu": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.1.3.tgz", + "integrity": "sha512-ub4okH7Z5KLjb6hDyjqrGXqWtWvoYdU3IGm/NorpgHncKoLTCfRIbvlhBm7r0YstIaQRYlp4yEbFqDcKSzXSSg==", + "dev": true, + "license": "MIT", + "workspaces": [ + "tests/deps/*", + "tests/projects/*", + "tests/projects/workspace/packages/*" + ], + "peerDependencies": { + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + } + } + }, + "node_modules/zimmerframe": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/zimmerframe/-/zimmerframe-1.1.4.tgz", + "integrity": "sha512-B58NGBEoc8Y9MWWCQGl/gq9xBCe4IiKM0a2x7GZdQKOW5Exr8S1W24J6OgM1njK8xCRGvAJIL/MxXHf6SkmQKQ==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/app/package.json b/app/package.json new file mode 100644 index 0000000..66d9909 --- /dev/null +++ b/app/package.json @@ -0,0 +1,26 @@ +{ + "name": "app", + "private": true, + "version": "0.0.1", + "type": "module", + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "prepare": "svelte-kit sync || echo ''", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^7.0.1", + "@sveltejs/kit": "^2.57.0", + "@sveltejs/vite-plugin-svelte": "^7.0.0", + "svelte": "^5.55.2", + "svelte-check": "^4.4.6", + "typescript": "^6.0.2", + "vite": "^8.0.7" + }, + "dependencies": { + "pocketbase": "^0.26.9" + } +} diff --git a/app/src/app.d.ts b/app/src/app.d.ts new file mode 100644 index 0000000..da08e6d --- /dev/null +++ b/app/src/app.d.ts @@ -0,0 +1,13 @@ +// See https://svelte.dev/docs/kit/types#app.d.ts +// for information about these interfaces +declare global { + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface PageState {} + // interface Platform {} + } +} + +export {}; diff --git a/app/src/app.html b/app/src/app.html new file mode 100644 index 0000000..6a2bb58 --- /dev/null +++ b/app/src/app.html @@ -0,0 +1,12 @@ + + + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ + diff --git a/app/src/lib/assets/checkflo-logo.png b/app/src/lib/assets/checkflo-logo.png new file mode 100644 index 0000000..6f7f0dc Binary files /dev/null and b/app/src/lib/assets/checkflo-logo.png differ diff --git a/app/src/lib/assets/favicon.svg b/app/src/lib/assets/favicon.svg new file mode 100644 index 0000000..cc5dc66 --- /dev/null +++ b/app/src/lib/assets/favicon.svg @@ -0,0 +1 @@ +svelte-logo \ No newline at end of file diff --git a/app/src/lib/index.ts b/app/src/lib/index.ts new file mode 100644 index 0000000..856f2b6 --- /dev/null +++ b/app/src/lib/index.ts @@ -0,0 +1 @@ +// place files you want to import through the `$lib` alias in this folder. diff --git a/app/src/lib/pb.ts b/app/src/lib/pb.ts new file mode 100644 index 0000000..c51f817 --- /dev/null +++ b/app/src/lib/pb.ts @@ -0,0 +1,14 @@ +import PocketBase from 'pocketbase'; +import { browser } from '$app/environment'; + +const PB_URL = 'https://api.checkflo.de'; + +export const pb = new PocketBase(PB_URL); + +// Auth-State nur im Browser persistieren +if (browser) { + pb.authStore.loadFromCookie(document.cookie); + pb.authStore.onChange(() => { + document.cookie = pb.authStore.exportToCookie({ httpOnly: false }); + }); +} diff --git a/app/src/routes/+layout.svelte b/app/src/routes/+layout.svelte new file mode 100644 index 0000000..c57c9c5 --- /dev/null +++ b/app/src/routes/+layout.svelte @@ -0,0 +1,31 @@ + + + + + + checkflo — Digitale HACCP-Protokolle + + +{@render children()} + + diff --git a/app/src/routes/+page.svelte b/app/src/routes/+page.svelte new file mode 100644 index 0000000..8486725 --- /dev/null +++ b/app/src/routes/+page.svelte @@ -0,0 +1,281 @@ + + + + + + +
+
+

HACCP-Dokumentation für die Gastronomie

+

Prüfprotokolle.
Ohne Papier.
Ohne App-Store.

+

+ Kühlschranktemperaturen, Hygienekontrollen und Wartungsnachweise — + digital erfasst, automatisch protokolliert, jederzeit abrufbar. +

+ +
+
+ + +
+
+

In 3 Schritten zum digitalen Protokoll

+
+
+
1
+

QR-Code aufkleben

+

Robuste NFC/QR-Tags direkt am Kühlschrank, Warmhaltebehälter oder an der Hygiene-Station.

+
+
+
2
+

Scannen & ausfüllen

+

Techniker scannt den Code, trägt Temperatur ein, macht bei Abweichung ein Foto — fertig.

+
+
+
3
+

Protokoll abrufen

+

Vollständiges Monatsprotokoll als PDF — für Lebensmittelkontrolle, Franchise-Geber oder eigene Dokumentation.

+
+
+
+
+ + +
+
+

Warum checkflo?

+
+ {#each features as f} +
+ {f.icon} +

{f.title}

+

{f.text}

+
+ {/each} +
+
+
+ + +
+
+

Bereit für papierlose HACCP-Dokumentation?

+

Für Gastronomie, Kantinen, Caterer und Lebensmittelverarbeiter.

+ Jetzt Demo vereinbaren +
+
+ + + + + diff --git a/app/src/routes/s/[id]/+page.svelte b/app/src/routes/s/[id]/+page.svelte new file mode 100644 index 0000000..6b496f3 --- /dev/null +++ b/app/src/routes/s/[id]/+page.svelte @@ -0,0 +1,356 @@ + + + + {station.name} — checkflo + + +
+ + +
+
{tenant?.name ?? 'checkflo'}
+
{station.name}
+ {#if station.target_temp_min || station.target_temp_max} +
+ Zielbereich: {station.target_temp_min}° bis {station.target_temp_max}°C +
+ {/if} +
+ + + {#if submitted} +
+
+

Erfasst um {submittedAt} Uhr

+

Der Eintrag wurde gespeichert.

+ +
+ + + {:else} +
{ e.preventDefault(); submit(); }}> + + + {#if showTemp} +
+ + +
+ {/if} + + +
+ Status * +
+ {#each (Object.keys(statusLabels) as Status[]) as s} + + {/each} +
+
+ + + {#if status === 'abweichung' || status === 'kritisch'} +
+ + +
+ {/if} + + +
+ Foto (optional) + {#if photoPreview} + Vorschau + {/if} + +
+ + +
+ + +
+ + {#if error} +

{error}

+ {/if} + + +
+ {/if} + + +
+ + diff --git a/app/src/routes/s/[id]/+page.ts b/app/src/routes/s/[id]/+page.ts new file mode 100644 index 0000000..fc56557 --- /dev/null +++ b/app/src/routes/s/[id]/+page.ts @@ -0,0 +1,15 @@ +import { error } from '@sveltejs/kit'; +import { pb } from '$lib/pb'; + +export const ssr = false; + +export async function load({ params }) { + try { + const station = await pb + .collection('stations') + .getFirstListItem(`qr_id = "${params.id}"`, { expand: 'tenant' }); + return { station }; + } catch { + throw error(404, 'Station nicht gefunden'); + } +} diff --git a/app/static/robots.txt b/app/static/robots.txt new file mode 100644 index 0000000..b6dd667 --- /dev/null +++ b/app/static/robots.txt @@ -0,0 +1,3 @@ +# allow crawling everything by default +User-agent: * +Disallow: diff --git a/app/svelte.config.js b/app/svelte.config.js new file mode 100644 index 0000000..0c3412e --- /dev/null +++ b/app/svelte.config.js @@ -0,0 +1,17 @@ +import adapter from '@sveltejs/adapter-auto'; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + compilerOptions: { + // Force runes mode for the project, except for libraries. Can be removed in svelte 6. + runes: ({ filename }) => (filename.split(/[/\\]/).includes('node_modules') ? undefined : true) + }, + kit: { + // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list. + // If your environment is not supported, or you settled on a specific environment, switch out the adapter. + // See https://svelte.dev/docs/kit/adapters for more information about adapters. + adapter: adapter() + } +}; + +export default config; diff --git a/app/tsconfig.json b/app/tsconfig.json new file mode 100644 index 0000000..2c2ed3c --- /dev/null +++ b/app/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "rewriteRelativeImportExtensions": true, + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "moduleResolution": "bundler" + } + // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias + // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files + // + // To make changes to top-level options such as include and exclude, we recommend extending + // the generated config; see https://svelte.dev/docs/kit/configuration#typescript +} diff --git a/app/vite.config.ts b/app/vite.config.ts new file mode 100644 index 0000000..bbf8c7d --- /dev/null +++ b/app/vite.config.ts @@ -0,0 +1,6 @@ +import { sveltekit } from '@sveltejs/kit/vite'; +import { defineConfig } from 'vite'; + +export default defineConfig({ + plugins: [sveltekit()] +}); diff --git a/logo/checkflo-logo.png b/logo/checkflo-logo.png new file mode 100644 index 0000000..6f7f0dc Binary files /dev/null and b/logo/checkflo-logo.png differ diff --git a/scripts/seed-demo.sh b/scripts/seed-demo.sh new file mode 100755 index 0000000..3061089 --- /dev/null +++ b/scripts/seed-demo.sh @@ -0,0 +1,93 @@ +#!/bin/bash +# Legt den Demo-Tenant mit Stationen an. + +set -euo pipefail + +PB_URL="${PB_URL:-https://api.checkflo.de}" + +if [ -z "${PB_EMAIL:-}" ] || [ -z "${PB_PASSWORD:-}" ]; then + echo "Aufruf: PB_EMAIL=... PB_PASSWORD=... ./seed-demo.sh" + exit 1 +fi + +# Authentifizierung +TOKEN=$(curl -sf -X POST "$PB_URL/api/collections/_superusers/auth-with-password" \ + -H "Content-Type: application/json" \ + -d "{\"identity\":\"$PB_EMAIL\",\"password\":\"$PB_PASSWORD\"}" | jq -r '.token') + +echo "✓ Eingeloggt" + +# ---------------------------------------------------------- +# Tenant: Musterküche GmbH +# ---------------------------------------------------------- +echo "→ Erstelle Demo-Tenant..." +TENANT=$(curl -sf -X POST "$PB_URL/api/collections/tenants/records" \ + -H "Authorization: $TOKEN" \ + -H "Content-Type: application/json" \ + -d '{ + "name": "Musterküche GmbH", + "slug": "musterkueche", + "primary_color": "#e85d04", + "plan": "basic", + "active": true + }') +TENANT_ID=$(echo "$TENANT" | jq -r '.id') +echo "✓ Tenant: Musterküche GmbH ($TENANT_ID)" + +# ---------------------------------------------------------- +# Stationen +# ---------------------------------------------------------- +create_station() { + local name=$1 + local type=$2 + local min=$3 + local max=$4 + local qr_id + qr_id=$(uuidgen | tr '[:upper:]' '[:lower:]') + + curl -sf -X POST "$PB_URL/api/collections/stations/records" \ + -H "Authorization: $TOKEN" \ + -H "Content-Type: application/json" \ + -d "{ + \"tenant\": \"$TENANT_ID\", + \"name\": \"$name\", + \"type\": \"$type\", + \"target_temp_min\": $min, + \"target_temp_max\": $max, + \"qr_id\": \"$qr_id\", + \"active\": true + }" | jq -r '"✓ Station: \(.name) — QR: \(.qr_id)"' +} + +echo "→ Erstelle Stationen..." +create_station "Kühlschrank 1 (Küche)" "kuehlschrank" 1 7 +create_station "Kühlschrank 2 (Getränke)" "kuehlschrank" 1 8 +create_station "Tiefkühlzelle" "tiefkuehl" -22 -18 +create_station "Warmhaltebehälter" "warmhalte" 65 80 +create_station "Wochenhygiene-Check" "hygiene" 0 0 + +# ---------------------------------------------------------- +# Demo-User (Admin des Tenants) +# ---------------------------------------------------------- +echo "→ Erstelle Demo-User..." +curl -sf -X POST "$PB_URL/api/collections/users/records" \ + -H "Authorization: $TOKEN" \ + -H "Content-Type: application/json" \ + -d "{ + \"email\": \"chef@musterkueche.de\", + \"password\": \"Demo1234567!\", + \"passwordConfirm\": \"Demo1234567!\", + \"name\": \"Chef Demo\", + \"tenant\": \"$TENANT_ID\", + \"role\": \"admin\", + \"verified\": true + }" | jq -r '"✓ User: \(.email)"' + +echo "" +echo " ✓ Demo-Daten angelegt:" +echo " Tenant: Musterküche GmbH ($TENANT_ID)" +echo " Login: chef@musterkueche.de / Demo1234567!" +echo " Stationen: 5" +echo "" +echo " QR-Scan URL: https://checkflo.de/s/{qr_id}" +echo "" diff --git a/scripts/setup-db b/scripts/setup-db new file mode 100755 index 0000000..5fda575 --- /dev/null +++ b/scripts/setup-db @@ -0,0 +1,144 @@ +#!/bin/bash +# Legt das PocketBase-Datenmodell für checkflo an. +# Aufruf: PB_EMAIL=... PB_PASSWORD=... ./scripts/setup-db.sh + +set -euo pipefail + +PB_URL="${PB_URL:-https://api.checkflo.de}" + +if [ -z "${PB_EMAIL:-}" ] || [ -z "${PB_PASSWORD:-}" ]; then + echo "Aufruf: PB_EMAIL=admin@... PB_PASSWORD=... ./scripts/setup-db.sh" + exit 1 +fi + +if ! command -v jq &>/dev/null; then + echo "✗ jq nicht gefunden. Installieren: brew install jq" + exit 1 +fi + +echo "→ Verbinde mit $PB_URL ..." + +# Authentifizierung +AUTH=$(curl -sf -X POST "$PB_URL/api/collections/_superusers/auth-with-password" \ + -H "Content-Type: application/json" \ + -d "{\"identity\":\"$PB_EMAIL\",\"password\":\"$PB_PASSWORD\"}") + +TOKEN=$(echo "$AUTH" | jq -r '.token') +if [ -z "$TOKEN" ] || [ "$TOKEN" = "null" ]; then + echo "✗ Authentifizierung fehlgeschlagen" + exit 1 +fi +echo "✓ Eingeloggt" + +# ---------------------------------------------------------- +# Helper: Collection erstellen +# ---------------------------------------------------------- +create_collection() { + local label=$1 + local json=$2 + RESP=$(curl -sf -X POST "$PB_URL/api/collections" \ + -H "Authorization: $TOKEN" \ + -H "Content-Type: application/json" \ + -d "$json") + ID=$(echo "$RESP" | jq -r '.id') + echo "$ID" +} + +# ---------------------------------------------------------- +# 1. tenants +# ---------------------------------------------------------- +echo "→ Erstelle 'tenants'..." +TENANTS_ID=$(create_collection "tenants" '{ + "name": "tenants", + "type": "base", + "fields": [ + {"name": "name", "type": "text", "required": true}, + {"name": "slug", "type": "text", "required": true}, + {"name": "primary_color", "type": "text"}, + {"name": "logo", "type": "file", "maxSelect": 1, "maxSize": 5242880}, + {"name": "plan", "type": "select", "values": ["basic","pro","enterprise"], "maxSelect": 1}, + {"name": "active", "type": "bool"} + ], + "listRule": "@request.auth.id != \"\"", + "viewRule": "@request.auth.id != \"\"", + "createRule": null, + "updateRule": null, + "deleteRule": null +}') +echo "✓ tenants ($TENANTS_ID)" + +# ---------------------------------------------------------- +# 2. stations +# ---------------------------------------------------------- +echo "→ Erstelle 'stations'..." +STATIONS_ID=$(create_collection "stations" "{ + \"name\": \"stations\", + \"type\": \"base\", + \"fields\": [ + {\"name\": \"tenant\", \"type\": \"relation\", \"collectionId\": \"$TENANTS_ID\", \"required\": true, \"maxSelect\": 1, \"cascadeDelete\": true}, + {\"name\": \"name\", \"type\": \"text\", \"required\": true}, + {\"name\": \"type\", \"type\": \"select\", \"values\": [\"kuehlschrank\",\"tiefkuehl\",\"warmhalte\",\"hygiene\",\"sonstiges\"], \"maxSelect\": 1}, + {\"name\": \"target_temp_min\", \"type\": \"number\"}, + {\"name\": \"target_temp_max\", \"type\": \"number\"}, + {\"name\": \"qr_id\", \"type\": \"text\", \"required\": true}, + {\"name\": \"active\", \"type\": \"bool\"} + ], + \"listRule\": \"@request.auth.tenant = tenant\", + \"viewRule\": \"@request.auth.tenant = tenant\", + \"createRule\": \"@request.auth.tenant = tenant && @request.auth.role = 'admin'\", + \"updateRule\": \"@request.auth.tenant = tenant && @request.auth.role = 'admin'\", + \"deleteRule\": null +}") +echo "✓ stations ($STATIONS_ID)" + +# ---------------------------------------------------------- +# 3. check_logs +# ---------------------------------------------------------- +echo "→ Erstelle 'check_logs'..." +LOGS_ID=$(create_collection "check_logs" "{ + \"name\": \"check_logs\", + \"type\": \"base\", + \"fields\": [ + {\"name\": \"station\", \"type\": \"relation\", \"collectionId\": \"$STATIONS_ID\", \"required\": true, \"maxSelect\": 1, \"cascadeDelete\": false}, + {\"name\": \"tenant\", \"type\": \"relation\", \"collectionId\": \"$TENANTS_ID\", \"required\": true, \"maxSelect\": 1, \"cascadeDelete\": false}, + {\"name\": \"temperature\", \"type\": \"number\"}, + {\"name\": \"status\", \"type\": \"select\", \"values\": [\"ok\",\"abweichung\",\"kritisch\"], \"maxSelect\": 1}, + {\"name\": \"notes\", \"type\": \"text\"}, + {\"name\": \"photo\", \"type\": \"file\", \"maxSelect\": 1, \"maxSize\": 5242880}, + {\"name\": \"checked_by\", \"type\": \"text\"} + ], + \"listRule\": \"@request.auth.tenant = tenant\", + \"viewRule\": \"@request.auth.tenant = tenant\", + \"createRule\": \"\", + \"updateRule\": null, + \"deleteRule\": \"@request.auth.tenant = tenant && @request.auth.role = 'admin'\" +}") +echo "✓ check_logs ($LOGS_ID)" + +# ---------------------------------------------------------- +# 4. users — tenant + role hinzufügen +# ---------------------------------------------------------- +echo "→ Erweitere 'users' (tenant + role)..." +USERS_RESP=$(curl -sf "$PB_URL/api/collections/users" -H "Authorization: $TOKEN") +EXISTING_FIELDS=$(echo "$USERS_RESP" | jq '.fields') + +NEW_FIELDS=$(echo "$EXISTING_FIELDS" | jq ". + [ + {\"name\": \"tenant\", \"type\": \"relation\", \"collectionId\": \"$TENANTS_ID\", \"maxSelect\": 1, \"cascadeDelete\": false}, + {\"name\": \"role\", \"type\": \"select\", \"values\": [\"admin\",\"techniker\"], \"maxSelect\": 1} +]") + +curl -sf -X PATCH "$PB_URL/api/collections/users" \ + -H "Authorization: $TOKEN" \ + -H "Content-Type: application/json" \ + -d "{\"fields\": $NEW_FIELDS}" > /dev/null +echo "✓ users erweitert" + +# ---------------------------------------------------------- +# Zusammenfassung +# ---------------------------------------------------------- +echo "" +echo " ✓ Datenmodell angelegt:" +echo " tenants $TENANTS_ID" +echo " stations $STATIONS_ID" +echo " check_logs $LOGS_ID" +echo "" diff --git a/scripts/setup-db.sh b/scripts/setup-db.sh new file mode 100755 index 0000000..5fda575 --- /dev/null +++ b/scripts/setup-db.sh @@ -0,0 +1,144 @@ +#!/bin/bash +# Legt das PocketBase-Datenmodell für checkflo an. +# Aufruf: PB_EMAIL=... PB_PASSWORD=... ./scripts/setup-db.sh + +set -euo pipefail + +PB_URL="${PB_URL:-https://api.checkflo.de}" + +if [ -z "${PB_EMAIL:-}" ] || [ -z "${PB_PASSWORD:-}" ]; then + echo "Aufruf: PB_EMAIL=admin@... PB_PASSWORD=... ./scripts/setup-db.sh" + exit 1 +fi + +if ! command -v jq &>/dev/null; then + echo "✗ jq nicht gefunden. Installieren: brew install jq" + exit 1 +fi + +echo "→ Verbinde mit $PB_URL ..." + +# Authentifizierung +AUTH=$(curl -sf -X POST "$PB_URL/api/collections/_superusers/auth-with-password" \ + -H "Content-Type: application/json" \ + -d "{\"identity\":\"$PB_EMAIL\",\"password\":\"$PB_PASSWORD\"}") + +TOKEN=$(echo "$AUTH" | jq -r '.token') +if [ -z "$TOKEN" ] || [ "$TOKEN" = "null" ]; then + echo "✗ Authentifizierung fehlgeschlagen" + exit 1 +fi +echo "✓ Eingeloggt" + +# ---------------------------------------------------------- +# Helper: Collection erstellen +# ---------------------------------------------------------- +create_collection() { + local label=$1 + local json=$2 + RESP=$(curl -sf -X POST "$PB_URL/api/collections" \ + -H "Authorization: $TOKEN" \ + -H "Content-Type: application/json" \ + -d "$json") + ID=$(echo "$RESP" | jq -r '.id') + echo "$ID" +} + +# ---------------------------------------------------------- +# 1. tenants +# ---------------------------------------------------------- +echo "→ Erstelle 'tenants'..." +TENANTS_ID=$(create_collection "tenants" '{ + "name": "tenants", + "type": "base", + "fields": [ + {"name": "name", "type": "text", "required": true}, + {"name": "slug", "type": "text", "required": true}, + {"name": "primary_color", "type": "text"}, + {"name": "logo", "type": "file", "maxSelect": 1, "maxSize": 5242880}, + {"name": "plan", "type": "select", "values": ["basic","pro","enterprise"], "maxSelect": 1}, + {"name": "active", "type": "bool"} + ], + "listRule": "@request.auth.id != \"\"", + "viewRule": "@request.auth.id != \"\"", + "createRule": null, + "updateRule": null, + "deleteRule": null +}') +echo "✓ tenants ($TENANTS_ID)" + +# ---------------------------------------------------------- +# 2. stations +# ---------------------------------------------------------- +echo "→ Erstelle 'stations'..." +STATIONS_ID=$(create_collection "stations" "{ + \"name\": \"stations\", + \"type\": \"base\", + \"fields\": [ + {\"name\": \"tenant\", \"type\": \"relation\", \"collectionId\": \"$TENANTS_ID\", \"required\": true, \"maxSelect\": 1, \"cascadeDelete\": true}, + {\"name\": \"name\", \"type\": \"text\", \"required\": true}, + {\"name\": \"type\", \"type\": \"select\", \"values\": [\"kuehlschrank\",\"tiefkuehl\",\"warmhalte\",\"hygiene\",\"sonstiges\"], \"maxSelect\": 1}, + {\"name\": \"target_temp_min\", \"type\": \"number\"}, + {\"name\": \"target_temp_max\", \"type\": \"number\"}, + {\"name\": \"qr_id\", \"type\": \"text\", \"required\": true}, + {\"name\": \"active\", \"type\": \"bool\"} + ], + \"listRule\": \"@request.auth.tenant = tenant\", + \"viewRule\": \"@request.auth.tenant = tenant\", + \"createRule\": \"@request.auth.tenant = tenant && @request.auth.role = 'admin'\", + \"updateRule\": \"@request.auth.tenant = tenant && @request.auth.role = 'admin'\", + \"deleteRule\": null +}") +echo "✓ stations ($STATIONS_ID)" + +# ---------------------------------------------------------- +# 3. check_logs +# ---------------------------------------------------------- +echo "→ Erstelle 'check_logs'..." +LOGS_ID=$(create_collection "check_logs" "{ + \"name\": \"check_logs\", + \"type\": \"base\", + \"fields\": [ + {\"name\": \"station\", \"type\": \"relation\", \"collectionId\": \"$STATIONS_ID\", \"required\": true, \"maxSelect\": 1, \"cascadeDelete\": false}, + {\"name\": \"tenant\", \"type\": \"relation\", \"collectionId\": \"$TENANTS_ID\", \"required\": true, \"maxSelect\": 1, \"cascadeDelete\": false}, + {\"name\": \"temperature\", \"type\": \"number\"}, + {\"name\": \"status\", \"type\": \"select\", \"values\": [\"ok\",\"abweichung\",\"kritisch\"], \"maxSelect\": 1}, + {\"name\": \"notes\", \"type\": \"text\"}, + {\"name\": \"photo\", \"type\": \"file\", \"maxSelect\": 1, \"maxSize\": 5242880}, + {\"name\": \"checked_by\", \"type\": \"text\"} + ], + \"listRule\": \"@request.auth.tenant = tenant\", + \"viewRule\": \"@request.auth.tenant = tenant\", + \"createRule\": \"\", + \"updateRule\": null, + \"deleteRule\": \"@request.auth.tenant = tenant && @request.auth.role = 'admin'\" +}") +echo "✓ check_logs ($LOGS_ID)" + +# ---------------------------------------------------------- +# 4. users — tenant + role hinzufügen +# ---------------------------------------------------------- +echo "→ Erweitere 'users' (tenant + role)..." +USERS_RESP=$(curl -sf "$PB_URL/api/collections/users" -H "Authorization: $TOKEN") +EXISTING_FIELDS=$(echo "$USERS_RESP" | jq '.fields') + +NEW_FIELDS=$(echo "$EXISTING_FIELDS" | jq ". + [ + {\"name\": \"tenant\", \"type\": \"relation\", \"collectionId\": \"$TENANTS_ID\", \"maxSelect\": 1, \"cascadeDelete\": false}, + {\"name\": \"role\", \"type\": \"select\", \"values\": [\"admin\",\"techniker\"], \"maxSelect\": 1} +]") + +curl -sf -X PATCH "$PB_URL/api/collections/users" \ + -H "Authorization: $TOKEN" \ + -H "Content-Type: application/json" \ + -d "{\"fields\": $NEW_FIELDS}" > /dev/null +echo "✓ users erweitert" + +# ---------------------------------------------------------- +# Zusammenfassung +# ---------------------------------------------------------- +echo "" +echo " ✓ Datenmodell angelegt:" +echo " tenants $TENANTS_ID" +echo " stations $STATIONS_ID" +echo " check_logs $LOGS_ID" +echo ""