Mobile-first Web-App fuer persoenliches Health-, Ernaehrungs-, Aktivitaets- und Einkaufs-Tracking im Home-Lab-Betrieb. Stack: pnpm Monorepo - Next.js 16 + React 19 + Tailwind (apps/admin) - Hono + tRPC + Better Auth mit 2FA und Passkeys (packages/api) - PostgreSQL + Drizzle ORM (packages/db) - Docker fuer Postgres und pgAdmin. Module: - Auth mit Login, 2FA (TOTP + Backup-Codes), Passkeys und Admin-Recovery - Tagesansicht mit Essen, Trinken, Gewicht, Aktivitaeten und Coach-Hinweisen - Lebensmittelkatalog mit Naehrwerten, Portionen, OCR/Barcode/Open Food Facts - Rezepte mit Live-Naehrwertberechnung und Community-Vorschlaegen - Essensplanung und Wochenbudget mit Sportbonus - Einkaufslisten mit Maerkten und Laufweg-Sortierung - Hellfireclub mit Aktivitaetspunkten und gemeinsamer Aktivitaetsplanung - Wearables-Vorbereitung (Fitbit / Google Fit / Health Connect) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
20 lines
549 B
TypeScript
20 lines
549 B
TypeScript
import { config } from "dotenv";
|
|
|
|
config({ path: "../../.env" });
|
|
|
|
try {
|
|
const { db, runMigrations } = await import("@hellth/db");
|
|
await runMigrations(db);
|
|
|
|
const { serve } = await import("@hono/node-server");
|
|
const { app } = await import("./app");
|
|
|
|
const port = Number(process.env.API_PORT) || 3002;
|
|
|
|
serve({ fetch: app.fetch, port, hostname: "0.0.0.0" }, (info) => {
|
|
console.log(`API läuft auf http://localhost:${info.port}`);
|
|
});
|
|
} catch (err) {
|
|
console.error("API konnte nicht gestartet werden:", err);
|
|
process.exit(1);
|
|
}
|