How anvar-khikmatov/shopping-cart works
Velora is a small eyewear storefront. Visitors enter through the routed app shell, browse a home page or product collection, open product details, and add quantities to shared cart state; the cart page and navigation display that state. Product listings and details fetch from DummyJSON. The README only describes the React/Vite template, so it documents no additional storefront capabilities. Edges reflect the supplied excerpts and SOURCE INDEX; unsampled internals are not assumed.
Main entry points: route.jsx Route map · Layout.jsx Store layout · Home.jsx Home page · CartContext.jsx Cart context
Components 16
App shell
- React entry
src/main.jsx - Route map
src/route.jsx - Store layout
src/Layout.jsx - Scroll reset
src/ScrollToTop.jsx - Navigation
src/components/Nav.jsx - Store footer
src/components/Footer.jsx
Store browsing
- Home page
src/pages/Home.jsx - Hero slider
src/components/HeroSlider.jsx - Home content
src/contentData.jsx - Why section
src/components/WhySection.jsx - Collection page
src/pages/Collection.jsx - Product detail
src/components/ProductDetail.jsx
Cart state
- Cart page
src/pages/Cart.jsx - Cart context
src/CartContext.jsx
External services
- DummyJSON catalog
Other components
- Shopper
Connections 20
- Shopper → React entry: opens store
- React entry → Route map: renders routes
src/main.jsx - Route map → Store layout: routes through
src/route.jsx - Route map → Home page: routes to
src/route.jsx - Route map → Collection page: routes to
src/route.jsx - Route map → Product detail: routes to
src/route.jsx - Route map → Cart page: routes to
src/route.jsx - Store layout → Scroll reset: renders
src/Layout.jsx - Store layout → Navigation: renders
src/Layout.jsx - Store layout → Store footer: renders
src/Layout.jsx - Store layout → Cart context: provides state
src/Layout.jsx - Home page → Hero slider: renders
src/pages/Home.jsx - Home page → Why section: renders
src/pages/Home.jsx - Home page → Home content: passes content
src/pages/Home.jsx - Home page → Collection page: links to
src/pages/Home.jsx - Collection page → DummyJSON catalog: fetches products
src/pages/Collection.jsx - Product detail → DummyJSON catalog: fetches product
src/components/ProductDetail.jsx - Product detail → Cart context: updates quantities
src/components/ProductDetail.jsx - Navigation → Cart context: reads count
src/components/Nav.jsx - Cart page → Cart context: reads cart IDs
src/pages/Cart.jsx