# Mealplanner — Implementation Plan ## Phase 1: Project Scaffolding (parallel) ### 1A: Backend Setup - Create `backend/backend.csproj` (.NET 8, Nullable, ImplicitUsings) - NuGet packages: Npgsql.EntityFrameworkCore.PostgreSQL, Microsoft.AspNetCore.Authentication.JwtBearer, Microsoft.EntityFrameworkCore.Design - `Program.cs` with EF Core, JWT Auth, CORS, Swagger - `Data/AppDbContext.cs` with all entities - Models: Recipe, RecipeIngredient, MealPlan, MealPlanEntry, UserSettings - Initial EF migration ### 1B: Frontend Setup - `bun create vue` in `frontend/` - Tailwind 4 via `@tailwindcss/vite` - Vue Router, Pinia - Theme CSS variables (task-scheduler dark theme) - Auth module (manual OIDC PKCE flow, reference: ~/tasks-kuns-dev/frontend/src/auth.ts) - API composable (`useApi.ts`) with auth token injection - App shell: sidebar nav with 4 tabs ## Phase 2: Core Features (parallel) ### 2A: Recipe System (Backend) - TheMealDbClient service (HttpClient, random + search + lookup) - RecipeService (CRUD for own recipes + search combining both sources) - RecipeController with all endpoints - Map TheMealDB response to internal Recipe model ### 2B: Recipe System (Frontend) - RecipesView.vue — list own recipes as cards - Recipe create/edit form with dynamic ingredient rows - RecipeDetail.vue — full recipe view with ingredients + instructions - Search functionality (own + external) ### 2C: MealPlan System (Backend) - MealPlanService: generate (pick 7 random unique), reroll single day - MealPlanController with all endpoints - ShoppingListService: aggregate ingredients, scale by household size, group by category - ShoppingListController ## Phase 3: Main UI (sequential, depends on Phase 2) ### 3A: WeekPlan View - 7 day cards (Mon-Sun) with recipe image + title - "Generate new week" button - Per-day: "Swap" (opens recipe search) + "Reroll" (random) buttons - Loading states, empty state for first visit ### 3B: Shopping List View - Grouped by category - Checkbox per item (persisted) - Badge with open item count - "Alles abhaken" reset button ### 3C: Settings View - Household size input - Simple form, save to API ## Phase 4: Deployment ### 4A: Dockerfile + Docker Compose - Multi-stage: Bun build frontend → .NET publish → ASP.NET runtime - Serve frontend static files from wwwroot - docker-compose.yml for local dev ### 4B: Gitea + Coolify Setup - Create Gitea repo - Push code - Coolify deploy config (env vars, domain essen.kuns.dev)