Web-app to visualise a concept of an adaptive nutrition & calorie tracker app. Recalculate the ingredient amounts in the recipe based on shortages from this or previous meals on the same day.
This is a Next.js project bootstrapped with
create-next-app.
- Next.js
- TailwindCSS
- shadcn/ui
- zustand
- TanStack Query
- Translate to English
- Merge both algorithms (?)
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
flowchart TD
Start([Start: Dashboard])
SetGoal[Setze Tagesziel]
SelectRecipe[Wähle Rezept für Mahlzeit]
ShowIngredients[Zeige Zutatenliste]
ChangeIngredient{Zutat geändert?}
AskAdjust[Soll Ausgleich berechnet werden?]
RunAlgo[Algorithmus berechnet Anpassungen]
ShowDialog[Zeige Anpassungsvorschlag]
AcceptChange{Nutzer übernimmt Vorschlag?}
UpdateMacros[Aktualisiere Makro-Fortschritt]
NextMeal{Weitere Mahlzeit?}
End([Ende: Tagesübersicht])
Start --> SetGoal
SetGoal --> SelectRecipe
SelectRecipe --> ShowIngredients
ShowIngredients --> ChangeIngredient
ChangeIngredient -- Nein --> NextMeal
ChangeIngredient -- Ja --> AskAdjust
AskAdjust -- Nein --> NextMeal
AskAdjust -- Ja --> RunAlgo
RunAlgo --> ShowDialog
ShowDialog --> AcceptChange
AcceptChange -- Ja --> UpdateMacros
AcceptChange -- Nein --> NextMeal
UpdateMacros --> NextMeal
NextMeal -- Ja --> SelectRecipe
NextMeal -- Nein --> End
graph TD
A[app]
A1[dashboard/page.tsx]
A2["meals/[mealType]/page.tsx"]
A3[api/adjust-recipe/route.ts]
B[components]
B1[RecipeSelector.tsx]
B2[IngredientList.tsx]
B3[MacroOverview.tsx]
B4[AdjustmentDialog.tsx]
C[lib]
C1[nutrition-algorithm.ts]
C2[recipes.ts]
C3[types.ts]
D[hooks]
D1[useRecipeAdjustment.ts]
A --> A1
A --> A2
A --> A3
B --> B1
B --> B2
B --> B3
B --> B4
C --> C1
C --> C2
C --> C3
D --> D1