How ammar-antar/shopnow-store-e-commerce works
ShopNow is a browser-based e-commerce demo. Visitors browse and filter a product catalog, inspect products, manage a persisted cart or wishlist, check out as guests, and track simulated orders; optional demo login uses DummyJSON. The graph follows documented routes and relationships visible in excerpts or the SOURCE INDEX. Several feature components and pages were not sampled, so their internal behavior and unverified links are omitted.
Main entry points: App.jsx Route application · Checkout.jsx Guest checkout · client.js HTTP client · Products.jsx Product catalog
Components 24
App routing
- Route application
src/App.jsx - Store layout
src/layout/MainLayout.jsx
Product discovery
- Store home
src/pages/Home.jsx - Product catalog
src/pages/Products.jsx - Product details
src/pages/ProductDetails.jsx - Catalog filtering
src/hooks/useFilteredProducts.js - Catalog URL state
src/hooks/useProductsUrl.js
Shopping and orders
- Cart page
src/pages/Cart.jsx - Cart state
src/store/useCartStore.js - Cart totals
src/lib/cart.js - Guest checkout
src/pages/Checkout.jsx - Checkout form
src/components/checkout/CheckoutForm.jsx - Order confirmation
src/pages/OrderSuccess.jsx - Order tracking
src/pages/TrackOrder.jsx - Order records
src/lib/order.js - Saved wishlist
src/store/useWishlistStore.js
Identity and persistence
- Demo sign-in
src/pages/Login.jsx - Auth session
src/store/useAuthStore.js
Data services
- Product fetching
src/hooks/useProducts.js - Category fetching
src/hooks/useCategories.js - HTTP client
src/api/client.js
Other components
- Store visitor
- DummyJSON API
- Browser storage
Connections 32
- Store visitor → Route application: browses
README.md - Route application → Store layout: renders routes
src/App.jsx - Route application → Store home: routes to
src/App.jsx - Route application → Product catalog: routes to
src/App.jsx - Route application → Product details: routes to
src/App.jsx - Route application → Cart page: routes to
src/App.jsx - Route application → Guest checkout: routes to
src/App.jsx - Route application → Order confirmation: routes to
src/App.jsx - Route application → Order tracking: routes to
src/App.jsx - Route application → Demo sign-in: routes to
src/App.jsx - Store home → Product fetching: loads products
src/pages/Home.jsx - Store home → Category fetching: loads categories
src/pages/Home.jsx - Product catalog → Product fetching: loads products
src/pages/Products.jsx - Product catalog → Catalog filtering: filters products
src/pages/Products.jsx - Product catalog → Catalog URL state: reads URL state
src/pages/Products.jsx - Product details → HTTP client: loads product
- Product fetching → HTTP client: requests catalog
src/hooks/useProducts.js - Category fetching → HTTP client: requests categories
src/hooks/useCategories.js - HTTP client → DummyJSON API: calls API
src/api/client.js - Cart page → Cart state: reads and updates
src/pages/Cart.jsx - Cart page → Cart totals: calculates totals
src/pages/Cart.jsx - Guest checkout → Checkout form: renders form
src/pages/Checkout.jsx - Guest checkout → Cart state: reads cart
src/pages/Checkout.jsx - Guest checkout → Cart totals: calculates totals
src/pages/Checkout.jsx - Guest checkout → Order records: creates order
src/pages/Checkout.jsx - Order confirmation → Cart state: clears cart
src/pages/OrderSuccess.jsx - Order tracking → Order records: looks up order
src/pages/TrackOrder.jsx - Demo sign-in → HTTP client: authenticates
src/pages/Login.jsx - Demo sign-in → Auth session: sets session
src/pages/Login.jsx - Cart state → Browser storage: persists state
src/store/useCartStore.js - Auth session → Browser storage: persists session
src/store/useAuthStore.js - Saved wishlist → Browser storage: persists favorites
README.md