|
| 1 | +```mermaid |
| 2 | +%% Arquitetura Clean Architecture do Projeto |
| 3 | +
|
| 4 | +flowchart TB |
| 5 | + %% Camadas Principais |
| 6 | + subgraph Domain ["Domain"] |
| 7 | + direction TB |
| 8 | + DomainEntities["Entities"] |
| 9 | + DomainRepositories["Repositories Interfaces"] |
| 10 | + end |
| 11 | +
|
| 12 | + subgraph Application ["Application"] |
| 13 | + direction TB |
| 14 | + ApplicationUseCases["Use Cases"] |
| 15 | + ApplicationDTOs["DTOs"] |
| 16 | + ApplicationErrors["Errors"] |
| 17 | + ApplicationInterfaces["Interfaces"] |
| 18 | + ApplicationServices["Services"] |
| 19 | + end |
| 20 | +
|
| 21 | + subgraph Infrastructure ["Infrastructure"] |
| 22 | + direction TB |
| 23 | + InfrastructureControllers["Controllers"] |
| 24 | + InfrastructureAdapters["Adapters"] |
| 25 | + InfrastructurePipes["Pipes"] |
| 26 | + InfrastructureRepositories["Repositories"] |
| 27 | + InfrastructureUtils["Utils"] |
| 28 | + InfrastructureModules["Modules"] |
| 29 | + InfrastructureGuards["Guards"] |
| 30 | + InfrastructureFactories["Factories"] |
| 31 | + end |
| 32 | +
|
| 33 | + subgraph Framework ["Framework"] |
| 34 | + direction TB |
| 35 | + FrameworkNestJS["NestJS Framework"] |
| 36 | + end |
| 37 | +
|
| 38 | + %% Relacionamentos entre Camadas |
| 39 | + DomainEntities -->|Define| DomainRepositories |
| 40 | + ApplicationUseCases -->|Usa| DomainRepositories |
| 41 | + ApplicationUseCases -->|Usa| ApplicationDTOs |
| 42 | + ApplicationUseCases -->|Usa| ApplicationErrors |
| 43 | + ApplicationUseCases -->|Usa| ApplicationServices |
| 44 | + InfrastructureControllers -->|Chama| ApplicationUseCases |
| 45 | + InfrastructureControllers -->|Usa| InfrastructurePipes |
| 46 | + InfrastructureControllers -->|Usa| InfrastructureGuards |
| 47 | + InfrastructureAdapters -->|Converte| ApplicationDTOs |
| 48 | + InfrastructureRepositories -->|Implementa| DomainRepositories |
| 49 | + InfrastructureFactories -->|Cria| ApplicationUseCases |
| 50 | + InfrastructureModules -->|Agrupa| InfrastructureControllers |
| 51 | + InfrastructureModules -->|Agrupa| InfrastructureRepositories |
| 52 | + InfrastructureModules -->|Agrupa| InfrastructureFactories |
| 53 | + InfrastructureUtils -->|Fornece| ApplicationServices |
| 54 | + FrameworkNestJS -->|Fornece| InfrastructureModules |
| 55 | +
|
| 56 | + %% Componentes Detalhados |
| 57 | + subgraph DomainEntities ["Entities"] |
| 58 | + ClientEntity["ClientEntity"] |
| 59 | + DocumentEntity["DocumentEntity"] |
| 60 | + end |
| 61 | +
|
| 62 | + subgraph DomainRepositories ["Repositories Interfaces"] |
| 63 | + IClientRepository["IClientRepository"] |
| 64 | + IDocumentRepository["IDocumentRepository"] |
| 65 | + end |
| 66 | +
|
| 67 | + subgraph ApplicationUseCases ["Use Cases"] |
| 68 | + SignInUseCase["SignInUseCase"] |
| 69 | + CreateClientUseCase["CreateClientUseCase"] |
| 70 | + UpdateClientUseCase["UpdateClientUseCase"] |
| 71 | + RemoveClientUseCase["RemoveClientUseCase"] |
| 72 | + FindOneClientUseCase["FindOneClientUseCase"] |
| 73 | + FindAllClientsUseCase["FindAllClientsUseCase"] |
| 74 | + CreateDocumentUseCase["CreateDocumentUseCase"] |
| 75 | + UpdateDocumentUseCase["UpdateDocumentUseCase"] |
| 76 | + RemoveDocumentUseCase["RemoveDocumentUseCase"] |
| 77 | + FindOneDocumentUseCase["FindOneDocumentUseCase"] |
| 78 | + FindAllDocumentsUseCase["FindAllDocumentsUseCase"] |
| 79 | + PdfProcessingUseCase["PdfProcessingUseCase"] |
| 80 | + WebProcessingUseCase["WebProcessingUseCase"] |
| 81 | + end |
| 82 | +
|
| 83 | + subgraph ApplicationDTOs ["DTOs"] |
| 84 | + SignInInput["SignInInput"] |
| 85 | + CreateClientInput["CreateClientInput"] |
| 86 | + UpdateClientInput["UpdateClientInput"] |
| 87 | + CreateDocumentInput["CreateDocumentInput"] |
| 88 | + UpdateDocumentInput["UpdateDocumentInput"] |
| 89 | + end |
| 90 | +
|
| 91 | + subgraph ApplicationErrors ["Errors"] |
| 92 | + ClienteNaoEncontradoError["ClienteNaoEncontradoError"] |
| 93 | + SenhaInvalidaError["SenhaInvalidaError"] |
| 94 | + DocumentoNaoEncontradoError["DocumentoNaoEncontradoError"] |
| 95 | + DocumentoConteudoInvalidoError["DocumentoConteudoInvalidoError"] |
| 96 | + DocumentoTituloInvalidoError["DocumentoTituloInvalidoError"] |
| 97 | + end |
| 98 | +
|
| 99 | + subgraph ApplicationServices ["Services"] |
| 100 | + TokenGenerate["TokenGenerate"] |
| 101 | + PasswordHashing["PasswordHashing"] |
| 102 | + end |
| 103 | +
|
| 104 | + subgraph InfrastructureControllers ["Controllers"] |
| 105 | + AuthController["AuthController"] |
| 106 | + ClientController["ClientController"] |
| 107 | + DocumentController["DocumentController"] |
| 108 | + end |
| 109 | +
|
| 110 | + subgraph InfrastructureAdapters ["Adapters"] |
| 111 | + ClientAdapter["ClientAdapter"] |
| 112 | + DocumentAdapter["DocumentAdapter"] |
| 113 | + SignInAdapter["SignInAdapter"] |
| 114 | + end |
| 115 | +
|
| 116 | + subgraph InfrastructurePipes ["Pipes"] |
| 117 | + CreateClientAdapterPipe["CreateClientAdapterPipe"] |
| 118 | + UpdateClientAdapterPipe["UpdateClientAdapterPipe"] |
| 119 | + HashPasswordPipe["HashPasswordPipe"] |
| 120 | + SignInDtoToInputPipe["SignInDtoToInputPipe"] |
| 121 | + end |
| 122 | +
|
| 123 | + subgraph InfrastructureRepositories ["Repositories"] |
| 124 | + ClientRepository["ClientRepository"] |
| 125 | + DocumentRepository["DocumentRepository"] |
| 126 | + end |
| 127 | +
|
| 128 | + subgraph InfrastructureUtils ["Utils"] |
| 129 | + AxiosImpl["AxiosImpl"] |
| 130 | + BcryptImpl["BcryptImpl"] |
| 131 | + CheerioImpl["CheerioImpl"] |
| 132 | + PdfParseImpl["PdfParseImpl"] |
| 133 | + RxjsImpl["RxjsImpl"] |
| 134 | + end |
| 135 | +
|
| 136 | + subgraph InfrastructureModules ["Modules"] |
| 137 | + AppModule["AppModule"] |
| 138 | + AuthModule["AuthModule"] |
| 139 | + ClientModule["ClientModule"] |
| 140 | + DocumentModule["DocumentModule"] |
| 141 | + DatabaseModule["DatabaseModule"] |
| 142 | + end |
| 143 | +
|
| 144 | + subgraph InfrastructureGuards ["Guards"] |
| 145 | + AuthGuard["AuthGuard"] |
| 146 | + end |
| 147 | +
|
| 148 | + subgraph InfrastructureFactories ["Factories"] |
| 149 | + AuthUseCasesFactory["AuthUseCasesFactory"] |
| 150 | + ClientUseCasesFactory["ClientUseCasesFactory"] |
| 151 | + DocumentUseCasesFactory["DocumentUseCasesFactory"] |
| 152 | + end |
| 153 | +``` |
0 commit comments