Drahten

Topic Article Service Project Structure

The project is divided into four main layers:

This structured approach ensures a clear separation of concerns, making the codebase easier to manage and extend. Below is an outline of the project’s directory structure:

------------------------------------------------------------------
TopicArticleService
β”œβ”€β”€ src πŸ“¦
β”‚   β”œβ”€β”€ TopicArticleService.Domain πŸ“‚
β”‚   β”‚   β”œβ”€β”€ Entities πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt
β”‚   β”‚   β”‚   β”œβ”€β”€ AggregateRoot.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ Article.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleComment.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ Topic.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ User.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ Events πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt 
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentAdded.cs 
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentChildAdded.cs 
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentChildRemoved.cs 
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentDislikeAdded.cs 
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentDislikeRemoved.cs 
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentLikeAdded.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentLikeRemoved.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentRemoved.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleDislikeAdded.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleDislikeRemoved.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleLikeAdded.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleLikeRemoved.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ IDomainEvent.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ TopicAdded.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ TopicChildAdded.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ UserArticleAdded.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ UserTopicAdded.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ Exceptions πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt 
β”‚   β”‚   β”‚   β”œβ”€β”€ <<CustomDomainLayerExceptions>>
----------------------------
β”‚   β”‚   β”œβ”€β”€ Factories πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt 
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentFactory.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleFactory.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ TopicFactory.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ UserFactory.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ IArticleCommentFactory.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ IArticleFactory.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ITopicFactory.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ IUserFactory.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ Repositories πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt 
β”‚   β”‚   β”‚   β”œβ”€β”€ IArticleCommentRepository.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ IArticleRepository.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ITopicRepository.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ IUserRepository.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ ValueObjects πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt 
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleAuthor.cs 
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentDateTime.cs 
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentDislike.cs 
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentID.cs 
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentLike.cs 
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleContent.cs 
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleDislike.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleID.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleLike.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleLink.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleListId.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticlePrevTitle.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticlePublishingDate.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleTitle.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ TopicFullName.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ TopicId.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ TopicName.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ UserArticle.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ UserID.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ UserTopic.cs
----------------------------
β”‚   β”œβ”€β”€ TopicArticleService.Application πŸ“‚
β”‚   β”‚   β”œβ”€β”€ AsyncDataServices πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ IMessageBusPublisher.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ Commands πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ Dispatcher πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt 
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ICommandDispatcher.cs 
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ InMemoryCommandDispatcher.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ Handlers πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt 
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AddArticleCommentDislikeHandler.cs 
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AddArticleCommentHandler.cs 
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AddArticleCommentLikeHandler.cs 
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AddArticleDislikeHandler.cs 
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AddArticleLikeHandler.cs 
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ CreateArticleHandler.cs 
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ICommandHandler.cs 
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterUserArticleHandler.cs 
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterUserHandler.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterUserTopicHandler.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ RemoveArticleCommentHandler.cs
β”‚   β”‚   |   β”œβ”€β”€ _README.txt 
β”‚   β”‚   |   β”œβ”€β”€ AddArticleCommentCommand.cs 
β”‚   β”‚   |   β”œβ”€β”€ AddArticleCommentDislikeCommand.cs 
β”‚   β”‚   |   β”œβ”€β”€ AddArticleCommentLikeCommand.cs 
β”‚   β”‚   |   β”œβ”€β”€ AddArticleDislikeCommand.cs 
β”‚   β”‚   |   β”œβ”€β”€ AddArticleLikeCommand.cs 
β”‚   β”‚   |   β”œβ”€β”€ CreateArticleCommand.cs 
β”‚   β”‚   |   β”œβ”€β”€ ICommand.cs 
β”‚   β”‚   |   β”œβ”€β”€ RegisterUserArticleCommand.cs 
β”‚   β”‚   |   β”œβ”€β”€ RegisterUserCommand.cs
β”‚   β”‚   |   β”œβ”€β”€ RegisterUserTopicCommand.cs
β”‚   β”‚   |   β”œβ”€β”€ RemoveArticleCommentCommand.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ Dtos πŸ“‚
β”‚   β”‚   |   β”œβ”€β”€ PrivateHistoryService πŸ“‚
β”‚   β”‚   β”‚   |   β”œβ”€β”€ CommentedArticleDto.cs
β”‚   β”‚   β”‚   |   β”œβ”€β”€ DislikedArticleCommentDto.cs
β”‚   β”‚   β”‚   |   β”œβ”€β”€ DislikedArticleDto.cs
β”‚   β”‚   β”‚   |   β”œβ”€β”€ LikedArticleCommentDto.cs
β”‚   β”‚   β”‚   |   β”œβ”€β”€ LikedArticleDto.cs
β”‚   β”‚   β”‚   |   β”œβ”€β”€ TopicSubscriptionDto.cs
β”‚   β”‚   β”‚   |   β”œβ”€β”€ ViewedArticleDto.cs
β”‚   β”‚   |   β”œβ”€β”€ SearchService πŸ“‚
β”‚   β”‚   β”‚   |   β”œβ”€β”€ DocumentDto.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt 
β”‚   β”‚   β”‚   β”œβ”€β”€ IssuedBanByUserDto.cs 
β”‚   β”‚   β”‚   β”œβ”€β”€ IssuedContactRequestByUserDto.cs 
β”‚   β”‚   β”‚   β”œβ”€β”€ ReceivedBanByUserDto.cs 
β”‚   β”‚   β”‚   β”œβ”€β”€ ReceivedContactRequestByUserDto.cs 
β”‚   β”‚   β”‚   β”œβ”€β”€ UserDto.cs 
β”‚   β”‚   β”‚   β”œβ”€β”€ UserPublishedDto.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ Exceptions πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt 
β”‚   β”‚   β”‚   β”œβ”€β”€ <<CustomApplicationLayerExceptions>>
----------------------------
β”‚   β”‚   β”œβ”€β”€ Extensions πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ ServiceCollectionExtensions.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ Queries πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ Dispatcher πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt 
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ InMemoryQueryDispatcher.cs 
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ IQueryDispatcher.cs
β”‚   β”‚   |   β”œβ”€β”€ Handlers πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt 
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ IQueryHandler.cs 
β”‚   β”‚   |   β”œβ”€β”€ _README.txt 
β”‚   β”‚   |   β”œβ”€β”€ GetArticleCommentsQuery.cs 
β”‚   β”‚   |   β”œβ”€β”€ GetArticleDislikesQuery.cs 
β”‚   β”‚   |   β”œβ”€β”€ GetArticleLikesQuery.cs 
β”‚   β”‚   |   β”œβ”€β”€ GetArticleQuery.cs 
β”‚   β”‚   |   β”œβ”€β”€ GetArticlesQuery.cs 
β”‚   β”‚   |   β”œβ”€β”€ GetParentTopicWithChildrenQuery.cs
β”‚   β”‚   |   β”œβ”€β”€ GetTopicsQuery.cs
β”‚   β”‚   |   β”œβ”€β”€ GetTopicsRelatedToUserQuery.cs
β”‚   β”‚   |   β”œβ”€β”€ GetTopicSubscriptionsQuery.cs
β”‚   β”‚   |   β”œβ”€β”€ GetUserArticlesQuery.cs
β”‚   β”‚   |   β”œβ”€β”€ GetUsersRelatedToArticleQuery.cs
β”‚   β”‚   |   β”œβ”€β”€ IQuery.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ Services πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ ReadServices πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ IArticleCommentReadService.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ IArticleReadService.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ITopicReadService.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ IUserReadService.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ WriteServices πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ IUserWriteService.cs
β”‚   β”‚   |   β”œβ”€β”€ _README.txt
----------------------------
β”‚   β”œβ”€β”€ TopicArticleService.Infrastructure πŸ“‚
β”‚   β”‚   β”œβ”€β”€ AsyncDataServices πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ MessageBusPublisher.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ MessageBusSubscriber.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ MessageDescriptor.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ Automapper πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ Profiles πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentDislikeProfile.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentLikeProfile.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentProfile.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleDislikeProfile.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleLikeProfile.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleProfile.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ DocumentProfile.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ TopicProfile.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ UserArticleProfile.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ UserProfile.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ UserTopicProfile.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ Dtos πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ MessageBusEventDto.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ EntityFramework πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ Contexts πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ReadDbContext.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ WriteDbContext.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ Encryption πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ EncryptionConverters πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ EncryptedArticleCommentDateTimeConverter.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ EncryptedArticleCommentValueConverter.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ EncryptedDateTimeOffsetConverter.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ EncryptedStringConverter.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ EncryptionProvider πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ IEncryptionProvider.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ EncryptionProvider.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ Initialization πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ DbInitializer.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ Migrations πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ <<EntityFramework database migrations>>
β”‚   β”‚   β”‚   β”œβ”€β”€ ModelConfiguration πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ReadConfiguration πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentDislikeConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentLikeConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleDislikeConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleLikeConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ TopicConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ UserArticleConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ UserConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ UserTopicConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ WriteConfiguration πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentDislikeConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentLikeConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleDislikeConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleLikeConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ TopicConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ UserArticleConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ UserConfiguration.cs
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ UserTopicConfiguration.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ Models πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentDislikeReadModel.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentLikeReadModel.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentReadModel.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleDislikeReadModel.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleLikeReadModel.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleReadModel.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ TopicReadModel.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ UserArticleReadModel.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ UserReadModel.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ UserTopicReadModel.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ Options πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PostgresOptions.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ PrepareDatabase πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ DbPrepper.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ Repositories πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PostgresArticleCommentRepository.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PostgresArticleRepository.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PostgresTopicRepository.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PostgresUserRepository.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ Services πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PostgresArticleCommentReadService.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PostgresArticleReadService.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PostgresUserReadService.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PostgresUserWriteService.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PostgreTopicReadServices.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ EventProcessing πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ EventProcessor.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ IEventProcessor.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ Exceptions πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ Interfaces πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ IExceptionToResponseMapper.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt
β”‚   β”‚   β”‚   β”œβ”€β”€ EmptyMessageDescriptorExchangeException.cs 
β”‚   β”‚   β”‚   β”œβ”€β”€ EmptyMessageDescriptorMessageException.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ EmptyMessageDescriptorRoutingKeyException.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ExceptionResponse.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ExceptionToResponseMapper.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ InfrastructureException.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ NullDbContextException.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ RabbitMqInitializationException.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ Extensions πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ ServiceCollectionExtensions.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ConfigurationExtensions.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ModelBuilderExtensions.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ StringExtensions.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ Logging πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ Formatters πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ SerilogJsonFormatter.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ LoggingCommandHandlerDecorator.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ Protos πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ greeter.proto
----------------------------
β”‚   β”‚   β”œβ”€β”€ Queries πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ Handlers πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ GetArticleCommentsHandler.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ GetArticleDislikesHandler.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ GetArticleHandler.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ GetArticleLikesHandler.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ GetArticlesHandler.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ GetParentTopicWithChildrenHandler.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ GetTopicsHandler.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ GetTopicsRelatedToUserHandler.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ GetTopicSubscriptionsHandler.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ GetUserArticlesHandler.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ GetUsersRelatedToArticleHandler.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ SyncDataServices πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ Grpc πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ISearchServiceDataClient.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ SearchServiceDataClient.cs
----------------------------
β”‚   β”‚   β”œβ”€β”€ UserRegistration πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ IUserSynchronizer.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ UserSynchronizer.cs
----------------------------
β”‚   β”œβ”€β”€ TopicArticleService.Presentation πŸ“‚
β”‚   β”‚   β”œβ”€β”€ Properties πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ launchSettings.json
β”‚   β”‚   β”œβ”€β”€ Controllers πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticlesController.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ TopicController.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ UserController.cs
β”‚   β”‚   β”œβ”€β”€ Dtos πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ ResponseDto.cs
β”‚   β”‚   β”œβ”€β”€ Middlewares πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ ErrorHandlerMiddleware.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ RateLimitingMiddleware.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ UserRegistrationMiddleware.cs
β”‚   β”‚   β”œβ”€β”€ appsettings.json
β”‚   β”‚   β”œβ”€β”€ Program.cs
----------------------------
β”œβ”€β”€ tests πŸ§ͺ
β”‚   β”œβ”€β”€ TopicArticleService.Tests.EndToEnd
β”‚   β”‚   β”œβ”€β”€ Events πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ ITestEvent.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ViewedArticleAdded.cs
β”‚   β”‚   β”œβ”€β”€ Extensions πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ ServiceCollectionExtensions.cs
β”‚   β”‚   β”œβ”€β”€ Factories πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ DrahtenApplicationFactory.cs
β”‚   β”‚   β”œβ”€β”€ Services πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ MessageDescriptor.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ RabbitMqMessageBusPublisher.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ RabbitMqMessageBusSubscriber.cs
β”‚   β”‚   β”œβ”€β”€ Sync πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt
β”‚   β”‚   β”‚   β”œβ”€β”€ BaseSyncIntegrationTest.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterArticleCommentDislikeTests.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterArticleCommentLikeTests.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterArticleCommentTests.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterArticleDislikeTests.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterArticleLikeTests.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterArticleTests.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterUserArticleTests.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterUserTests.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterUserTopicTests.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ RemoveArticleCommentTests.cs
----------------------------
β”‚   β”œβ”€β”€ TopicArticleService.Tests.Integration
β”‚   β”‚   β”œβ”€β”€ Async πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt
β”‚   β”‚   β”‚   β”œβ”€β”€ PublishCommentedArticleTests.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ PublishDislikedArticleCommentTests.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ PublishDislikedArticleTests.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ PublishLikedArticleComment.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ PublishLikedArticleTests.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ PublishTopicSubscriptionTests.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ PublishViewedArticleTests.cs
β”‚   β”‚   β”œβ”€β”€ EventProcessing πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ EventProcessor.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ IEventProcessor.cs
β”‚   β”‚   β”œβ”€β”€ Events πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ CommentedArticleAdded.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ DislikedArticleAdded.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ DislikedArticleCommentAdded.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ITestEvent.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ LikedArticleAdded.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ LikedArticleCommentAdded.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ TopicSubscriptionAdded.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ ViewedArticleAdded.cs
β”‚   β”‚   β”œβ”€β”€ Extensions πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ ServiceCollectionExtensions.cs
β”‚   β”‚   β”œβ”€β”€ Factories πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ DrahtenApplicationFactory.cs
β”‚   β”‚   β”œβ”€β”€ Services πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ ConsoleOutput.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ MessageDescriptor.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ RabbitMqMessageBusPublisher.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ RabbitMqMessageBusSubscriber.cs
----------------------------
β”‚   β”œβ”€β”€ TopicArticleService.Tests.Unit
β”‚   β”‚   β”œβ”€β”€ Application πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ Handlers πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AddArticleCommentDislikeHandlerTests.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AddArticleCommentHandlerTests.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AddArticleCommentLikeHandlerTests.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AddArticleDislikeHandlerTests.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AddArticleLikeHandlerTests.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ CreateArticleHandlerTests.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterUserArticleHandlerTests.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterUserHandlerTests.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterUserTopicHandlerTests.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ RemoveArticleCommentHandlerTests.cs
β”‚   β”‚   β”œβ”€β”€ Domain πŸ“‚
β”‚   β”‚   β”‚   β”œβ”€β”€ Entities πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentTests πŸ“‚
β”‚   β”‚   β”‚   β”‚   |   β”œβ”€β”€ _README.txt
β”‚   β”‚   β”‚   β”‚   |   β”œβ”€β”€ AddDislike.cs
β”‚   β”‚   β”‚   β”‚   |   β”œβ”€β”€ AddLike.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleTests πŸ“‚
β”‚   β”‚   β”‚   β”‚   |   β”œβ”€β”€ _README.txt
β”‚   β”‚   β”‚   β”‚   |   β”œβ”€β”€ AddComment.cs
β”‚   β”‚   β”‚   β”‚   |   β”œβ”€β”€ AddDislike.cs
β”‚   β”‚   β”‚   β”‚   |   β”œβ”€β”€ AddLike.cs
β”‚   β”‚   β”‚   β”‚   |   β”œβ”€β”€ AddUserArticle.cs
β”‚   β”‚   β”‚   β”‚   |   β”œβ”€β”€ RemoveComment.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ UserTests πŸ“‚
β”‚   β”‚   β”‚   β”‚   |   β”œβ”€β”€ SubscribeToTopic.cs
β”‚   β”‚   β”‚   β”œβ”€β”€ Factories πŸ“‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ _README.txt
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCommentFactoryTests.cs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleFactoryTests.cs
------------------------------------------------------------------

