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`