hellth-hub/apps/admin/lib
Sebastian Mayer 8ed7c083c4
Some checks failed
CI / Lint, Typecheck, Test, Build (push) Has been cancelled
Refactor: God-Router + Frontend-Lib in Domain-Module aufgeteilt
Router-Split (packages/api/src/trpc/routers/health/):
- health.ts (2061 Zeilen Monolith) entfernt und in 6 Sub-Router aufgeteilt:
  - dashboard.ts (overview, profile, goals, point settings)
  - foods.ts (foods, nutrition, OpenFoodFacts, food preferences)
  - recipes.ts (recipes, submissions, reviews, activity feed)
  - stores.ts (stores, change-requests, shopping lists)
  - tracking.ts (meals, drinks, weight, mealPlans, activities, leaderboard)
  - community.ts (club, wearables, coach, stats)
- index.ts mergt alle Sub-Router via mergeRouters, sodass Frontend-Aufrufe
  (trpc.health.listFoods etc.) unveraendert weiterfunktionieren.
- t.mergeRouters in init.ts exportiert.

Frontend-Lib-Split (apps/admin/lib/hellth/):
- hellth-data.ts (1149 Zeilen Monolith) in 5 Domain-Module aufgeteilt:
  - types.ts (alle TypeScript-Types)
  - constants.ts (Seeds, Defaults, todayKey, uid)
  - nutrition.ts (calcRecipe, classifyRecipe, parseNutritionLabel, ...)
  - storage.ts (load/save HellthData, ClubData, hasCompletedHealthProfile)
  - stats.ts (Budget, Stats, Coach, Shopping, Weight-Projection)
- hellth-data.ts wird zum reinen Re-Export-Index, damit bestehende
  Imports `from "@/lib/hellth-data"` unveraendert weiterfunktionieren.

Funktional identisch zum Original - reine Code-Reorganisation.
Verifiziert: 28 API-Tests + 10 Admin-Tests gruen, Typecheck (3 Packages)
gruen, Admin-Build (26 Pages) gruen.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 01:09:53 +02:00
..
hellth Refactor: God-Router + Frontend-Lib in Domain-Module aufgeteilt 2026-05-28 01:09:53 +02:00
auth-client.ts Initial commit: Hellth Hub monorepo 2026-05-27 22:15:16 +02:00
hellth-data.test.ts Refactor: CI, Schema-Split, 2FA-Optimierung und Code-Hygiene 2026-05-27 23:34:39 +02:00
hellth-data.ts Refactor: God-Router + Frontend-Lib in Domain-Module aufgeteilt 2026-05-28 01:09:53 +02:00
news-list-filters.ts Initial commit: Hellth Hub monorepo 2026-05-27 22:15:16 +02:00
page-editor.ts Initial commit: Hellth Hub monorepo 2026-05-27 22:15:16 +02:00
trpc.ts Initial commit: Hellth Hub monorepo 2026-05-27 22:15:16 +02:00