Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

176
Visualizações
Problems with organized in directories in project with clean architecture

I have a project to issue invoices. link But I'm going through a cruel doubt.

I want to implement a real clean architecture in the project, but I realize that sometimes people who assemble clean architecture projects over the web have directories with "dirty files" (framework/orm imports...) and "clean files" (without any dependency on any external thing).

However, I found this horrible, since having a framework migration, which should be totally easy to do, ends up being difficult and tedious, since you will need to go from directories to directories looking for the "clean files" to migrate. ..

So I built the following structure:

domain
infra
usecases

In `domain` I have everything that is exclusive rules of the issuing company. This directory is fully decoupled.

In infra all files are dirty... (Controllers, Repositories... ) It is the only layer that will not be migrated.

In usecases it contains the business rules for issuing... This layer is also totally decoupled from any framework and ORM.


But I'm facing a discussion with a friend who claims that directories should contain dirty and clean files together, with the justification that this is the "right" way to do it.

if you look my project, you'll notice that I put adapters and shared inside the domain and my friend prefers that it stays inside the infra layer because, as he said, this is the "right" way to do it. The problem is that this system will be very large and have a large amount of framework change as well, and going from directory to directory looking for clean files to move to another project is a big headache and too tedious.

In yours opinions, do i need to have the adapters and shared directories in the below layer, even if it is "dirty", or am I right in mind them in the domain layer which is an entirely clean layer.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda