detleph / server

Server component of the Detleph event management system
MIT License
1 stars 0 forks source link

Define default folder structure #2

Closed stephan418 closed 2 years ago

stephan418 commented 2 years ago

There should be a defined folder structure that everone sticks to

stephan418 commented 2 years ago

@detleph/backend should be included in the decision process

Stefan-5422 commented 2 years ago
src:
  cat1:
    controller
    model
  cat2:
    controller
    model
  Models:
routes:
  router1
  router2

@stephan418 is the Folder structure I normally use for my APIs this is also diffrernt from the one which would be used on a react project.

stephan418 commented 2 years ago

Are there any preexisting projects which we could use as a reference for project structure? I also don' think creating models does make any sense when using prisma (Type objects and so on)

Stefan-5422 commented 2 years ago

Models where only there because I took the structure from an existing project. There are 2 main ones the one I use and one which looks like this:

src:
  routes:
    router1
    router2
  models:
    model1
    model2
 controllers:
   controller1
   controller2

Also with model I mean the models from the view model controller schema, which I do agree might not bee needed with us using Prisma but that will be seen once more code is in place

Stefan-5422 commented 2 years ago

Well just go with this