Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

175
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda