How niki8533/beadv1_1_dev_ground_be works
DBAY is a second-hand electronics marketplace. A buyer browses and searches listings, adds items to a cart, places an order, and pays using a user deposit; delivery completion later enables seller settlement. Sellers manage products and images, while users can chat in real time. The repository separates product, commerce, payments, and user services, with a shared core and gateway/service-discovery components. The sampled code confirms product indexing and image operations, chat-room lookups, and Saga state handling; some cross-service flows are documented in the README rather than shown in the excerpts.
Main entry points: gateway API gateway · ProductApplicationService.java Product management · OrderApplication.java Order lifecycle · PaymentService.java Payment processing
Components 20
Platform entry
- API gateway
gateway/src/main/java/io/devground/gateway - Service discovery
eureka-server/src/main/java/io/devground/eurekaserver/EurekaServerApplication.java - Shared contracts
core/src/main/java/io/devground/core/model/vo/ErrorCode.java
Catalog and discovery
- Product management
product/src/main/java/io/devground/product/product/application/service/ProductApplicationService.java - Search and suggestions
src/main/java/io/devground/dbay/domain/product/product/service/ProductSearchService.java - Product images
product/src/main/java/io/devground/product/image/application/service/ImageApplicationService.java - Image object storage
product/src/main/java/io/devground/product/image/infrastructure/adapter/out/S3Service.java
Cart and orders
- Shopping cart
commerce/src/main/java/io/devground/dbay/cart/application/service/CartApplication.java - Order lifecycle
commerce/src/main/java/io/devground/dbay/order/application/service/OrderApplication.java - Commerce persistence
commerce/src/main/java/io/devground/dbay/order/infrastructure/adapter/out/persistence/OrderPersistenceAdapter.java
Payments and settlement
- Deposit accounts
payments/src/main/java/io/devground/payments/deposit/application/service/DepositApplication.java - Payment processing
payments/src/main/java/io/devground/payments/payment/service/PaymentService.java - Seller settlement
payments/src/main/java/io/devground/payments/settlement/service/SettlementService.java - Payment Saga state
payments/src/main/java/io/devground/payments/common/saga/service/SagaService.java
Users and messaging
- User accounts
user/src/main/java/io/devground/user/service/UserService.java - Authentication
user/src/main/java/io/devground/auth/service/ReissueService.java - Chat rooms
user/src/main/java/io/devground/chat/service/ChatRoomService.java - Chat messages
user/src/main/java/io/devground/chat/repository/MessageRepository.java
Other components
- Buyer or seller
- Toss Pay
Connections 25
- Buyer or seller → API gateway: sends requests
- API gateway → Product management: routes requests
- API gateway → Shopping cart: routes requests
- API gateway → Order lifecycle: routes requests
- API gateway → User accounts: routes requests
- API gateway → Payment processing: routes requests
- API gateway → Service discovery: uses discovery
- Buyer or seller → Product management: manages listings
- Product management → Search and suggestions: publishes updates
product/src/main/java/io/devground/product/product/application/service/ProductApplicationService.java - Product management → Product images: requests image URLs
product/src/main/java/io/devground/product/product/application/service/ProductApplicationService.java - Product images → Image object storage: uses storage
- Buyer or seller → Search and suggestions: searches listings
- Buyer or seller → Shopping cart: manages cart
- Shopping cart → Order lifecycle: orders cart items
- Order lifecycle → Commerce persistence: persists orders
- Order lifecycle → Product management: checks products
- Order lifecycle → Deposit accounts: charges deposit
- Payment processing → Toss Pay: confirms payment
- Payment processing → Deposit accounts: funds deposit
- Seller settlement → Deposit accounts: settles funds
- Payment processing → Payment Saga state: tracks Saga
- Buyer or seller → User accounts: registers and signs in
- Buyer or seller → Chat rooms: chats with seller
- Chat rooms → Chat messages: reads messages
user/src/main/java/io/devground/chat/service/ChatRoomService.java - Chat rooms → Product management: fetches product detail
user/src/main/java/io/devground/chat/service/ChatRoomService.java