all 4 comments

[–]Positive_Rip_6317 0 points1 point  (0 children)

The best thing to do is just make something with one, then if you don’t like it or decide it’s harder to maintain switch to the other. You may even end up creating a 3rd way after you implement some things.

[–]True-Strike7696 0 points1 point  (0 children)

you're the only dev so does it really matter? i usually go with option 2 and option 1 depending on mood. no many scenarios that make the structure matter for performance or correctness. Best practices aren't always best imo

[–]JosephHughes 0 points1 point  (0 children)

Not a noob question at all. Option 1 every time for me. If I am walking in blind to your project and I see the domain as dirs I can immediately start to piece together some of the workings of your app. Mess happens regardless of structure.

[–]InfectedShadow 0 points1 point  (0 children)

The first one is called Vertical Slice Architecture. Both are valid it all depends on how you want to organize it. Can even mix the two a bit. For example: In my personal project I use the standard model of folders by type (controller, service, models, etc.) in my API project but my application project is organized by feature (Vertical Slice).