Repository navigation
Generated Architecture
At a high level, the structure looks roughly like this:
rootDir/
|- app/
| |- config/
| | |- dev/
| | |- devconfig.json
| | |- prod/
| | |- qa/
| | |- config.js
| | |- routes.js
| | |- express.js
| | |- auth.js
| | |- passport.js
| | |- socket.io.js
| | |- i18next.js
| |
| |- controllers/
| |- lib/
| |- locales/
| |- en/
| |- es/
|
| |- models/
| |- views/
| |- includes/
| |- layouts/
|
|- build/
| |- build.config.js
| |- build.sh
| |- build.ps1
| |- deploy.sh
| |- deploy.ps1
|
|- docs/
| |- links.txt
|
|- public/
| |- css/
| |- bootstrap.css
| |- main.css
|
| |- img/
| |- js/
| | |- controllers/
| | |- directives/
| | |- filters/
| | |- libs/
| | |- models/
| | |- services/
| |- views/
|
|- test/
|
|- tools/
|- grunt/
| |- config/
| |- tasks/
| |- Gruntfile.js
|
|- server.js
|- module.prefix
|- module.suffix
|- package.json
|- travis.yml
|- .gitmodules
|- .gitignore
|- README.md
|- bower.json
|- .bowerrc
|- .jshintrc
-
server.js- node.js starup file. -
package.json- metadata about the app, used by NPM and our build script. Our NPM dependencies are listed here. -
.bowerrc- the Bower configuration file. This tells Bower where to install components. -
bower.json- this is our project configuration for Bower and it contains the list of Bower dependencies we need. -
module.prefixandmodule.suffix- our compiled application script is wrapped in these, which by default are used to place the application inside a self-executing anonymous function to ensure no clashes with other libraries. -
.gitignore- -
.gitmodules- -
travis.yml- -
.jshintrc- -
Gruntfile.js- GruntJs starup file. -
app/- Contains the server side code. -
app/config- Contains the code to configure/initialize the server. -
app/config/dev,prod,qa- Environment specific configuration scripts and files go in this directory. -
app/config/dev/devconfig.json- JSON file containing configuration constants. -
app/config/config.js- main source file for configuration. It calls other module and environment specific code files. -
app/config/routes.js- this is where server side route handling is defined. -
app/config/express.js,auth.js,passport.js,etc.- these contain configuration code specific to server side modules. -
app/controllers- Contains the code for server side controllers. -
app/models- Contains the code for server side models. For the most part these will be mongoose schema definitions defining the structure of mongo collections and methods. -
app/views- Contains templates and code defining the server side generated parts of views. -
app/lib- Contains helper/utility code. -
app/locales,en,es- this is used by the NPM module i18next for localization. -
build/- Contains scripts,data,etc. for handling build and deployment operations. Examples arebuild.shandbuild.ps1which handle building the application as well asdeploy.shanddeploy.ps1which handle deployment. Also there isbuild.config.jswhich contains customizable build settings. -
docs- Contains any documentation specific to this system/application. One file expected to be there islinks.txtwhich provides links to any documentation or other items that are not in this repository. -
test- Contains any scripts or data needed to test the system/application. Any testing facilities that are located outside of this repository should be noted in the links.txt file and if possible a link to it given in this directory.