How lbbz/hotshop works
HotShop is a modular commerce system with a React user/admin experience, Java transaction and operations services, asynchronous workers, and a Python shopping Agent. The main journey runs from browsing or purchase intent through regular ordering or flash-sale reservation, payment, and progress updates; Agent-generated purchase drafts require a separate user confirmation. The README also documents operations, audit, reconciliation, and knowledge retrieval. The graph follows those documented responsibilities; sampled source confirms selected order, confirmation, callback, audit-query, and reservation-processing behavior, while unsampled links rely on README descriptions.
Main entry points: src Web application · portal Portal API · hotshop_agent Agent service · admin Admin API
Components 29
Web experience
- Web application
web/src - Catalog and activities
web/src/features/catalog - Purchase and progress
web/src/features/transactions - Agent workspaces
web/src/features/agent - Admin pages
web/src/features/admin
Commerce APIs
- Portal API
portal/src/main/java/com/real/portal - Order lifecycle
domain/src/main/java/com/real/domain/service - Order state and stock
domain/src/main/java/com/real/domain/service/advance/OrderStateService.java - Flash-sale reservations
domain/src/main/java/com/real/domain/service/seckill - Purchase confirmation
domain/src/main/java/com/real/domain/agenttools/PurchaseConfirmationService.java - Mock payment callbacks
portal/src/main/java/com/real/portal/payment/MockPaymentCallbackService.java - Transaction timeline
portal/src/main/java/com/real/portal/timeline/TransactionTimelineService.java
Async processing
- Task workers
task/src/main/java/com/real/task - Reservation processing
task/src/main/java/com/real/task/seckill/SeckillProcessingService.java - Timeout and recovery
task/src/main/java/com/real/task/timeoutOrderTask/OrderTimeoutService.java - Outbox publishing
task/src/main/java/com/real/task/outbox
Agent capabilities
- Agent service
agent/src/hotshop_agent - Knowledge retrieval
agent/src/hotshop_agent/rag.py - Model providers
agent/src/hotshop_agent/providers
Operations and identity
- Admin API
admin/src/main/java/com/real/admin - Operations and audit
admin/src/main/java/com/real/admin/service/AdminOperationsService.java - Admin Agent tools
admin/src/main/java/com/real/admin/agenttools/AdminAgentToolService.java - Identity and delegation
security/src/main/java/com/real/security
Other components
- Shopper / admin
- MySQL
- Redis cache and streams
- RabbitMQ
- Qdrant
- Model service
Connections 43
- Shopper / admin → Web application: uses
README.md - Web application → Portal API: calls APIs
README.md - Web application → Admin API: calls APIs
README.md - Web application → Agent service: streams questions
README.md - Web application → Catalog and activities: renders
README.md - Web application → Purchase and progress: renders
README.md - Web application → Agent workspaces: renders
README.md - Web application → Admin pages: renders
README.md - Catalog and activities → Portal API: queries catalog
README.md - Purchase and progress → Portal API: submits purchases
README.md - Portal API → Order lifecycle: creates orders
README.md - Order lifecycle → Order state and stock: applies transitions
domain/src/main/java/com/real/domain/service/advance/OrderStateService.java - Order state and stock → MySQL: writes orders and outbox
domain/src/main/java/com/real/domain/service/advance/OrderStateService.java - Portal API → Flash-sale reservations: accepts reservations
README.md - Flash-sale reservations → Redis cache and streams: reserves stock and emits
README.md - Redis cache and streams → Reservation processing: delivers stream events
README.md - Reservation processing → MySQL: creates orders
task/src/main/java/com/real/task/seckill/SeckillProcessingService.java - Portal API → Mock payment callbacks: accepts callbacks
README.md - Mock payment callbacks → MySQL: records payment and outbox
portal/src/main/java/com/real/portal/payment/MockPaymentCallbackService.java - Task workers → Timeout and recovery: processes expiries
README.md - Timeout and recovery → MySQL: closes and compensates
README.md - Task workers → Outbox publishing: publishes events
README.md - Outbox publishing → RabbitMQ: publishes messages
README.md - RabbitMQ → Task workers: delivers messages
README.md - Portal API → Transaction timeline: serves progress
portal/src/main/java/com/real/portal/sse/TransactionEventStreamService.java - Transaction timeline → Redis cache and streams: reads reservation status
portal/src/main/java/com/real/portal/timeline/TransactionTimelineService.java - Agent service → Portal API: calls user tools
README.md - Agent service → Admin API: calls admin tools
README.md - Agent service → Knowledge retrieval: routes knowledge queries
README.md - Knowledge retrieval → Qdrant: searches evidence
README.md - Agent service → Model providers: orchestrates responses
README.md - Model providers → Model service: generates answers
README.md - Agent service → Redis cache and streams: stores session state
README.md - Agent service → Purchase confirmation: creates purchase drafts
README.md - Web application → Purchase confirmation: confirms purchase
README.md - Purchase confirmation → MySQL: consumes token and creates order
domain/src/main/java/com/real/domain/agenttools/PurchaseConfirmationService.java - Admin API → Operations and audit: serves operations
admin/src/main/java/com/real/admin/service/AdminOperationsService.java - Operations and audit → MySQL: queries operations and audit
- Admin API → Admin Agent tools: serves admin tools
admin/src/main/java/com/real/admin/agenttools/AdminAgentToolService.java - Admin Agent tools → MySQL: reads operational facts
README.md - Portal API → Identity and delegation: validates identity
README.md - Admin API → Identity and delegation: validates identity
README.md - Identity and delegation → MySQL: stores refresh sessions
security/src/main/java/com/real/security/service/RefreshSessionService.java