feat: complete mealplanner app (backend + frontend + deployment)

.NET 8 backend with Zitadel JWT auth, TheMealDB integration,
weekly meal plan generation, shopping list aggregation.
Vue 3 + Tailwind 4 frontend with dark emerald theme,
manual OIDC PKCE auth, all views implemented.
Multi-stage Dockerfile with nginx reverse proxy.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-14 19:10:10 +00:00
parent 660bcd1953
commit f58782774b
51 changed files with 4061 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using MealPlanner.Data;
using MealPlanner.Models;
namespace MealPlanner.Controllers;
[ApiController]
[Route("api/settings")]
[Authorize]
public class SettingsController(AppDbContext db) : ControllerBase
{
private string UserId => User.FindFirst("sub")?.Value ?? throw new UnauthorizedAccessException();
[HttpGet]
public async Task<IActionResult> Get()
{
var settings = await db.UserSettings.FindAsync(UserId);
if (settings is null)
{
settings = new UserSettings { UserId = UserId, HouseholdSize = 2 };
db.UserSettings.Add(settings);
await db.SaveChangesAsync();
}
return Ok(settings);
}
[HttpPut]
public async Task<IActionResult> Update([FromBody] UserSettings updated)
{
var settings = await db.UserSettings.FindAsync(UserId);
if (settings is null)
{
settings = new UserSettings { UserId = UserId };
db.UserSettings.Add(settings);
}
settings.HouseholdSize = updated.HouseholdSize;
await db.SaveChangesAsync();
return Ok(settings);
}
}