From 4e3b3a77dcca11bf674fd66dc3aad6585eff25e6 Mon Sep 17 00:00:00 2001 From: jableader Date: Sat, 1 Nov 2025 17:08:21 +1100 Subject: [PATCH] sneaky file leftover --- frontend-spec.md | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 frontend-spec.md diff --git a/frontend-spec.md b/frontend-spec.md deleted file mode 100644 index af6c744..0000000 --- a/frontend-spec.md +++ /dev/null @@ -1,44 +0,0 @@ -# Frontend Integration Spec (Household v2) - -Date: 2025-11-01 - -This document summarizes the current backend API surface (post v2 migration) and the prioritized actions to keep the frontend aligned. - -## Current API Highlights - -- Auth: JWT bearer via `/api/v1/auth/register|login|refresh|logout`; refresh via HttpOnly cookie. -- Households: create households and list memberships. -- Household-scoped resources under `/api/v1/households/{householdSlug}`: - - Recipes: list/get/create/delete (soft-hide); list supports `q`, `cursor`, `limit`. - - Meals: upcoming/get/create/update/delete; mark consumed. - - Shopping: current aggregate; list-by-id; purchase; request/unrequest meal. -- RFC7807 Problem Details standardized for errors. -- OpenAPI includes bearerAuth and 403 for protected household routes. - -## DTO alignment - -- Meals v2 participants (chefs, cleanup, consumers) now use MemberRef: - - `{ id: number, displayName: string }` - - Returned in MealOut; sent in MealIn. No legacy `Person` in outward schema. - -- Recipes v2 outward DTO currently omits `createdBy` in v2 list/create responses; if exposed later, it will use a user/member shape (no Person). - -## Breaking changes to watch for - -- Person removed from meals outward schema; use MemberRef.displayName instead of `name`. -- Household slug is required in all v2 data routes. - -## Prioritized Actions (Frontend) - -1) Replace any usage of Person in meals UI/state with MemberRef { id, displayName }. -2) Verify create/update meal payloads send participants in the new format (displayName). -3) Ensure auth flow relies on JWT bearer and refresh cookie; remove legacy cookie logic if still present. -4) Align OpenAPI client generation with the updated schema (regenerate clients). - -## Upcoming backend cleanups (FYI) - -- Remove v1 routers; rename `*_v2.py` to canonical; drop `persons/` package. -- Expose user/member DTO for recipe authorship if needed. -- Add invitation email delivery. -- DB indices/FKs polish. -