2016-05-23 12:13:30 +03:00
---
title: Project Structure
author: vl
sort: 800
group: Customization
template: article.jade
---
2016-09-19 12:20:34 -04:00
The project structure is originally based on [Angular2 Webpack Starter ](https://github.com/AngularClass/angular2-webpack-starter#file-structure ). We made some changes we thought would be better in our particular case.
2016-05-23 12:13:30 +03:00
The directory structure of this template is as follows:
2016-05-24 13:00:25 +03:00
2016-05-23 12:13:30 +03:00
```
2016-05-24 13:00:25 +03:00
ng2-admin/
2016-10-13 17:09:28 +03:00
├──config/ * webpack build configuration
│ ├──head-config.common.js * configuration for head elements in index.html
│ │
2016-05-24 13:00:25 +03:00
│ ├──helpers.js * helper functions for our configuration files
2016-10-13 17:09:28 +03:00
│ │
2016-05-24 13:00:25 +03:00
│ ├──webpack.dev.js * development webpack config
2016-10-13 17:09:28 +03:00
│ │
2016-05-24 13:00:25 +03:00
│ ├──webpack.prod.js * production webpack config
2016-10-13 17:09:28 +03:00
│ │
│ ├──webpack.test.js * testing webpack config
│ │
│ ├──electron/ * electron webpack config
│ │
│ └──html-elements-plugin/ * html elements plugin
2016-05-24 13:00:25 +03:00
│
├──src/ * source files that will be compiled to javascript
2016-10-13 17:09:28 +03:00
│ ├──custom-typings.d.ts * custom typings for third-party modules
│ │
│ ├──desktop.ts * electron window initialization
2016-05-24 13:00:25 +03:00
│ │
│ ├──index.html * application layout
│ │
2016-10-13 17:09:28 +03:00
│ ├──main.browser.ts * entry file for our browser environment
2016-05-24 13:00:25 +03:00
│ │
2016-10-13 17:09:28 +03:00
│ ├──package.json * electrons package.json
2016-05-24 13:00:25 +03:00
│ │
2016-10-13 17:09:28 +03:00
│ ├──polyfills.browser.ts * polyfills file
2016-05-24 13:00:25 +03:00
│ │
2016-10-13 17:09:28 +03:00
│ ├──vendor.browser.ts * vendors file
2016-05-24 13:00:25 +03:00
│ │
│ ├──app/ * application code - our working directory
│ │ │
│ │ ├──app.component.ts * main application component
│ │ │
│ │ ├──app.loader.ts * requires initial css styles (most important for application loading stage)
│ │ │
2016-10-13 17:09:28 +03:00
│ │ ├──app.menu.ts * menu pages routes
│ │ │
│ │ ├──app.module.ts * main application module
│ │ │
│ │ ├──app.routes.ts * application routes
│ │ │
│ │ ├──global.state.ts * global application state for data exchange between components
2016-05-24 13:00:25 +03:00
│ │ │
2016-10-13 17:09:28 +03:00
│ │ ├──environment.ts * environment provider
2016-05-24 13:00:25 +03:00
│ │ │
│ │ ├──app.scss * application styles
│ │ │
│ │ ├──pages/ * application pages components, place where you can create pages and fill them with components
│ │ │
│ │ └──theme/ * template global components/directives/pipes and styles
│ │
│ └──assets/ * static assets are served here
│
│
├──tslint.json * typescript lint config
├──typedoc.json * typescript documentation generator
├──tsconfig.json * config that webpack uses for typescript
2016-08-18 12:45:44 -05:00
└──package.json * what npm uses to manage it's dependencies
2016-05-23 12:13:30 +03:00
```
2016-09-19 12:20:34 -04:00
In our template we tried to separate the theme layer and presentation layer. We believe most of other templates
have them combined. That's why when you start developing using them, it gets very hard for you to remove things you
don't need.