How vishnuram18/isaac works
SmartShop is a buyer-and-seller e-commerce application: users browse or search products, manage a cart, authenticate, place orders, and manage their profiles; sellers also maintain listings. The frontend calls backend APIs through the gateway. Orders synchronously validate price and stock with the product service, then publish Kafka events for asynchronous stock changes. The graph includes the documented authentication, caching, seller, and order-lifecycle branches. Some UI and infrastructure relationships are README-documented rather than verified in sampled source.
Main entry points: GatewayConfig.java API gateway · page.tsx Shop and account pages · OrderService.java Order lifecycle · ProductService.java Catalog and stock logic
Components 24
Web storefront
- Shop and account pages
FRONT/smartshop-ui/app/page.tsx - Seller pages
FRONT/smartshop-ui/app/seller - Cart state
FRONT/smartshop-ui/context/CartContext.tsx - Add to cart
FRONT/smartshop-ui/components/AddToCartButton.tsx - Product search UI
FRONT/smartshop-ui/components/SearchBar.tsx - Frontend API client
FRONT/smartshop-ui/services/api.ts
Gateway and discovery
- API gateway
api-gateway/api-gateway/src/main/java/com/smartshop/api_gateway/config/GatewayConfig.java - Service registry
eureka-server/eureka-server/src/main/java/com/smartshop/eureka_server/EurekaServerApplication.java
Identity and profiles
- User endpoints
user-service/user-service/src/main/java/com/smartshop/user_service/controller/UserController.java - Auth and profiles
user-service/user-service/src/main/java/com/smartshop/user_service/service/UserService.java - User records
user-service/user-service/src/main/java/com/smartshop/user_service/repository/UserRepository.java - JWT issuance
user-service/user-service/src/main/java/com/smartshop/user_service/util/JwtUtil.java
Product catalog
- Product endpoints
product-service/product-service/src/main/java/com/smartshop/product_service/controller/ProductController.java - Catalog and stock logic
product-service/product-service/src/main/java/com/smartshop/product_service/service/ProductService.java - Product records
product-service/product-service/src/main/java/com/smartshop/product_service/repository/ProductRepository.java - Redis cache
product-service/product-service/src/main/java/com/smartshop/product_service/config/RedisConfig.java - Stock event consumer
product-service/product-service/src/main/java/com/smartshop/product_service/kafka/StockEventConsumer.java
Orders and stock
- Order endpoints
order-service/order-service/src/main/java/com/smartshop/order_service/controller/OrderController.java - Order lifecycle
order-service/order-service/src/main/java/com/smartshop/order_service/service/OrderService.java - Product lookup client
order-service/order-service/src/main/java/com/smartshop/order_service/client/ProductClient.java - Order records
order-service/order-service/src/main/java/com/smartshop/order_service/repository/OrderRepository.java - Order event publisher
order-service/order-service/src/main/java/com/smartshop/order_service/kafka/OrderEventPublisher.java - Kafka topics
Other components
- Buyer or seller
Connections 26
- Buyer or seller → Shop and account pages: uses
- Shop and account pages → Frontend API client: fetches products
FRONT/smartshop-ui/app/page.tsx - Shop and account pages → Product search UI: renders
FRONT/smartshop-ui/app/page.tsx - Shop and account pages → Add to cart: renders
FRONT/smartshop-ui/app/page.tsx - Add to cart → Cart state: adds item
FRONT/smartshop-ui/components/AddToCartButton.tsx - Buyer or seller → Seller pages: manages listings
- Seller pages → Frontend API client: calls listing APIs
FRONT/smartshop-ui/app/seller/page.tsx - Frontend API client → API gateway: sends REST requests
FRONT/smartshop-ui/services/api.ts - API gateway → User endpoints: routes requests
- API gateway → Product endpoints: routes requests
- API gateway → Order endpoints: routes requests
- API gateway → Service registry: discovers services
- User endpoints → Auth and profiles: delegates to
user-service/user-service/src/main/java/com/smartshop/user_service/controller/UserController.java - Auth and profiles → User records: reads and writes
user-service/user-service/src/main/java/com/smartshop/user_service/service/UserService.java - Auth and profiles → JWT issuance: issues token
user-service/user-service/src/main/java/com/smartshop/user_service/service/UserService.java - Product endpoints → Catalog and stock logic: delegates to
product-service/product-service/src/main/java/com/smartshop/product_service/controller/ProductController.java - Catalog and stock logic → Product records: reads and writes
product-service/product-service/src/main/java/com/smartshop/product_service/service/ProductService.java - Catalog and stock logic → Redis cache: caches results
- Order endpoints → Order lifecycle: delegates to
order-service/order-service/src/main/java/com/smartshop/order_service/controller/OrderController.java - Order lifecycle → Product lookup client: looks up product
order-service/order-service/src/main/java/com/smartshop/order_service/service/OrderService.java - Product lookup client → Product endpoints: fetches product
- Order lifecycle → Order records: reads and writes
order-service/order-service/src/main/java/com/smartshop/order_service/service/OrderService.java - Order lifecycle → Order event publisher: publishes events
order-service/order-service/src/main/java/com/smartshop/order_service/service/OrderService.java - Order event publisher → Kafka topics: sends events
- Kafka topics → Stock event consumer: delivers events
- Stock event consumer → Catalog and stock logic: updates stock