How diwakarallu/flashsalex works
FlashSalex is a multi-service commerce backend. The apparent customer workflow enters through the API gateway, uses user, product, and cart capabilities, and proceeds through checkout into order, inventory, and payment processing; notifications and search are separate product capabilities. The excerpts directly show order creation, checkout-event handling, payment-result updates, and login token issuance. Most other service interactions are inferred from service boundaries and filenames, so those links are dashed and unverified rather than asserted as observed calls.
Main entry points: CheckoutService.java Checkout · OrderService.java Order processing · ProductServiceImpl.java Product catalog · CartService.java Cart
Components 20
Entry and identity
- API gateway
api-gateway/src/main/java/com/flashsalex/gateway/controller/GatewayProxyController.java - User accounts
user-svc/src/main/java/com/flashsalex/user/controller/UserController.java - Authentication
user-svc/src/main/java/com/flashsalex/user/service/AuthService.java - User store
user-svc/src/main/java/com/flashsalex/user/repository/UserRepository.java
Commerce workflow
- Cart
cart-svc/src/main/java/com/flashsalex/cart/service/CartService.java - Checkout
checkout-svc/src/main/java/com/flashsalex/checkout/service/CheckoutService.java - Checkout state
checkout-svc/src/main/java/com/flashsalex/checkout/entity/Checkout.java - Order processing
order-svc/src/main/java/com/flashsalex/order/service/OrderService.java - Order data
order-svc/src/main/java/com/flashsalex/order/repository/OrderRepository.java - Inventory reservations
inventory-svc/src/main/java/com/flashsalex/inventory/service/InventoryService.java - Payment processing
payment-svc/src/main/java/com/flashsalex/payment/service/PaymentService.java
Catalog and discovery
- Product catalog
product-svc/src/main/java/com/flashsalex/product/service/ProductServiceImpl.java - Product data
product-svc/src/main/java/com/flashsalex/product/repository/ProductRepository.java - Product search
search-svc/src/main/java/com/flashsalex/search/service/SearchService.java - Search index
search-svc/src/main/java/com/flashsalex/search/repository/ProductSearchRepository.java
Events and notifications
- Product change stream
cdc-svc/src/main/java/com/flashsalex/cdc/service/ProductChangeStreamPublisher.java - Kafka
- Notifications
notification-svc/src/main/java/com/flashsalex/notification/service/NotificationService.java - Notification data
notification-svc/src/main/java/com/flashsalex/notification/repository/NotificationRepository.java
Other components
- Customer
Connections 27
- Customer → API gateway: sends requests
- API gateway → User accounts: routes requests
- User accounts → Authentication: delegates login
- Authentication → User store: looks up account
user-svc/src/main/java/com/flashsalex/user/service/AuthService.java - Customer → Cart: manages cart
- Cart → Product catalog: checks products
- Customer → Checkout: starts checkout
- Checkout → Checkout state: stores state
- Checkout → Order processing: creates order
- Order processing → Order data: persists orders
order-svc/src/main/java/com/flashsalex/order/service/OrderService.java - Checkout → Cart: reads cart
- Checkout → Product catalog: checks prices
- Checkout → Kafka: publishes events
- Kafka → Inventory reservations: dispatches events
- Kafka → Payment processing: dispatches events
- Kafka → Order processing: dispatches events
- Kafka → Notifications: dispatches events
- Inventory reservations → Kafka: publishes results
- Payment processing → Kafka: publishes results
- Order processing → Kafka: publishes events
- Product catalog → Product data: reads and writes
- Product catalog → Product change stream: emits changes
- Product change stream → Kafka: publishes changes
- Kafka → Product search: delivers changes
- Product search → Search index: updates index
- Customer → Product search: searches catalog
- Notifications → Notification data: stores notifications