refactor: rename nutriphi module to food (Essen)

Complete rename across the entire monorepo pre-launch:
- Module, routes, API, i18n, standalone landing app directories
- All code identifiers, display names, logo component
- German user-facing label: "Essen" (English brand stays "Food")
- Dexie table nutriFavorites -> foodFavorites
- Infra configs (docker-compose, cloudflared, nginx, wrangler)

Zero residue of nutriphi remains. No data migration needed (pre-launch).

Follow-up: run pnpm install, update Cloudflare DNS
(food.mana.how), rename Cloudflare Pages project.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-14 15:30:07 +02:00
parent f5cb833b04
commit 53b3746b98
196 changed files with 863 additions and 719 deletions

View file

@ -36,7 +36,7 @@ import { z } from 'zod';
// - Changing a type → BUMP (zod parse fails on old client)
//
// History:
// 1 — initial schemas (foods/totalNutrition for nutriphi,
// 1 — initial schemas (foods/totalNutrition for food,
// scientificName/commonNames/etc for plants)
export const AI_SCHEMA_VERSION = '1' as const;
@ -59,19 +59,21 @@ export interface AiResponseEnvelope<T> {
* side is stale.
*/
export class AiSchemaVersionMismatchError extends Error {
constructor(
public readonly received: string,
public readonly expected: AiSchemaVersion = AI_SCHEMA_VERSION
) {
readonly received: string;
readonly expected: AiSchemaVersion;
constructor(received: string, expected: AiSchemaVersion = AI_SCHEMA_VERSION) {
super(
`AI wire-format version mismatch: received "${received}", expected "${expected}". ` +
`The client and server are out of sync — reload the page or redeploy.`
);
this.name = 'AiSchemaVersionMismatchError';
this.received = received;
this.expected = expected;
}
}
// ─── NutriPhi: meal photo / text analysis ────────────────────────
// ─── Food: meal photo / text analysis ────────────────────────
const AnalyzedFoodSchema = z.object({
name: z.string().describe('The food item name in German'),

View file

@ -5,25 +5,25 @@
*/
// Theme types
export * from './theme';
export * from './theme.ts';
// Auth types
export * from './auth';
export * from './auth.ts';
// UI types
export * from './ui';
export * from './ui.ts';
// Common utility types
export * from './common';
export * from './common.ts';
// Contact types for cross-app integration
export * from './contact';
export * from './contact.ts';
// Landing page configuration types
export * from './landing-config';
export * from './landing-config.ts';
// AI structured-output Zod schemas (shared between mana-api + web frontend)
export * from './ai-schemas';
export * from './ai-schemas.ts';
// API types
export interface User {