No description
Find a file
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
.claude Initial commit: Hellth Hub monorepo 2026-05-27 22:15:16 +02:00
.forgejo/workflows Refactor: CI, Schema-Split, 2FA-Optimierung und Code-Hygiene 2026-05-27 23:34:39 +02:00
apps/admin Refactor: God-Router + Frontend-Lib in Domain-Module aufgeteilt 2026-05-28 01:09:53 +02:00
docker Initial commit: Hellth Hub monorepo 2026-05-27 22:15:16 +02:00
docs Initial commit: Hellth Hub monorepo 2026-05-27 22:15:16 +02:00
packages Refactor: God-Router + Frontend-Lib in Domain-Module aufgeteilt 2026-05-28 01:09:53 +02:00
.env.example Refactor: CI, Schema-Split, 2FA-Optimierung und Code-Hygiene 2026-05-27 23:34:39 +02:00
.gitignore Refactor: CI, Schema-Split, 2FA-Optimierung und Code-Hygiene 2026-05-27 23:34:39 +02:00
.npmrc Initial commit: Hellth Hub monorepo 2026-05-27 22:15:16 +02:00
AGENTS.md Initial commit: Hellth Hub monorepo 2026-05-27 22:15:16 +02:00
claude-info.md Initial commit: Hellth Hub monorepo 2026-05-27 22:15:16 +02:00
CLAUDE.md Initial commit: Hellth Hub monorepo 2026-05-27 22:15:16 +02:00
package.json Initial commit: Hellth Hub monorepo 2026-05-27 22:15:16 +02:00
pnpm-lock.yaml Initial commit: Hellth Hub monorepo 2026-05-27 22:15:16 +02:00
pnpm-workspace.yaml Initial commit: Hellth Hub monorepo 2026-05-27 22:15:16 +02:00
README.md Initial commit: Hellth Hub monorepo 2026-05-27 22:15:16 +02:00
turbo.json Refactor: CI, Schema-Split, 2FA-Optimierung und Code-Hygiene 2026-05-27 23:34:39 +02:00

Hellth Hub

Mobile-first Web-App für persönliches Health- und Ernährungstracking im Home-Lab.

Lokaler Start

docker compose -f docker/docker-compose.yml up -d db
pnpm --filter @hellth/db db:migrate
pnpm --filter @hellth/api seed:admin
pnpm --filter @hellth/api seed:health
pnpm --filter @hellth/api dev
pnpm --filter admin dev

Danach:

Aktuelle Module

  • Auth, Login, 2FA, Passkeys und Benutzerverwaltung
  • Tagesansicht mit Essen, Trinken, Gewicht, Aktivitäten und Coach-Hinweisen
  • Lebensmittelkatalog mit Nährwerten, Portionen, Favoriten und OCR-Vorbereitung
  • Rezepte mit flexiblen Mengenangaben, Bewertungen und Meal-Prep-Bezug
  • Essensplanung mit Tages- und Wochenlogik
  • Wochenbudget für Kalorien inklusive Sportbonus
  • Einkaufsliste mit Märkten, Abteilungen und Laufweg-Sortierung
  • Ziele, Onboarding und persönliche Einstellungen pro Benutzer
  • Erinnerungen, Aktivitätspunkte, Hellfireclub und Wearable-Vorbereitung

Verifikation

pnpm --filter @hellth/api test -- --test-reporter=spec
pnpm --filter admin test
NEXT_PUBLIC_API_URL=http://localhost:3002 pnpm --filter admin build