How swapnajakkali/ecommerce-frontend works
This is a React storefront for browsing furniture, viewing product details, managing a cart, and accessing login and registration screens. The user journey is routed by App: shoppers browse the store, inspect products, add items to the cart, and adjust quantities; shared contexts hold cart and authentication state while service modules call the backend API. The tree suggests additional home-page presentation features, but their wiring and the login/registration behavior are not established by the sampled source, so those links are omitted.
Main entry points: App.jsx Route application · CartContext.jsx Cart context · ProductDetails.jsx Product details · Navbar.jsx Navigation bar
Components 16
Storefront
- Route application
src/App.jsx - Home page
src/pages/Home.jsx - Shop page
src/pages/Shop.jsx - Product details
src/pages/ProductDetails.jsx - Cart page
src/pages/Cart.jsx - Login page
src/pages/Login.jsx - Registration page
src/pages/Register.jsx - Navigation bar
src/components/Navbar.jsx - Room inspiration
src/components/InspirationSection.jsx
Customer state
- Auth context
src/context/AuthContext.jsx - Cart context
src/context/CartContext.jsx
API integration
- Product service
src/services/productServices.js - Cart service
src/services/cartServices.js - User service
src/services/userServices.js
Other components
- Shopper
- Backend API
Connections 17
- Shopper → Route application: opens
- Route application → Home page: routes to
- Route application → Shop page: routes to
- Route application → Product details: routes to
- Route application → Cart page: routes to
- Route application → Login page: routes to
- Route application → Registration page: routes to
- Navigation bar → Auth context: reads state
- Navigation bar → Cart context: reads count
- Product details → Product service: loads product
- Product details → Cart context: adds item
- Cart page → Cart context: reads and updates
- Auth context → User service: loads profile
- Cart context → Cart service: manages cart
- Product service → Backend API: requests products
- Cart service → Backend API: requests cart
- User service → Backend API: requests profile