How wijdanebassiry/lab2 works
MSOA Shop is a microservice-backed storefront. A customer browses products, manages a cart, signs in, checks out, and follows orders and shipments; the frontend routes those experiences and calls service APIs. Backend services separate identity, catalog, stock, orders, payments, and shipment lifecycle. The sampled sources show frontend authentication and API plumbing, inventory and payment route delegation, and shipping orchestration. Several page and service implementations were not sampled, so their internal calls and some cross-service links are omitted or marked unverified.
Main entry points: App.jsx App Routes · apiClient.js API Client · orderService.js Order Client · routes.py Payment Routes
Components 34
Storefront
- App Routes
front/src/App.jsx - Product Browse
front/src/pages/Products.jsx - Cart
front/src/pages/Cart.jsx - Checkout
front/src/pages/Checkout.jsx - Order History
front/src/pages/Orders.jsx - Account
front/src/pages/Account.jsx - Sign In
front/src/pages/Login.jsx
Frontend Services
- Auth State
front/src/context/AuthContext.jsx - Cart State
front/src/context/CartContext.jsx - Auth Client
front/src/services/authService.js - API Client
front/src/services/apiClient.js - Backend Endpoints
front/src/config/backend.js - Catalog Client
front/src/services/catalogService.js - Inventory Client
front/src/services/inventoryService.js - Order Client
front/src/services/orderService.js - Payment Client
front/src/services/paymentService.js - Shipping Client
front/src/services/shippingService.js
Commerce Services
- Catalog API
msoa-backend/catalog-service/server.js - Inventory Routes
msoa-backend/inventory-service/app/routes.py - Stock Logic
msoa-backend/inventory-service/app/service.py - Inventory Store
msoa-backend/inventory-service/app/database.py - Orders API
msoa-backend/orders-service/server.js - Payment Routes
msoa-backend/payments-service/app/routes.py - Payment Logic
msoa-backend/payments-service/app/service.py - Payment Store
msoa-backend/payments-service/app/database.py - Simulated Gateway
msoa-backend/payments-service/app/gateway/simulated.py
Fulfillment Services
- Shipment API
msoa-backend/shipping-service/src/main/java/com/msoa/shipping_service/controller/ShipmentController.java - Shipment Logic
msoa-backend/shipping-service/src/main/java/com/msoa/shipping_service/service/ShipmentService.java - Shipment Store
msoa-backend/shipping-service/src/main/java/com/msoa/shipping_service/repository/ShipmentRepository.java - Order Client
msoa-backend/shipping-service/src/main/java/com/msoa/shipping_service/client/OrderClient.java
Identity
- Accounts API
msoa-backend/auth-service/accounts/views.py - Token Client
msoa-backend/shipping-service/src/main/java/com/msoa/shipping_service/client/AuthClient.java - JWT Filter
msoa-backend/shipping-service/src/main/java/com/msoa/shipping_service/security/JwtAuthenticationFilter.java
Other components
- Customer
Connections 33
- Customer → App Routes: uses
- App Routes → Product Browse: routes
front/src/App.jsx - App Routes → Cart: routes
front/src/App.jsx - App Routes → Checkout: routes
front/src/App.jsx - App Routes → Order History: routes
front/src/App.jsx - App Routes → Sign In: routes
front/src/App.jsx - App Routes → Account: routes
front/src/App.jsx - Auth State → Auth Client: calls
front/src/context/AuthContext.jsx - Auth Client → API Client: calls
front/src/services/authService.js - Auth Client → Backend Endpoints: reads URLs
front/src/services/authService.js - Catalog Client → API Client: calls
- Inventory Client → API Client: calls
front/src/services/inventoryService.js - Inventory Client → Backend Endpoints: reads URLs
front/src/services/inventoryService.js - Order Client → API Client: calls
front/src/services/orderService.js - Order Client → Inventory Client: calls
front/src/services/orderService.js - Order Client → Shipping Client: calls
front/src/services/orderService.js - Shipping Client → API Client: calls
front/src/services/shippingService.js - Payment Client → API Client: calls
- Inventory Routes → Stock Logic: delegates
msoa-backend/inventory-service/app/routes.py - Inventory Routes → Inventory Store: queries
msoa-backend/inventory-service/app/routes.py - Payment Routes → Payment Logic: delegates
msoa-backend/payments-service/app/routes.py - Payment Routes → Payment Store: queries
msoa-backend/payments-service/app/routes.py - Payment Routes → Simulated Gateway: passes gateway
msoa-backend/payments-service/app/routes.py - Shipment API → Shipment Logic: calls
msoa-backend/shipping-service/src/main/java/com/msoa/shipping_service/controller/ShipmentController.java - Shipment Logic → Shipment Store: reads and writes
msoa-backend/shipping-service/src/main/java/com/msoa/shipping_service/service/ShipmentService.java - Shipment Logic → Order Client: verifies orders
msoa-backend/shipping-service/src/main/java/com/msoa/shipping_service/service/ShipmentService.java - JWT Filter → Token Client: verifies token
msoa-backend/shipping-service/src/main/java/com/msoa/shipping_service/security/JwtAuthenticationFilter.java - Shipment API → JWT Filter: gets authorization
msoa-backend/shipping-service/src/main/java/com/msoa/shipping_service/controller/ShipmentController.java - Order Client → Orders API: HTTP checks
- Token Client → Accounts API: HTTP verifies
- Checkout → Order Client: submits order
- Checkout → Payment Client: requests payment
- Order History → Shipping Client: loads tracking