Folder Structure Basics - mitzerh/modulr-js GitHub Wiki

Recommendation Keynotes

Looking back at the recommended folder structure:

basic/
     - app/
         + models/
         + modules/
         - main.js         			   
     - bootstrap.js         

The key points to take note:

bootstrap.js

This file sets up the configuration and initializes the package

app/

It is recommended to be at the same level as the bootstrap.js file and contains all the scripts related to your package so it is easier to optimize later on.

app/modules and app/models

One would ask, Why not just go MVC? -- We don't really need to over-complicate things. Essentially, for most development scenarios all we need is to identify pieces of content on our site (thus modules). Loosely defined, models can be a number of things related to data and it's manipulation. In most cases, we can even drop the models folder and we can just put the data logic together with modules. But at the end of the day, it all depends on how you need to break down your code structure.

But hey, if MVC is your go-to structure, there's nothing stopping you!