Summary
Brownie Bliss is a bakery/food e-commerce project. If the site has a product listing or ordering capability, the shopping cart state should persist across page refreshes. Currently, if a user adds items to the cart and refreshes the page (or navigates away and returns), the cart is empty — this is a critical e-commerce UX failure.
Problem
- Cart state is held only in React component state (or context), which is lost on every page reload.
- Users who add items and then pause to read descriptions or navigate to another page lose their selections entirely.
- For a food ordering platform, losing cart state mid-session is a direct conversion killer.
- No
localStorage persistence or session-based cart storage appears to be implemented.
Impact
- Cart abandonment increases dramatically when users cannot trust that their selections will be remembered.
- Multi-page browsing (product detail → cart → product detail) becomes frustrating as the cart empties on each navigation.
Proposed Solution
- Create a
CartContext using React Context + useReducer for cart state management.
- Persist to
localStorage on every cart state change using a useEffect:
useEffect(() => {
localStorage.setItem('brownie-cart', JSON.stringify(cartState));
}, [cartState]);
- Rehydrate from
localStorage on app initialization:
const initialState = JSON.parse(localStorage.getItem('brownie-cart') || '[]');
- Add cart item count badge to the cart icon in the Navbar so users always know their cart status.
- Add a cart expiry (e.g., 24 hours) to automatically clear stale carts.
Additional Notes
- I will implement the
CartContext, persistence logic, Navbar badge, and a basic cart summary page.
- Could you assign this to me?
Labels: enhancement, feature, ui/ux, good first issue, GSSoC 2026
Summary
Brownie Bliss is a bakery/food e-commerce project. If the site has a product listing or ordering capability, the shopping cart state should persist across page refreshes. Currently, if a user adds items to the cart and refreshes the page (or navigates away and returns), the cart is empty — this is a critical e-commerce UX failure.
Problem
localStoragepersistence or session-based cart storage appears to be implemented.Impact
Proposed Solution
CartContextusing React Context +useReducerfor cart state management.localStorageon every cart state change using auseEffect:localStorageon app initialization:Additional Notes
CartContext, persistence logic, Navbar badge, and a basic cart summary page.Labels:
enhancement,feature,ui/ux,good first issue,GSSoC 2026