How ttbhanh/eshop-sut works
EShop is a multi-client commerce application: shoppers browse and search products, manage a cart, apply coupons, and submit orders; account flows cover registration, login, recovery, profiles, and order history. The web storefront and mobile app call the Express API, which uses SQLite for persistent records. A separate admin client supports catalog, coupon, user, and order operations. The README documents additional order-state and dashboard capabilities, but their implementation details are not fully sampled; those branches are represented at subsystem level. Edges reflect shown imports, calls, and documented capabilities.
Main entry points: App.jsx Web app routing · server.js Commerce API · Checkout.jsx Checkout · CartContext.jsx Cart state
Components 19
Web storefront
- Web app routing
frontend-web/src/App.jsx - Authentication state
frontend-web/src/context/AuthContext.jsx - Cart state
frontend-web/src/context/CartContext.jsx - Product catalog
frontend-web/src/pages/Home.jsx - Product detail
frontend-web/src/pages/ProductDetail.jsx - Cart page
frontend-web/src/pages/Cart.jsx - Checkout
frontend-web/src/pages/Checkout.jsx - Login
frontend-web/src/pages/Login.jsx - Registration
frontend-web/src/pages/Register.jsx - Profile and orders
frontend-web/src/pages/Profile.jsx - Password recovery
frontend-web/src/pages/ForgotPassword.jsx
Commerce API
- Commerce API
backend/server.js - SQLite data store
backend/database.js - Order management
backend - Coupon management
backend/server.js
Admin console
- Admin console
frontend-admin/src/App.jsx - Admin operations
backend
Mobile app
- Mobile storefront
frontend-mobile/App.js
Other components
- Shopper
Connections 35
- Shopper → Web app routing: uses
frontend-web/src/App.jsx - Web app routing → Product catalog: routes to
frontend-web/src/App.jsx - Web app routing → Product detail: routes to
frontend-web/src/App.jsx - Web app routing → Cart page: routes to
frontend-web/src/App.jsx - Web app routing → Checkout: routes to
frontend-web/src/App.jsx - Web app routing → Login: routes to
frontend-web/src/App.jsx - Web app routing → Registration: routes to
frontend-web/src/App.jsx - Web app routing → Profile and orders: routes to
frontend-web/src/App.jsx - Web app routing → Password recovery: routes to
frontend-web/src/App.jsx - Web app routing → Authentication state: provides state
frontend-web/src/App.jsx - Web app routing → Cart state: provides state
frontend-web/src/App.jsx - Product catalog → Commerce API: fetches products
frontend-web/src/pages/Home.jsx - Product catalog → Cart state: adds products
frontend-web/src/pages/Home.jsx - Product detail → Cart state: adds products
frontend-web/src/pages/ProductDetail.jsx - Cart page → Cart state: uses cart
frontend-web/src/pages/Cart.jsx - Checkout → Cart state: reads and clears
frontend-web/src/pages/Checkout.jsx - Checkout → Authentication state: reads identity
frontend-web/src/pages/Checkout.jsx - Checkout → Commerce API: submits checkout
frontend-web/src/pages/Checkout.jsx - Checkout → Coupon management: applies coupon
frontend-web/src/pages/Checkout.jsx - Checkout → Commerce API: records coupon use
frontend-web/src/pages/Checkout.jsx - Login → Authentication state: calls login
frontend-web/src/pages/Login.jsx - Registration → Commerce API: registers account
- Password recovery → Commerce API: requests recovery
- Profile and orders → Authentication state: reads identity
frontend-web/src/pages/Profile.jsx - Profile and orders → Commerce API: updates profile
frontend-web/src/pages/Profile.jsx - Profile and orders → Order management: loads and cancels
frontend-web/src/pages/Profile.jsx - Commerce API → SQLite data store: queries and updates
backend/server.js - Commerce API → Order management: handles order requests
backend/server.js - Commerce API → Coupon management: handles coupon requests
backend/server.js - Shopper → Mobile storefront: uses
frontend-mobile/App.js - Mobile storefront → Commerce API: fetches products and orders
frontend-mobile/App.js - Admin console → Commerce API: calls admin endpoints
frontend-admin/src/App.jsx - Admin console → Admin operations: manages catalog and coupons
frontend-admin/src/App.jsx - Admin operations → Order management: supports order operations
- Admin operations → SQLite data store: uses commerce records
backend/server.js