How rahulsan-22/zepto-clone works
This is a browser-based shopping storefront: shoppers browse a product catalogue or category, filter/search items, and add products to a cart or wishlist; the cart supports quantity changes, billing, and a simulated purchase confirmation. Browser local storage holds cart, wishlist, and selected-category data, while session storage carries the selected category name. Location lookup uses browser geolocation and a reverse-geocoding service. The tree and sampled JavaScript support these responsibilities, but README and HTML wiring were not provided, so page-to-script loading links are not asserted.
Main entry points: Cart.js Cart operations · Wishlist.js Wishlist logic · script.js Category browser · Products.js Product catalogue
Components 18
Product browsing
- Storefront
index.html - Category browser
script.js - Products page
Products.html - Product catalogue
Products.js - Category page
Category.html - Category listing
Category.js - Product catalogue API
Cart and wishlist
- Cart page
Cart.html - Checkout and bill
Order.js - Wishlist page
Wishlist.html - Wishlist logic
Wishlist.js - Cart operations
Cart.js
Browser state
- Local and session storage
Location lookup
- Browser geolocation
- Saved location lookup
location.js - Location lookup
script.js - Reverse geocoding
Other components
- Shopper
Connections 24
- Shopper → Storefront: opens storefront
- Shopper → Products page: browses products
- Shopper → Category page: opens category
- Shopper → Cart page: reviews cart
- Shopper → Wishlist page: manages wishlist
- Category browser → Product catalogue API: fetches category
- Category browser → Local and session storage: stores category data
- Category browser → Category page: navigates after fetch
- Product catalogue → Product catalogue API: fetches products
- Product catalogue → Cart operations: changes quantities
- Product catalogue → Wishlist logic: toggles wishlist
- Category listing → Local and session storage: reads category data
- Category listing → Cart operations: changes quantities
- Category listing → Wishlist logic: toggles wishlist
- Checkout and bill → Cart operations: reads and deletes items
- Checkout and bill → Local and session storage: clears cart
- Wishlist logic → Local and session storage: reads and writes wishlist
- Wishlist logic → Cart operations: moves product to cart
- Cart operations → Local and session storage: reads and writes cart
- Saved location lookup → Local and session storage: reads and saves location
- Saved location lookup → Browser geolocation: requests coordinates
- Saved location lookup → Reverse geocoding: fetches address
- Location lookup → Browser geolocation: requests coordinates
- Location lookup → Reverse geocoding: fetches address