state-ownership: audit cartStore for domain data (Action 4.5.1.6)

This commit is contained in:
senke 2026-01-11 18:00:11 +01:00
parent 6df94cff81
commit e07ac90c2a

View file

@ -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`