How akhssasi/e-commerce-platform works
Souqi Market is a Spring Boot e-commerce API. Customers register and log in, browse products, manage a cart, and place an order; the documented purchase flow checks idempotency, reserves stock, creates the order and an outbox event, then processes payment with a circuit-breaker fallback. A scheduled publisher forwards events to Kafka, where a consumer deduplicates notifications. The graph preserves catalog administration, Redis caching, and admin order access. Relationships are based on the README’s endpoints, feature descriptions, and purchase-flow diagram; source excerpts were not available.
Main entry points: OrderService.java Order service · CatalogService.java Catalog service · OrderFacade.java Order facade · CatalogController.java Catalog API
Components 26
Identity and security
- Auth API
src/main/java/com/example/market/auth/AuthController.java - Auth service
src/main/java/com/example/market/auth/AuthService.java - JWT security
src/main/java/com/example/market/auth/JwtAuthenticationFilter.java
Catalog and cart
- Catalog API
src/main/java/com/example/market/catalog/CatalogController.java - Catalog service
src/main/java/com/example/market/catalog/CatalogService.java - Product store
src/main/java/com/example/market/catalog/ProductRepository.java - Redis cache
- Cart API
src/main/java/com/example/market/cart/CartController.java - Cart service
src/main/java/com/example/market/cart/CartService.java - Cart store
src/main/java/com/example/market/cart/CartRepository.java
Orders and payment
- Order API
src/main/java/com/example/market/order/OrderController.java - Order facade
src/main/java/com/example/market/order/OrderFacade.java - Order service
src/main/java/com/example/market/order/OrderService.java - Order store
src/main/java/com/example/market/order/OrderRepository.java - Idempotency records
src/main/java/com/example/market/order/IdempotencyRepository.java - Payment gateway
src/main/java/com/example/market/payment/PaymentGatewayClient.java
Events and notifications
- Outbox service
src/main/java/com/example/market/outbox/OutboxService.java - Outbox store
src/main/java/com/example/market/outbox/OutboxRepository.java - Outbox publisher
src/main/java/com/example/market/outbox/OutboxPublisher.java - Kafka
- Notification consumer
src/main/java/com/example/market/notification/OrderNotificationConsumer.java - Notification log
src/main/java/com/example/market/notification/NotificationLogRepository.java
Shared platform
- PostgreSQL
- API errors and tracing
src/main/java/com/example/market/common/GlobalExceptionHandler.java
Other components
- Customer
- Administrator
Connections 23
- Customer → Auth API: registers or logs in
README.md - Customer → Catalog API: browses products
README.md - Administrator → Catalog API: manages catalog
README.md - Customer → Cart API: manages cart
README.md - Customer → Order API: places orders
README.md - Administrator → Order API: lists orders
README.md - Order API → Order facade: delegates purchase
README.md - Order facade → Order service: places order
README.md - Order facade → Payment gateway: requests payment
README.md - Order service → Idempotency records: checks key
README.md - Order service → Order store: creates order
README.md - Order service → Outbox service: writes event
README.md - Payment gateway → Order service: reports result
README.md - Outbox service → Outbox store: persists event
README.md - Outbox publisher → Outbox store: publishes pending events
README.md - Outbox publisher → Kafka: sends events
README.md - Kafka → Notification consumer: delivers messages
README.md - Notification consumer → Notification log: deduplicates notifications
README.md - Catalog API → Catalog service: serves catalog
- Catalog service → Product store: queries products
- Catalog service → Redis cache: uses cache
README.md - Cart API → Cart service: serves cart
- Cart service → Cart store: persists cart