bulletproof-nodejs icon indicating copy to clipboard operation
bulletproof-nodejs copied to clipboard

Project structure by feature

Open AguGriguol opened this issue 3 years ago • 2 comments

Hello!

I want to know what is the best structure for large node js projects, I've been thinking a lot about how to scale the project. If the project starts to grow up, maybe we'll have a lot of files in the services and routes folder. Would you consider grouping each feature in folders and inside of them put the services and routes? For instance,

--> user --> services --> routes --> test

Thanks in advance.

AguGriguol avatar Jul 27 '21 18:07 AguGriguol

Hi, I also have same question, currently when following microservice architecture, we have these service and tests files in their each repo, So its same as having multiple services, tests etc files each in its feature folder.

But in case of a monolithic architecture which way is more scalable and manageable? I wonder

Also a point to note is that angular by default keeps all files(controller, views and test) in respective components folder, the dont have a test folder which have all tests for all components. To me it makes more sense to have this way,

I want to know other developers view too...

nandanraj56 avatar Aug 01 '21 07:08 nandanraj56

Hi guys @AguGriguol @nandanraj56

My intention was never to say "use this way of separate folders" it is clear that separation by components has its advantages.

My main idea with this project was to teach about separation of concerns and clearly distinguish between layers.

santiq avatar Aug 09 '21 13:08 santiq