From e07ac90c2a5ec0abb7eefc319c035f9c61d5df48 Mon Sep 17 00:00:00 2001 From: senke Date: Sun, 11 Jan 2026 18:00:11 +0100 Subject: [PATCH] state-ownership: audit cartStore for domain data (Action 4.5.1.6) --- apps/web/docs/ZUSTAND_STORES_AUDIT.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/web/docs/ZUSTAND_STORES_AUDIT.md b/apps/web/docs/ZUSTAND_STORES_AUDIT.md index a547b04cc..069bcf866 100644 --- a/apps/web/docs/ZUSTAND_STORES_AUDIT.md +++ b/apps/web/docs/ZUSTAND_STORES_AUDIT.md @@ -60,8 +60,15 @@ This document lists all Zustand stores found in the codebase, their locations, p - **State Type**: `CartStore` (CartState) - **Key State**: - `items: CartItem[]` ✅ **UI State** (client-side cart before checkout) + - Actions: `addItem`, `removeItem`, `updateQuantity`, `clearCart`, `getTotal`, `getItemCount` - **Category**: ✅ **UI State** (appropriate for Zustand - client-side cart) - **Migration Priority**: Low (cart is client-side state before checkout) +- **Analysis**: + - Cart items are temporary client-side state before checkout + - Not domain data - cart is created client-side, not fetched from server + - Persisted to localStorage for user convenience + - No server synchronization needed until checkout + - ✅ **Correctly categorized as UI state** ### 5. Auth Store (`apps/web/src/features/auth/store/authStore.ts`) - **Export**: `useAuthStore`