Integrate Notification Service into Tender Management System

- Added a new notification service to handle various notification types (email, SMS, push, OTP).
- Implemented configuration for the notification service, allowing customization via environment variables.
- Updated user and customer services to utilize the notification service for sending welcome emails and status updates.
- Introduced a builder pattern for constructing notification requests, enhancing usability and flexibility.
- Enhanced error handling and logging for notification operations, ensuring robust service integration.
- Updated documentation to include usage examples and configuration details for the new notification SDK.
This commit is contained in:
n.nakhostin
2025-09-16 15:35:36 +03:30
parent 05a307e345
commit 108629278a
15 changed files with 1429 additions and 21 deletions
+5 -2
View File
@@ -122,6 +122,9 @@ func main() {
}
}()
// Initialize notification service
notificationSDK := bootstrap.InitNotificationService(conf.Notification, logger)
// Initialize authorization service
userAuthService := bootstrap.InitAuthorizationService(conf.UserAuth.JWT, redisClient, logger)
customerAuthService := bootstrap.InitAuthorizationService(conf.CustomerAuth.JWT, redisClient, logger)
@@ -143,10 +146,10 @@ func main() {
userValidator := user.NewValidationService()
// Initialize services with repositories
userService := user.NewUserService(userRepository, logger, userAuthService, userValidator)
userService := user.NewUserService(userRepository, logger, userAuthService, userValidator, notificationSDK)
categoryService := company_category.NewCategoryService(categoryRepository, logger)
companyService := company.NewCompanyService(companyRepository, categoryService, logger)
customerService := customer.New(customerRepository, logger, customerAuthService, companyService, redisClient)
customerService := customer.New(customerRepository, logger, customerAuthService, companyService, redisClient, notificationSDK)
tenderService := tender.NewTenderService(tenderRepository, companyService, logger)
feedbackService := feedback.NewFeedbackService(feedbackRepo, tenderService, logger)
tenderApprovalService := tender_approval.NewTenderApprovalService(tenderApprovalRepository, tenderService, logger)