How sanjaybx1/shopping-website works
MAVZ is a small fashion-commerce site with a customer storefront, checkout, and password-protected administration. Customers browse and select products, maintain a local cart or wishlist, then submit an order; administrators manage the catalog and order statuses. The sampled code shows the Express API, JSON-backed product and order data, and browser clients. Some frontend and server sections are omitted, so links for unsampled behavior are limited to documented routes and visible calls.
Main entry points: main.js Storefront logic · server.js Admin API · admin.js Admin logic · index.html Store pages
Components 18
Customer storefront
- Store pages
mavz-store/public/index.html - Product page
mavz-store/public/product.html - Storefront logic
mavz-store/public/js/main.js - Cart and wishlist
mavz-store/public/js/main.js - Browser storage
mavz-store/public/js/main.js
Checkout and orders
- Checkout page
mavz-store/public/checkout.html - Order API
mavz-store/server.js
Store administration
- Admin panel
mavz-store/public/admin.html - Admin logic
mavz-store/public/js/admin.js - Admin API
mavz-store/server.js
Server and data
- Order records
mavz-store/data/orders.json - Product API
mavz-store/server.js - Product records
mavz-store/data/products.json - Image uploads
mavz-store/server.js - Store configuration
mavz-store/config.js - Express server
mavz-store/server.js
Other components
- Customer
- Administrator
Connections 23
- Customer → Store pages: browses
- Customer → Product page: selects products
- Store pages → Storefront logic: loads
- Product page → Storefront logic: loads
- Storefront logic → Product API: requests products
- Product API → Product records: reads
- Storefront logic → Cart and wishlist: manages selections
- Cart and wishlist → Browser storage: persists locally
- Customer → Checkout page: submits purchase
- Checkout page → Storefront logic: uses checkout logic
- Storefront logic → Order API: places order
- Order API → Product records: validates items
- Order API → Order records: writes order
- Administrator → Admin panel: manages store
- Admin panel → Admin logic: loads
- Admin logic → Admin API: requests admin actions
- Admin logic → Product API: loads catalog
- Admin API → Product records: updates catalog
- Admin API → Order records: reads and updates
- Admin API → Image uploads: stores images
- Express server → Store configuration: reads settings
- Express server → Store pages: serves static files
- Express server → Admin panel: serves static files