|
| 1 | +## Project Overview |
| 2 | + |
| 3 | +What follows is an overfiew of the files/folders in your newly generated project. |
| 4 | + |
| 5 | +### Project Root |
| 6 | + |
| 7 | +* .babelrc - configuration for [Babel], a JavaScript transpiler |
| 8 | +* .editorconfig - config file used to keep conistent file editing across text editors |
| 9 | +* .eslintrc - all of the rules applying to the ESLint JavaScript linter |
| 10 | +* .travis.yml - a sample configuration file for Travis CI |
| 11 | +* .yo-rc.json - a configuration file for the Angular Full-Stack Generator |
| 12 | +* gulpfile.babel.js - Gulp task runner file |
| 13 | +* karma.conf.js - Karma browser testing configuration |
| 14 | +* mocha.conf.js - Mocha test framework configuration |
| 15 | +* mocha.global.js - teardown file for Mocha |
| 16 | +* package.json - npm manifest, contains information for all project dependencies |
| 17 | +* protractor.conf.js - configuration for Protractor e2e test framework |
| 18 | +* README.md - a readme file generator based on your options, for your scaffolded project |
| 19 | +* spec.js - test file for Webpack used by Karma |
| 20 | +* webpack.make.js - main file for Webpack configuration |
| 21 | + * The following export the config from `webpack.make.js` for their respective build targets: |
| 22 | + * webpack.dev.js |
| 23 | + * webpack.test.js |
| 24 | + * webpack.build.js |
| 25 | + |
| 26 | +### `client/` |
| 27 | + |
| 28 | +``` |
| 29 | +│ .eslintrc // eslint config for client files |
| 30 | +│ polyfills.js // imports of polyfills |
| 31 | +│ _index.html // template for the root HTML file of your app |
| 32 | +│ |
| 33 | +├───app |
| 34 | +│ │ app.config.js // contains app-wide configuration code |
| 35 | +│ │ app.constants.js // gets injected with constants from `server/config/environment/shared.js` |
| 36 | +│ │ app.{js,ts} // root JavaScript file of your app |
| 37 | +│ │ app.{css,scss,stylus,less} // root CSS file of your app |
| 38 | +│ │ |
| 39 | +│ ├───account // pages related to login / signup / user settings |
| 40 | +│ │ │ account.routes.js // route information |
| 41 | +│ │ │ index.js // account module root |
| 42 | +│ │ │ |
| 43 | +│ │ ├───login |
| 44 | +│ │ ├───settings |
| 45 | +│ │ └───signup |
| 46 | +│ │ |
| 47 | +│ ├───admin // site admin page |
| 48 | +│ │ |
| 49 | +│ └───main // main component, homepage |
| 50 | +│ |
| 51 | +├───assets // where static assets are stored |
| 52 | +│ |
| 53 | +└───components |
| 54 | + ├───auth |
| 55 | + │ auth.module.js // module containing auth components |
| 56 | + │ auth.service.js // authentication service |
| 57 | + │ interceptor.service.js // intercepts requests and adds tokens if needed. Also redirects 401s to the login page. |
| 58 | + │ router.decorator.js // facilitates auth-based routing configuration |
| 59 | + │ user.service.js // user resource service |
| 60 | + │ |
| 61 | + ├───footer |
| 62 | + │ |
| 63 | + ├───modal |
| 64 | + │ |
| 65 | + ├───navbar |
| 66 | + │ |
| 67 | + ├───oauth-buttons // buttons for oauth login on signup / login pages |
| 68 | + │ |
| 69 | + ├───socket |
| 70 | + │ socket.mock.js // mock service for unit testing |
| 71 | + │ socket.service.js // service for Socket IO integration |
| 72 | + │ |
| 73 | + ├───ui-router |
| 74 | + │ ui-router.mock.js // mock service for unit testing |
| 75 | + │ |
| 76 | + └───util // general utility service |
| 77 | +``` |
| 78 | + |
| 79 | +### `server/` |
| 80 | + |
| 81 | +``` |
| 82 | +│ .eslintrc // server-specific ESLint config, imports rules from root file |
| 83 | +│ app.js // root server module |
| 84 | +│ index.js // imports `app.js`. Enables Babel require hook when in development mode. |
| 85 | +│ routes.js // imports / config for server endpoints |
| 86 | +│ |
| 87 | +├───api |
| 88 | +│ ├───thing |
| 89 | +│ │ index.js // root module |
| 90 | +│ │ index.spec.js // root module tests |
| 91 | +│ │ thing.controller.js // endpoint logic |
| 92 | +│ │ thing.events.js // endpoint events (save, delete, etc) logic |
| 93 | +│ │ thing.integration.js // integration tests |
| 94 | +│ │ thing.model.js // Mongoose / Sequelize data model |
| 95 | +│ │ thing.socket.js // Socket IO logic / config |
| 96 | +│ │ |
| 97 | +│ └───user // API for Users |
| 98 | +│ |
| 99 | +├───auth |
| 100 | +│ │ auth.service.js |
| 101 | +│ │ index.js // imports local/oauth auth modules |
| 102 | +│ │ |
| 103 | +│ ├───local // regular auth, signed up directly via your site |
| 104 | +│ ├───google // Google OAuth |
| 105 | +│ └───<etc...> |
| 106 | +│ |
| 107 | +└───config |
| 108 | + │ express.js // Express server setup |
| 109 | + │ local.env.js // ignored by Git |
| 110 | + │ local.env.sample.js // sensitive environment variables are stored here, and added at server start. Copy to `local.env.js`. |
| 111 | + │ seed.js // re-seeds database with fresh data |
| 112 | + │ socketio.js // Socket IO configuration / imports |
| 113 | + │ |
| 114 | + └───environment |
| 115 | + development.js |
| 116 | + index.js |
| 117 | + production.js |
| 118 | + shared.js // config constants shared with the client code |
| 119 | + test.js |
| 120 | +``` |
| 121 | + |
| 122 | +### `e2e/` |
| 123 | + |
| 124 | +End-To-End testing files (use by [Protractor](https://github.com/angular/protractor) with [Mocha](https://github.com/mochajs/mocha)) |
| 125 | + |
| 126 | +[Babel]: https://babeljs.io/ |
0 commit comments