Skip to content

Application Structure

Saumya Kanoria edited this page Sep 19, 2016 · 3 revisions

The starter kit's application structure is similar to a standard Rails app, with certain additions, a mostly comprehensive sampling of which is shown below:

app
 |- assets
     |- javascripts
         |- admin (for the admin app)
             |- angular (contains all Angular code)
                 |- <any/all of the directories under 'client/angular' below>
             |- <any non-Angular JS code>
         |- client (for the main 'non-admin' app)
             |- angular (contains all Angular code for the main app)
                 |- app.js (the 'entry point' for Angular)
                 |- routes.js
                 |- controllers
                 |- directives (if any)
                 |- filters (if any)
                 |- modules (self-contained 'packages' of functionality)
                 |- services (if any)
             |- <any non-Angular JS code>
         |- shared (common to main and admin app)
             |- angular (contains all Angular code)
                 |- <any/all of the directories under 'client/angular' above>
             |- <any non-Angular JS code>
         |- templates (contains all Angular templates, i.e. views)
             |- admin
             |- client
             |- shared
                 |- directives (templates for all directives under 'shared/angular/directives')
         |- bootstrap-custom.js (to customize which Bootstrap modules to include)
     |- stylesheets (contains all CSS styles)
         |- admin
         |- client
         |- shared
             |- directives (styles for all directives under 'shared/angular/directives')
         |- bootstrap-custom.scss
 |- controllers
     |- admin (all admin controllers)
     |- home_controller.rb (the 'entry point' controller)
 |- jobs (contains all background jobs)
 |- policies (access authorization policies)
 |- views
     |- admin (all admin views)
     |- home
         |- index.html (the 'entry point' view)
     |- layouts
         |- admin (all admin layouts)
         |- shared (all layouts common to main and admin app)
public
 |- locales (l10n files for Angular code)
spec (contains all tests)
 |- support (utility stuff for testing)
 |- javascripts (contains all JS and Angular tests)
vendor
 |- assets
     |- bower_components (all front-end components mananged by Bower)
bower.json (for managing Bower front-end packages)

Clone this wiki locally