Directory/File Descriptions

Layer Directory/File Description
Domain TopicArticleService/src/TopicArticleService.Domain/Entities/ Contains domain entities representing core business concepts.
Domain TopicArticleService/src/TopicArticleService.Domain/Events/ Includes domain events capturing significant changes or actions.
Domain TopicArticleService/src/TopicArticleService.Domain/Exceptions/ Houses custom exceptions specific to domain logic.
Domain TopicArticleService/src/TopicArticleService.Domain/Factories/ Provides factories for creating domain entities.
Domain TopicArticleService/src/TopicArticleService.Domain/Repositories/ Defines interfaces or base classes for data access operations.
Domain TopicArticleService/src/TopicArticleService.Domain/ValueObjects/ Contains immutable value objects used within the domain.
Application TopicArticleService/src/TopicArticleService.Application/AsyncDataServices/ Defines interfaces for asynchronous operations.
Application TopicArticleService/src/TopicArticleService.Application/Commands/ Contains command types and serves as the central location for defining and organizing commands.
Application TopicArticleService/src/TopicArticleService.Application/Commands/Dispatcher/ Contains command dispatcher type and serves as the central component responsible for
routing commands to their respective command handlers. Β  Β 
Application TopicArticleService/src/TopicArticleService.Application/Commands/Handlers/ Contains command handler types that implement ICommandHandler interface and plays a crucial role in implementing
Command Query Responsibility Segregation (CQRS). Β  Β 
Application TopicArticleService/src/TopicArticleService.Application/Dtos/ Contains Data Transfer Objects (DTOs).
Application TopicArticleService/src/TopicArticleService.Application/Exceptions/ Contains Application layer specific custom exception types.
Application TopicArticleService/src/TopicArticleService.Application/Extensions/ Contains custom extension methods.
Application TopicArticleService/src/TopicArticleService.Application/Queries/ Contains query types and serves as the central location for defining and organizing queries.
Application TopicArticleService/src/TopicArticleService.Application/Queries/Dispatcher/ Contains query dispatcher type that implements IQueryDispatcher interface and serves as the central component responsible for
routing queries to their respective query handlers for execution and data retrieval. Β  Β 
Application TopicArticleService/src/TopicArticleService.Application/Queries/Handlers/ Contains the definition of the IQueryHandler<TQuery, TResult> interface, which serves as a contract for all query handlers
responsible for executing queries and retrieving data from the application’s read-side or queryable data sources. Β  Β 
Application TopicArticleService/src/TopicArticleService.Application/Services/ Implements application services containing business logic.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/AsyncDataServices/ Defines implementations of interfaces for asynchronous operations.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/Automapper/ Contains types, that are inheriting the Profile type from AutoMapper library.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/Dtos/ Contains Data Transfer Objects (DTOs).
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/EntityFramework/Contexts/ Contains two EntityFramework DbContext classes - ReadDbContext and WriteDbContext.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/EntityFramework/Encryption/ Contains custom EntityFramework encryption converters and encryption provider.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/EntityFramework/Initialization/ Contains DbInitializer class that applies entity framework migrations.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/EntityFramework/Migrations/ Contains EntityFramework migrations.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/EntityFramework/ModelConfiguration/ReadConfiguration/ Contains classes that implement IEntityTypeConfiguration and are containing configuration for the database models.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/EntityFramework/ModelConfiguration/WriteConfiguration/ Contains classes that implement IEntityTypeConfiguration and are containing configuration for DOMAIN entities and value objects.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/EntityFramework/Models/ Contains classes for the database models that represent the database tables and the overall database schema.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/EntityFramework/Options/ Contains class that is used for the OPTIONS pattern.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/EntityFramework/PrepareDatabase/ Contains class that is responsible for preparing and seeding the database with initial data.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/EntityFramework/Repositories/ Contains implementations of interfaces for data access operations.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/EntityFramework/Services/ Contains implementations of interfaces for services containing business logic.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/EventProcessing/ Contains class that is responsible for processing event’s that are received from outside the application.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/Exceptions/ Contains Infrastructure layer specific custom exception types.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/Extensions/ Contains custom extension methods.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/Logging/ Contains logging decorators and formatters. The purpose of the decorators is to wrap the behaviour of a Command Handler or other part of the application and to enrich it’s capabilities with the ability to log information.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/Queries/ Contains query handlers that work with the queries from the Command Query Responsibility Segregation (CQRS) approach.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/SyncDataServices/ Contains services that are related to synchronous operations.
Infrastructure TopicArticleService/src/TopicArticleService.Infrastructure/UserRegistration/ Contains UserSynchronizer that synchronizes a user with this service.
Presentation TopicArticleService/src/TopicArticleService.Presentation/Properties/ Contains the application properties related to port and protocol configuration.
Presentation TopicArticleService/src/TopicArticleService.Presentation/Controllers/ Contains API controllers handling HTTP requests and responses.
Presentation TopicArticleService/src/TopicArticleService.Presentation/DTOs/ Provides Data Transfer Objects (DTOs) for API input and output.
Presentation TopicArticleService/src/TopicArticleService.Presentation/Middlewares/ Contains custom middlewares.