DEV Community


Discussion on: Node.js Projects: What directory structure you have for project?

paramharrison profile image
Paramanantham Harrison

Domain driven structure

  • routes, model, seed, controllers and whatever file which is needed for a minimum functionality in a project. How to separate domain depends on project to project. For example, in a e-commerce web app, domains can be
  • products
  • users
  • orders
  • wishlist
  • search
  • related products
  • faq
  • feedback
  • analytics

And so on. There is no hard rules, you can split when needed