How adityaas2268/webtech works
This is a shopping marketplace with a React storefront and a checkout flow for saved addresses, delivery speed, and payment. The storefront manages product discovery, wishlisting, and cart state; checkout collects an address, calculates delivery totals, and submits payment through Express. The backend also exposes address operations backed by MySQL, while payment records are held in server memory. The excerpts show page composition and address/payment API calls, but not the storefront’s product-fetch implementation or all backend routes, so those links are omitted.
Main entry points: DeliveryOptionsPage.jsx Delivery selection · DeliveryAddressPage.jsx Address selection · server.js Express routes · AddressSection.jsx Address cards
Components 23
Marketplace
- Storefront
client/src/App.jsx - Product catalog data
client/src/data/products.js
Checkout
- Address selection
client/src/components/DeliveryAddressPage/DeliveryAddressPage.jsx - Address defaults
client/src/components/DeliveryAddressPage/DeliveryAddressPage.js - Address cards
client/src/components/DeliveryAddressPage/AddressSection/AddressSection.jsx - Saved address controls
client/src/components/DeliveryAddressPage/AddressSection/Elements/AddressCards.jsx - Address editor
client/src/components/DeliveryAddressPage/AddressSection/Elements/EditAddressModal.jsx - Editor side tips
client/src/components/DeliveryAddressPage/AddressSection/Elements/EditAddressModalSideTips.jsx - Address continuation
client/src/components/DeliveryAddressPage/AddressSection/Elements/SelectedDeliveryContinue.jsx - Address page header
client/src/components/DeliveryAddressPage/Elements/PageHeader.jsx - Address icons
client/src/components/DeliveryAddressPage/Elements/Icons.jsx - Delivery selection
client/src/components/DeliveryOptionsPage/DeliveryOptionsPage.jsx - Destination preview
client/src/components/DeliveryOptionsPage/Elements/SelectedDestinationPreview.jsx - Delivery options
client/src/components/DeliveryOptionsPage/Elements/DeliveryOptions.jsx - Order summary
client/src/components/DeliveryOptionsPage/Elements/OrderSummary.jsx - Order total
client/src/components/DeliveryOptionsPage/Elements/OrderTotal.jsx - Delivery header
client/src/components/DeliveryOptionsPage/Elements/Header.jsx - Payment page
client/src/pages/PaymentPage/PaymentPage.jsx
Backend API
- Express routes
server/server.js - MySQL connection pool
server/db.js - In-memory payments
server/server.js
Persistence
- MySQL database
database/schema.sql
Other components
- Shopper
Connections 25
- Shopper → Storefront: browses
- Storefront → Product catalog data: uses catalog
- Shopper → Address selection: enters address
- Address selection → Address defaults: loads defaults
client/src/components/DeliveryAddressPage/DeliveryAddressPage.jsx - Address selection → Address cards: renders
client/src/components/DeliveryAddressPage/DeliveryAddressPage.jsx - Address selection → Address page header: renders
client/src/components/DeliveryAddressPage/DeliveryAddressPage.jsx - Address selection → Address editor: renders
client/src/components/DeliveryAddressPage/DeliveryAddressPage.jsx - Address cards → Saved address controls: renders
client/src/components/DeliveryAddressPage/AddressSection/AddressSection.jsx - Address editor → Editor side tips: renders
client/src/components/DeliveryAddressPage/AddressSection/Elements/EditAddressModal.jsx - Address cards → Address icons: imports icons
client/src/components/DeliveryAddressPage/AddressSection/AddressSection.jsx - Address selection → Express routes: requests address APIs
client/src/components/DeliveryAddressPage/DeliveryAddressPage.jsx - Shopper → Delivery selection: chooses delivery
- Delivery selection → Destination preview: renders
client/src/components/DeliveryOptionsPage/DeliveryOptionsPage.jsx - Delivery selection → Delivery options: renders
client/src/components/DeliveryOptionsPage/DeliveryOptionsPage.jsx - Delivery selection → Order summary: renders
client/src/components/DeliveryOptionsPage/DeliveryOptionsPage.jsx - Delivery selection → Order total: renders
client/src/components/DeliveryOptionsPage/DeliveryOptionsPage.jsx - Delivery selection → Delivery header: renders
client/src/components/DeliveryOptionsPage/DeliveryOptionsPage.jsx - Destination preview → Address selection: navigates to
client/src/components/DeliveryOptionsPage/Elements/SelectedDestinationPreview.jsx - Delivery selection → Payment page: navigates to
client/src/components/DeliveryOptionsPage/DeliveryOptionsPage.jsx - Shopper → Payment page: submits payment
- Payment page → Express routes: posts transaction
client/src/pages/PaymentPage/PaymentPage.jsx - Express routes → In-memory payments: stores payment
server/server.js - Express routes → MySQL connection pool: queries
server/server.js - MySQL connection pool → MySQL database: connects to
server/db.js - Express routes → MySQL database: reads and writes addresses
server/server.js