managarten/packages
Wuesteon aab8c73a9c feat: add multi-layered runtime config protection system
Add comprehensive defense system to prevent runtime config bugs across all projects:

## 1. Enhanced ESLint Rules
- Added @typescript-eslint/no-floating-promises (error)
  Catches: fetch(`${getAuthUrl()}/api`) without await
- Added @typescript-eslint/no-misused-promises (error)
  Catches: Promises in conditionals and logical expressions
- Added @typescript-eslint/require-await (warn)
  Ensures async functions actually use await

## 2. Validation Script (scripts/validate-runtime-config.mjs)
Automated checker that scans all web apps for:
-  Required files (runtime.ts, docker-entrypoint.sh, Dockerfile)
-  Window injection patterns (window.__PUBLIC_*)
-  Build-time env usage in stores/api (import.meta.env.PUBLIC_*)
-  Missing await on async config functions
- ⚠️  Docker entrypoint best practices

Usage: pnpm validate:runtime-config

## 3. Comprehensive Documentation (docs/RUNTIME_CONFIG.md)
Complete implementation guide covering:
- Why runtime configuration is needed
- Step-by-step implementation guide
- Common patterns (API clients, auth stores)
- Anti-patterns to avoid
- Migration checklist
- ESLint protection details

## Benefits
- Prevents "[object Promise]" in API URLs (staging bug)
- Catches missing await at lint time
- Validates all apps automatically
- Clear documentation for new projects
- Can run in CI/CD

## Future Work
- Add to pre-push hook (optional)
- Create project generator/template
- Shared runtime config package

This prevents the class of bugs we just fixed in manacore-web where
getAuthUrl() was called without await, causing ERR_CONNECTION_REFUSED
on staging.
2025-12-16 00:28:57 +01:00
..
eslint-config feat: add multi-layered runtime config protection system 2025-12-16 00:28:57 +01:00
mana-core-nestjs-integration fix: add type-check script to @mana-core/nestjs-integration 2025-12-10 21:25:10 +01:00
manadeck-database fix(db): use TEXT for user_id columns across entire codebase 2025-12-09 16:30:51 +01:00
news-database fix(db): use TEXT for user_id columns across entire codebase 2025-12-09 16:30:51 +01:00
nutriphi-database improve code quality 2025-12-03 23:42:37 +01:00
shared-api-client Merge branch 'dev-1' into dev 2025-12-05 17:57:26 +01:00
shared-auth ️ fix: resolve all svelte-check a11y warnings across web apps 2025-12-15 19:09:01 +01:00
shared-auth-stores fix lint 2025-12-04 00:32:13 +01:00
shared-auth-ui feat(referral): integrate referral system frontend 2025-12-09 13:01:43 +01:00
shared-branding 🐛 fix: resolve auth issues in Manacore, Calendar, and Clock apps 2025-12-08 15:51:57 +01:00
shared-config fix lint 2025-12-04 00:32:13 +01:00
shared-credit-service fix lint 2025-12-04 00:32:13 +01:00
shared-errors Fix wrong type 2025-12-04 23:25:25 +01:00
shared-feedback-service fix lint 2025-12-04 00:32:13 +01:00
shared-feedback-types improve code quality 2025-12-03 23:42:37 +01:00
shared-feedback-ui chore: various UI improvements and fixes 2025-12-10 20:05:02 +01:00
shared-help-content feat: major update with network graphs, themes, todo extensions, and more 2025-12-10 02:37:46 +01:00
shared-help-mobile feat: major update with network graphs, themes, todo extensions, and more 2025-12-10 02:37:46 +01:00
shared-help-types feat: major update with network graphs, themes, todo extensions, and more 2025-12-10 02:37:46 +01:00
shared-help-ui feat: major update with network graphs, themes, todo extensions, and more 2025-12-10 02:37:46 +01:00
shared-i18n feat: major update with network graphs, themes, todo extensions, and more 2025-12-10 02:37:46 +01:00
shared-icons improve code quality 2025-12-03 23:42:37 +01:00
shared-landing-ui improve code quality 2025-12-03 23:42:37 +01:00
shared-nestjs-auth Fix wrong type 2025-12-04 23:25:25 +01:00
shared-profile-ui improve code quality 2025-12-03 23:42:37 +01:00
shared-splitscreen ️ fix: resolve all svelte-check a11y warnings across web apps 2025-12-15 19:09:01 +01:00
shared-storage Merge branch 'dev-1' into dev 2025-12-05 17:57:26 +01:00
shared-stores ♻️ refactor: unify web app patterns across monorepo 2025-12-05 03:35:26 +01:00
shared-subscription-types improve code quality 2025-12-03 23:42:37 +01:00
shared-subscription-ui improve code quality 2025-12-03 23:42:37 +01:00
shared-supabase Fix wrong type 2025-12-04 23:25:25 +01:00
shared-tags feat: major update with network graphs, themes, todo extensions, and more 2025-12-10 02:37:46 +01:00
shared-tailwind feat(ui): add elevation system for overlays and modals 2025-12-13 15:00:33 +01:00
shared-theme refactor(theme): remove custom theme editor and community themes 2025-12-12 02:34:43 +01:00
shared-theme-ui feat(shared-ui): add FilterDropdown export and InputBar FAB support 2025-12-14 21:32:03 +01:00
shared-types feat(contacts): integrate contacts into Todo and Calendar apps 2025-12-11 18:14:35 +01:00
shared-ui 🐛 fix: resolve CI/CD build failures for manacore-web and todo-web 2025-12-15 19:40:19 +01:00
shared-utils feat: add unified CommandBar Quick-Create for Calendar and Contacts 2025-12-10 21:12:07 +01:00
shared-vite-config feat(splitscreen): add split-screen feature for multi-app side-by-side view 2025-12-12 13:00:26 +01:00
test-config improve code quality 2025-12-03 23:42:37 +01:00
uload-database fix(db): use TEXT for user_id columns across entire codebase 2025-12-09 16:30:51 +01:00