How vaishnavi21m/ecommerce-ui works
This is a small React storefront: users browse a hard-coded product list and can trigger an add-to-cart alert. Its service worker adds asset caching, a placeholder background-sync routine, and push-event notifications. The sync routine does not persist or transmit orders, and the UI’s PUSH_TEST message has no matching message handler in the sampled worker; those behaviors are not represented as completed workflows.
Main entry points: service-worker.js Service worker · App.js Product storefront · index.js React entry
Components 8
Storefront UI
- React entry
src/index.js - Product storefront
src/App.js
PWA runtime
- Service worker
public/service-worker.js - Order sync stub
public/service-worker.js
Browser services
- Cache Storage
- Network
- Notifications
Other components
- Shopper
Connections 13
- Shopper → React entry: opens store
- React entry → Product storefront: renders
- Product storefront → Shopper: shows catalog
- Shopper → Product storefront: adds item
- Product storefront → Shopper: shows alert
- React entry → Service worker: registers
- Product storefront → Service worker: registers sync
- Service worker → Order sync stub: runs sync
- Product storefront → Service worker: posts test message
- Service worker → Cache Storage: caches assets
- Service worker → Cache Storage: checks cache
- Service worker → Network: fetches fallback
- Service worker → Notifications: shows notification