How haruto1508/sen_da_store works
Sen Xinh Garden is a succulent e-commerce application: customers browse products, manage a cart, check out, and follow or review orders; staff manage the catalog, orders, customers, coupons, and shipping. The graph includes the React entry point, API boundary, and Spring controller/service/repository layers, plus documented-by-tree integrations. The README is empty and source excerpts are partial, so uncertain wiring—especially unsampled frontend routes and backend services—is omitted.
Main entry points: OrderService.java Order lifecycle · api.js API client · AdminController.java Admin API · AdminService.java Admin operations
Components 28
Customer storefront
- React app
frontend/src/App.jsx - Store pages
frontend/src/pages - API client
frontend/src/services/api.js - Product reviews
frontend/src/components/product/ProductReviewsSection.jsx
Commerce backend
- Product API
backend/src/main/java/com/succulentshop/backend/controller/ProductController.java - Product service
backend/src/main/java/com/succulentshop/backend/service/ProductService.java - Cart API
backend/src/main/java/com/succulentshop/backend/controller/CartController.java - Cart validation
backend/src/main/java/com/succulentshop/backend/service/CartService.java - Order API
backend/src/main/java/com/succulentshop/backend/controller/OrderController.java - Order lifecycle
backend/src/main/java/com/succulentshop/backend/service/OrderService.java - Coupon API
backend/src/main/java/com/succulentshop/backend/controller/CouponController.java - Coupon rules
backend/src/main/java/com/succulentshop/backend/service/CouponService.java - Shipping rates
backend/src/main/java/com/succulentshop/backend/service/ShippingService.java - Order records
backend/src/main/java/com/succulentshop/backend/repository/OrderRepository.java - Product records
backend/src/main/java/com/succulentshop/backend/repository/ProductRepository.java
Identity and accounts
- Authentication API
backend/src/main/java/com/succulentshop/backend/controller/AuthController.java - Authentication
backend/src/main/java/com/succulentshop/backend/service/AuthService.java
Store operations
- Admin API
backend/src/main/java/com/succulentshop/backend/controller/AdminController.java - Admin operations
backend/src/main/java/com/succulentshop/backend/service/AdminService.java - Order events
backend/src/main/java/com/succulentshop/backend/event/OrderEventPublisher.java - Admin live feed
backend/src/main/java/com/succulentshop/backend/service/AdminOrderSseService.java - Live order hook
frontend/src/hooks/useOrderEvents.js
External integrations
- Transfer webhook
backend/src/main/java/com/succulentshop/backend/controller/BankTransferWebhookController.java - Transfer processing
backend/src/main/java/com/succulentshop/backend/service/BankTransferService.java - Image storage
backend/src/main/java/com/succulentshop/backend/service/CloudinaryService.java
Other components
- Shopper
- Store staff
- Cloudinary
Connections 32
- Shopper → React app: uses
- React app → Store pages: routes
- React app → API client: loads products
- Product reviews → API client: submits reviews
- API client → Product API: requests catalog
- API client → Coupon API: validates coupons
- API client → Order API: order requests
- API client → Cart API: cart requests
- Product API → Product service: delegates
- Cart API → Cart validation: delegates
- Order API → Order lifecycle: delegates
- Coupon API → Coupon rules: delegates
- Order lifecycle → Coupon rules: validates discount
- Order lifecycle → Shipping rates: calculates shipping
- Order lifecycle → Order records: reads and writes
- Product service → Product records: reads and writes
- Order lifecycle → Product records: checks stock
- Order API → Transfer webhook
- Transfer webhook → Transfer processing: delegates
- Store staff → Admin API: manages store
- Admin API → Admin operations: delegates
- Admin operations → Order records: manages orders
- Admin operations → Product records: manages stock
- Order lifecycle → Order events: publishes changes
- Admin operations → Order events: publishes changes
- Order events → Admin live feed: notifies
- Live order hook → API client: gets ticket
- Live order hook → Admin API: opens event stream
- Admin API → Admin live feed: subscribes
- Transfer processing → Order lifecycle: updates payment
- Admin API → Image storage: image operations
- Image storage → Cloudinary: uploads and deletes