├── .gitignore ├── README.md ├── application ├── build.gradle └── src │ └── main │ ├── order │ └── commandhandlers │ │ ├── OrderCommandHandlers.kt │ │ └── commands │ │ ├── AddProductCommand.kt │ │ ├── ChangeProductQuantityCommand.kt │ │ ├── CreateOrderCommand.kt │ │ ├── PayOrderCommand.kt │ │ └── RemoveProductCommand.kt │ └── shipping │ └── eventhandlers │ └── ShipOrderAndNotifyUser.kt ├── docs ├── images │ ├── command_side.jpg │ ├── command_side_with_events.jpg │ └── query_side.jpg └── postman_example_requests.json ├── domain ├── build.gradle └── src │ ├── main │ ├── BusinessException.kt │ ├── order │ │ ├── Item.kt │ │ ├── Order.kt │ │ ├── OrderPaid.kt │ │ ├── OrderRepository.kt │ │ ├── Product.kt │ │ ├── customer │ │ │ ├── Address.kt │ │ │ └── Customer.kt │ │ └── payment │ │ │ ├── CreditCard.kt │ │ │ └── PaymentService.kt │ └── shipping │ │ ├── DeliveryProviderService.kt │ │ ├── NotificationService.kt │ │ ├── ShippingLabel.kt │ │ └── ShippingService.kt │ └── test │ └── order │ └── OrderTest.kt ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── infrastructure ├── build.gradle └── src │ └── main │ ├── queries │ ├── OrdersQuery.kt │ └── dtos │ │ ├── FilteredOrderDTO.kt │ │ └── OrderPerUsersDTO.kt │ ├── repositories │ └── OrderRepositoryImpl.kt │ └── services │ ├── EmailNotificationService.kt │ ├── FedExDeliveryService.kt │ └── PaymentServiceImpl.kt ├── settings.gradle └── web ├── build.gradle └── src └── main ├── DDDSampleApplication.kt ├── configuration └── injection │ ├── AMQPRabbitConfiguration.kt │ ├── CommandHandlers.kt │ ├── EventHandlers.kt │ ├── Repositories.kt │ └── Services.kt ├── controllers └── OrdersController.kt ├── models ├── AddProductRequest.kt ├── ChangeProductQuantityRequest.kt ├── CreateOrderRequest.kt └── PayOrderRequest.kt └── resources └── application.properties /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/README.md -------------------------------------------------------------------------------- /application/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | implementation project(":domain") 3 | } -------------------------------------------------------------------------------- /application/src/main/order/commandhandlers/OrderCommandHandlers.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/application/src/main/order/commandhandlers/OrderCommandHandlers.kt -------------------------------------------------------------------------------- /application/src/main/order/commandhandlers/commands/AddProductCommand.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/application/src/main/order/commandhandlers/commands/AddProductCommand.kt -------------------------------------------------------------------------------- /application/src/main/order/commandhandlers/commands/ChangeProductQuantityCommand.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/application/src/main/order/commandhandlers/commands/ChangeProductQuantityCommand.kt -------------------------------------------------------------------------------- /application/src/main/order/commandhandlers/commands/CreateOrderCommand.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/application/src/main/order/commandhandlers/commands/CreateOrderCommand.kt -------------------------------------------------------------------------------- /application/src/main/order/commandhandlers/commands/PayOrderCommand.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/application/src/main/order/commandhandlers/commands/PayOrderCommand.kt -------------------------------------------------------------------------------- /application/src/main/order/commandhandlers/commands/RemoveProductCommand.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/application/src/main/order/commandhandlers/commands/RemoveProductCommand.kt -------------------------------------------------------------------------------- /application/src/main/shipping/eventhandlers/ShipOrderAndNotifyUser.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/application/src/main/shipping/eventhandlers/ShipOrderAndNotifyUser.kt -------------------------------------------------------------------------------- /docs/images/command_side.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/docs/images/command_side.jpg -------------------------------------------------------------------------------- /docs/images/command_side_with_events.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/docs/images/command_side_with_events.jpg -------------------------------------------------------------------------------- /docs/images/query_side.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/docs/images/query_side.jpg -------------------------------------------------------------------------------- /docs/postman_example_requests.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/docs/postman_example_requests.json -------------------------------------------------------------------------------- /domain/build.gradle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/domain/build.gradle -------------------------------------------------------------------------------- /domain/src/main/BusinessException.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/domain/src/main/BusinessException.kt -------------------------------------------------------------------------------- /domain/src/main/order/Item.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/domain/src/main/order/Item.kt -------------------------------------------------------------------------------- /domain/src/main/order/Order.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/domain/src/main/order/Order.kt -------------------------------------------------------------------------------- /domain/src/main/order/OrderPaid.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/domain/src/main/order/OrderPaid.kt -------------------------------------------------------------------------------- /domain/src/main/order/OrderRepository.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/domain/src/main/order/OrderRepository.kt -------------------------------------------------------------------------------- /domain/src/main/order/Product.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/domain/src/main/order/Product.kt -------------------------------------------------------------------------------- /domain/src/main/order/customer/Address.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/domain/src/main/order/customer/Address.kt -------------------------------------------------------------------------------- /domain/src/main/order/customer/Customer.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/domain/src/main/order/customer/Customer.kt -------------------------------------------------------------------------------- /domain/src/main/order/payment/CreditCard.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/domain/src/main/order/payment/CreditCard.kt -------------------------------------------------------------------------------- /domain/src/main/order/payment/PaymentService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/domain/src/main/order/payment/PaymentService.kt -------------------------------------------------------------------------------- /domain/src/main/shipping/DeliveryProviderService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/domain/src/main/shipping/DeliveryProviderService.kt -------------------------------------------------------------------------------- /domain/src/main/shipping/NotificationService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/domain/src/main/shipping/NotificationService.kt -------------------------------------------------------------------------------- /domain/src/main/shipping/ShippingLabel.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/domain/src/main/shipping/ShippingLabel.kt -------------------------------------------------------------------------------- /domain/src/main/shipping/ShippingService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/domain/src/main/shipping/ShippingService.kt -------------------------------------------------------------------------------- /domain/src/test/order/OrderTest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/domain/src/test/order/OrderTest.kt -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/gradle/wrapper/gradle-wrapper.properties -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/gradlew -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/gradlew.bat -------------------------------------------------------------------------------- /infrastructure/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | implementation project(":domain") 3 | } -------------------------------------------------------------------------------- /infrastructure/src/main/queries/OrdersQuery.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/infrastructure/src/main/queries/OrdersQuery.kt -------------------------------------------------------------------------------- /infrastructure/src/main/queries/dtos/FilteredOrderDTO.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/infrastructure/src/main/queries/dtos/FilteredOrderDTO.kt -------------------------------------------------------------------------------- /infrastructure/src/main/queries/dtos/OrderPerUsersDTO.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/infrastructure/src/main/queries/dtos/OrderPerUsersDTO.kt -------------------------------------------------------------------------------- /infrastructure/src/main/repositories/OrderRepositoryImpl.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/infrastructure/src/main/repositories/OrderRepositoryImpl.kt -------------------------------------------------------------------------------- /infrastructure/src/main/services/EmailNotificationService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/infrastructure/src/main/services/EmailNotificationService.kt -------------------------------------------------------------------------------- /infrastructure/src/main/services/FedExDeliveryService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/infrastructure/src/main/services/FedExDeliveryService.kt -------------------------------------------------------------------------------- /infrastructure/src/main/services/PaymentServiceImpl.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/infrastructure/src/main/services/PaymentServiceImpl.kt -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/settings.gradle -------------------------------------------------------------------------------- /web/build.gradle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/web/build.gradle -------------------------------------------------------------------------------- /web/src/main/DDDSampleApplication.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/web/src/main/DDDSampleApplication.kt -------------------------------------------------------------------------------- /web/src/main/configuration/injection/AMQPRabbitConfiguration.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/web/src/main/configuration/injection/AMQPRabbitConfiguration.kt -------------------------------------------------------------------------------- /web/src/main/configuration/injection/CommandHandlers.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/web/src/main/configuration/injection/CommandHandlers.kt -------------------------------------------------------------------------------- /web/src/main/configuration/injection/EventHandlers.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/web/src/main/configuration/injection/EventHandlers.kt -------------------------------------------------------------------------------- /web/src/main/configuration/injection/Repositories.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/web/src/main/configuration/injection/Repositories.kt -------------------------------------------------------------------------------- /web/src/main/configuration/injection/Services.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/web/src/main/configuration/injection/Services.kt -------------------------------------------------------------------------------- /web/src/main/controllers/OrdersController.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/web/src/main/controllers/OrdersController.kt -------------------------------------------------------------------------------- /web/src/main/models/AddProductRequest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/web/src/main/models/AddProductRequest.kt -------------------------------------------------------------------------------- /web/src/main/models/ChangeProductQuantityRequest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/web/src/main/models/ChangeProductQuantityRequest.kt -------------------------------------------------------------------------------- /web/src/main/models/CreateOrderRequest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/web/src/main/models/CreateOrderRequest.kt -------------------------------------------------------------------------------- /web/src/main/models/PayOrderRequest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/web/src/main/models/PayOrderRequest.kt -------------------------------------------------------------------------------- /web/src/main/resources/application.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Creditas/kotlin-ddd-sample/HEAD/web/src/main/resources/application.properties --------------------------------------------------------------------------------