How didar-code/testprojectforservicebusandorchestraitor works
This repository implements an API-based commerce workflow with separate authentication, order, and payment subsystems, coordinated by an order-payment orchestrator. Users register or log in, create and search orders, and access payment operations; the orchestrator dispatches payment and order commands through a service bus. The graph also preserves repository-backed state, JWT token generation, and payment-query caching. Several handlers and integrations are listed in the tree but were not excerpted, so their internal relationships are omitted or shown as unverified dispatches.
Main entry points: ServiceBus.cs Service bus · AuthController.cs Auth API · LoginHandler.cs Login handler · GetPaymentHandler.cs Payment queries
Components 24
Authentication
- Auth API
AuthManagementSubSystem.Api/Controllers/AuthController.cs - Auth handlers
AuthManagementSubSystem.Handlers/Commands - Login handler
AuthManagementSubSystem.Handlers/Commands/LoginHandler.cs - User repository
AuthManagementSubSystem.Repository/Repositories/UserRepository.cs - Auth database
AuthManagementSubSystem.Repository/Data/AuthDbContext.cs - JWT tokens
AuthManagementSubSystem.Repository/Security/JwtTokenService.cs
Order Management
- Order API
OrderManagementSubsystem.Api/Controllers/OrderController.cs - Order command handlers
OrderManagementSubsystem.Handler/Commands - Order search
OrderManagementSubsystem.Handler/Queries/SearchOrderHandler.cs - Order repository
OrderManagementSubsystem.Repository/Repositories/OrderRepository.cs - Order database
OrderManagementSubsystem.Repository/Data/AppDbContext.cs
Payment Management
- Payment API
PaymentManagementSubSystem.Api/Controllers/PaymentController.cs - Payment handlers
PaymentManagementSubSystem.Handler/Commands - Payment queries
PaymentManagementSubSystem.Handler/Queries/GetPaymentHandler.cs - Payment repository
PaymentManagementSubSystem.Repository/Repositories/PaymentRepository.cs - Payment database
PaymentManagementSubSystem.Repository/Data/PaymentDbContext.cs - Payment cache
SharedSubSystem/Redis/Caching/RedisCacheService.cs
Workflow Coordination
- Orchestrator API
OrchestraitorSubSystem.Api/Controllers/OrchestratorController.cs - Order-payment workflow
OrchestraitorSubSystem.Handler/Orchestraitators/OrderPaymentOrchestrator.cs - Service bus
ServiceBus/ServiceBus.cs
Shared Runtime
- Command dispatch
SharedSubSystem/Generics/ICommandHandler.cs - Query dispatch
SharedSubSystem/Generics/IQueryHandler.cs - Exception middleware
SharedSubSystem/Middleware/GlobalExceptionMiddleware.cs
Other components
- User
Connections 20
- User → Auth API: submits credentials
AuthManagementSubSystem.Api/Controllers/AuthController.cs - Auth API → Auth handlers: dispatches commands
AuthManagementSubSystem.Api/Controllers/AuthController.cs - Auth API → Login handler: handles login
AuthManagementSubSystem.Api/Controllers/AuthController.cs - Login handler → User repository: loads user
AuthManagementSubSystem.Handlers/Commands/LoginHandler.cs - Login handler → JWT tokens: generates token
AuthManagementSubSystem.Handlers/Commands/LoginHandler.cs - User repository → Auth database: uses context
AuthManagementSubSystem.Repository/Repositories/UserRepository.cs - Order API → Order command handlers: dispatches commands
OrderManagementSubsystem.Api/Controllers/OrderController.cs - Order API → Order search: runs search
OrderManagementSubsystem.Api/Controllers/OrderController.cs - Order search → Order repository: searches orders
OrderManagementSubsystem.Handler/Queries/SearchOrderHandler.cs - Order repository → Order database: uses context
OrderManagementSubsystem.Repository/Repositories/OrderRepository.cs - Payment API → Payment handlers: dispatches commands
PaymentManagementSubSystem.Api/Controllers/PaymentController.cs - Payment API → Payment queries: gets payments
PaymentManagementSubSystem.Api/Controllers/PaymentController.cs - Payment queries → Payment repository: reads payments
PaymentManagementSubSystem.Handler/Queries/GetPaymentHandler.cs - Payment queries → Payment cache: uses cache
PaymentManagementSubSystem.Handler/Queries/GetPaymentHandler.cs - Payment repository → Payment database: uses context
PaymentManagementSubSystem.Repository/Repositories/PaymentRepository.cs - Orchestrator API → Order-payment workflow: runs workflow
OrchestraitorSubSystem.Api/Controllers/OrchestratorController.cs - Order-payment workflow → Service bus: dispatches commands
OrchestraitorSubSystem.Handler/Orchestraitators/OrderPaymentOrchestrator.cs - Service bus → Command dispatch: resolves handler
ServiceBus/ServiceBus.cs - Service bus → Payment handlers: dispatches payment
- Service bus → Order command handlers: dispatches order