How grishmitha-123/babafly-frontend works
BabaFly is a React fashion-commerce frontend: shoppers browse and discover products, inspect details, manage a cart or wishlist, check out, and view orders; login and registration provide a separate account flow. App.jsx defines the routes and MainLayout supplies shared navigation. Product pages call the API layer; Redux slices hold auth, cart, and wishlist state, with cart and wishlist persisted in localStorage. Major order, checkout, category, and account screens are retained from the documented routes; their internal behavior is not shown in the excerpts.
Main entry points: App.jsx Route application · axios.js Axios API client · authSlice.js Authentication state · cartSlice.js Cart state
Components 24
Storefront experience
- Route application
src/App.jsx - Shared layout
src/layouts/MainLayout.jsx - Navigation and search
src/components/Navbar.jsx - Home promotions
src/pages/Home.jsx
Shopping flows
- Category browsing
src/pages/Categories.jsx - Category products
src/pages/CategoryProducts.jsx - Product discovery
src/pages/Products.jsx - Product presentation
src/components/ProductCard.jsx - Product details
src/pages/ProductDetails.jsx - Shopping cart
src/pages/Cart.jsx - Checkout
src/pages/Checkout.jsx - Wishlist
src/pages/Wishlist.jsx
Account and orders
- Login
src/pages/Login.jsx - Registration
src/pages/Register.jsx - Order history
src/pages/Orders.jsx - Order details
src/pages/OrderDetails.jsx
State and API
- Redux store
src/redux/store.js - Authentication state
src/redux/authSlice.js - Cart state
src/redux/cartSlice.js - Wishlist state
src/redux/wishlistslice.js - Axios API client
src/utils/axios.js
Other components
- Shopper
- DummyJSON API
- Browser localStorage
Connections 37
- Shopper → Route application: opens routes
src/App.jsx - Route application → Shared layout: wraps routes
src/App.jsx - Shared layout → Navigation and search: renders
src/layouts/MainLayout.jsx - Route application → Home promotions: routes to
src/App.jsx - Route application → Category browsing: routes to
src/App.jsx - Route application → Category products: routes to
src/App.jsx - Route application → Product discovery: routes to
src/App.jsx - Route application → Product details: routes to
src/App.jsx - Route application → Shopping cart: routes to
src/App.jsx - Route application → Checkout: routes to
src/App.jsx - Route application → Wishlist: routes to
src/App.jsx - Route application → Login: routes to
src/App.jsx - Route application → Registration: routes to
src/App.jsx - Route application → Order history: routes to
src/App.jsx - Route application → Order details: routes to
src/App.jsx - Redux store → Authentication state: configures reducer
src/redux/store.js - Redux store → Cart state: configures reducer
src/redux/store.js - Redux store → Wishlist state: configures reducer
src/redux/store.js - Product discovery → Axios API client: fetches products
src/pages/Products.jsx - Category products → Axios API client: requests products
src/pages/CategoryProducts.jsx - Product details → Axios API client: requests product
src/pages/ProductDetails.jsx - Axios API client → DummyJSON API: sends REST requests
README.md - Product discovery → Product presentation: renders results
src/pages/Products.jsx - Category products → Product presentation: renders results
src/pages/CategoryProducts.jsx - Product presentation → Wishlist state: dispatches toggle
src/components/ProductCard.jsx - Navigation and search → Authentication state: dispatches logout
src/components/Navbar.jsx - Navigation and search → Cart state: resets cart
src/components/Navbar.jsx - Navigation and search → Wishlist state: resets wishlist
src/components/Navbar.jsx - Shopping cart → Cart state: dispatches cart actions
src/pages/Cart.jsx - Login → Authentication state: uses auth state
src/pages/Login.jsx - Registration → Authentication state: uses auth state
src/pages/Register.jsx - Wishlist → Wishlist state: uses wishlist state
src/pages/Wishlist.jsx - Wishlist → Cart state: uses cart state
src/pages/Wishlist.jsx - Cart state → Browser localStorage: persists cart
src/redux/cartSlice.js - Wishlist state → Browser localStorage: persists wishlist
src/redux/wishlistslice.js - Authentication state → Browser localStorage: stores token and user
src/redux/authSlice.js - Axios API client → Browser localStorage: reads bearer token
src/utils/axios.js