managarten/scripts
Wuesteon 2c30867251 🔧 refactor: implement 12-factor runtime config for all web apps
Replace window injection and build-time env vars with runtime config
loaded from /config.json (generated by Docker entrypoint). This fixes
the staging deployment issue where apps were requesting localhost URLs
instead of production URLs.

Changes:
- Add runtime.ts config loader with Zod validation (fail-hard in prod)
- Disable SSR via +layout.ts (apps are client-only SPAs)
- Update API clients and auth stores to use async config getters
- Add docker-entrypoint.sh scripts to generate config.json at startup
- Update Dockerfiles with ENTRYPOINT for config generation
- Simplify docker-compose.staging.yml env vars (12-factor pattern)
- Add static/config.json as dev fallback (localhost defaults)
- Fix onMount return type (Svelte 5 compatibility)
- Add zod dependency to Picture app
- Add backward compat exports for Contacts app

Apps updated:
- Clock (port 3017)
- Chat (port 3002)
- Picture (port 3006)
- Contacts (port 3015)
- Calendar (port 3016)
- Manacore (multi-app platform)

Benefits:
- Build once, deploy anywhere (same Docker image for all envs)
- Configuration in environment, not code (12-factor compliance)
- Fail-hard on missing/invalid config in production
- No accidental SSR localhost fallbacks
- Schema validation ensures all required URLs are present
2025-12-15 21:33:50 +01:00
..
deploy first implementation 2025-11-27 17:26:18 +01:00
build-changed-apps.sh 🔧 chore: add pre-push build validation for changed apps 2025-12-15 19:49:30 +01:00
build-check-staged.sh 🔧 chore: add svelte-check to pre-commit hooks 2025-12-15 17:53:52 +01:00
fix-mixed-imports.mjs Fix wrong type 2025-12-04 23:25:25 +01:00
generate-env.mjs 🔧 refactor: implement 12-factor runtime config for all web apps 2025-12-15 21:33:50 +01:00
generate-staging-secrets.sh ♻️ refactor(cd): hardcode non-sensitive config in staging workflow 2025-12-04 17:11:36 +01:00
get-ssh-key.sh ♻️ refactor(cd): hardcode non-sensitive config in staging workflow 2025-12-04 17:11:36 +01:00
remove-coolify-references.sh feat: major update with network graphs, themes, todo extensions, and more 2025-12-10 02:37:46 +01:00
setup-databases.sh 🧑‍💻 dx: add automatic database setup and dev:*:full commands 2025-12-08 14:38:18 +01:00
svelte-check-staged.sh ️ fix: resolve all svelte-check a11y warnings across web apps 2025-12-15 19:09:01 +01:00