Task: Setup Zustand Store Root and Devtools
Type: Infrastructure
Milestone: M0-Project - Foundation
Estimate: S
What This Enables
Any client-side state that lives outside React Query (auth session, UI state, theme preference). Blocks auth store and global UI state work.
Deliverables
Acceptance Criteria
Notes
- Use the
immer middleware only if nested state becomes necessary; avoid it by default
- Keep stores flat; nested objects in Zustand cause subtle re-render bugs
Task: Setup Zustand Store Root and Devtools
Type: Infrastructure
Milestone: M0-Project - Foundation
Estimate: S
What This Enables
Any client-side state that lives outside React Query (auth session, UI state, theme preference). Blocks auth store and global UI state work.
Deliverables
src/store/index.ts: store root / barrel exportsrc/store/auth.store.ts: example slice:user,token,setToken,clearSessionsrc/store/ui.store.ts: example slice:theme,sidebarOpenzustand/middlewaredevtoolswrapperAcceptance Criteria
@/storeclearSession()wipes persisted auth state correctlyNotes
immermiddleware only if nested state becomes necessary; avoid it by default