> For the complete documentation index, see [llms.txt](https://docs.oizom.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.oizom.com/oizom-terminal/development-info.md).

# Development Info

Contributors: [Anand Kacha](https://github.com/ndkcha), [Mrugesh Modi](https://github.com/modimrugesh1910), [Jimish Parekh](https://github.com/jimishio), [Rutuja Shah](https://github.com/rutuja395)

Current Development Platform: **macOS Sierra 10.12.3** | **Ubuntu 16.04** | *Windows 10*

## Environment dependencies

| Name                              | Purpose                     | Version |
| --------------------------------- | --------------------------- | ------- |
| [Node.js](https://nodejs.org/en/) | Javascript Engine           | 7.6.0   |
| [npm](https://nodejs.org/en/)     | Package manager for Node.js | 5.6.0   |

## Main Libraries and Frameworks

| Purpose            | Name                                                                                                                                  | Version          |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| Core Framework     | [Angular 2/4/5](https://angular.io/docs/ts/latest/api/) ([Typescript](https://www.typescriptlang.org/docs/handbook/basic-types.html)) | 2.3.1            |
| Design Framework   | [Angular Material](https://github.com/angular/material2#feature-status)                                                               | ^5.2.3           |
| Build Framework    | [Angular CLI](https://github.com/angular/angular-cli#table-of-contents)                                                               | ^1.6.0           |
| Testing Frameworks | Jasime, Karma                                                                                                                         | 2.5.38 \| 1.2.0  |
| Websocket Library  | [socket.io](http://socket.io/docs/client-api/)                                                                                        | ^2.0.0           |
| Preferred IDE      | [Visual Studio Code](https://code.visualstudio.com/), [Webstorm](https://www.jetbrains.com/webstorm/)                                 | 1.10.2 \| 2017.3 |

## Supporting Libraries

| Purpose                  | Name                                                                            | Version      |
| ------------------------ | ------------------------------------------------------------------------------- | ------------ |
| Asynchronous Programming | [RxJS](http://reactivex.io/rxjs/)                                               | 5.0.1        |
| Date and Time Formatting | [moment](http://momentjs.com/docs/)                                             | ^2.18.1      |
| Progress bars            | [progressbar.js](https://kimmobrunfeldt.github.io/progressbar.js/)              | 1.0.1        |
| Charts                   | [High Charts](https://www.highcharts.com/)                                      | ^6.0.7       |
| Maps                     | [Google Maps](https://github.com/SebastianM/angular2-google-maps) for Angular2+ | 1.0.0-beta.2 |
| Utility Library          | [Lodash](https://lodash.com/docs/4.17.5)                                        | ^4.17.5      |
| Full Screen              | [screenfull](https://github.com/sindresorhus/screenfull.js/)                    | 3.3.2        |
| Copy Clipboard           | [ngx-clipboard](https://maxisam.github.io/ngx-clipboard/)                       | 10.0.0       |
| Download file            | [file-saver](https://www.npmjs.com/package/file-saver)                          | ^1.3.0       |

*\\* Module/Library is delivered by Content Delivery Network and is updated real-time\*

## References

| Name                                                                             | Type        | Purpose                                                      |
| -------------------------------------------------------------------------------- | ----------- | ------------------------------------------------------------ |
| [Google Charts](https://gist.github.com/ndkcha/0ac1960d30596962e7992075e58af9a3) | Github Gist | Internal module design to use Google Charts in Angular 2 app |

## Server Dependencies

Oizom web application uses Oizom API standards to communicate to Oizom server for the information displayed throughout the application. Every single API call requires authentication token in the header for privileged access. API documentation is maintained in [github wiki](https://github.com/sohil4932/oizom-private-api/wiki).

The application displays real-time information fetched from Oizom server. The server for the real-time data is deployed separately from API server. Every single connection request requires authentication token in handshake options for privileged access. Documentation for different namespaces will be released soon.

## Setup Local Environment

Pre-requisites for getting started:

1. Node.js (version 7.4.0 or higher)
2. Npm (version 4.0.5 or higher)
3. Angular CLI (1.5.0 or higher)
4. Angular 2+
5. Angular Material 2

Install Angular CLI globally in node to use the commands globally for production. Run `npm install -g angular-cli` to install it globally. For Mac users, run it with sudo command. For Windows users, run the terminal with administrator privileges. To install any new dependency, make sure you apply **--save** option so that it saves the dependency to package.json

The angular server is configured by Angular CLI. It is run by passing Angular CLI commands only. To start the application in debug mode, run `npm start` command in your command line shell. The server will start at 4200 port. After starting the server, navigate to `localhost:4200` in your browser. Any change you make on the application source code, it is tracked real-time and the application is updated automatically.

Running the application in production is dangerous before the application is not fully tested. After full testing of the application, run `ng build --prod` command in the shell. It will generate a new directory named “**dist/**” which is used for deployment on a server.

For servers in Apache Environment, Copy the “dist/” directory to **httpdocs** or server’s root directory to make the final application run on your desired host.

For servers written in Node.js, copy the “dist/” directory to server directory where you have saved “**server.js**”. Send the index.html page located in “dist/” to the client.

## Issue Tracking and Contribution

All the issues are tracked in GitHub repository only. [Click here](https://github.com/ndkcha/oizom-web-app/issues) to track or submit new issues in the repository. Adding unnecessary issues will slow down the development process, please look up the existing issues before you submit a new one.

We are using [Gridle](https://app.gridle.io) to maintain communications among the contributors. If you want to be one, mail [Sohil](mailto:sohil@oizom.com) OR [Mrugesh](mailto:modimrugesh1910@gmail.com) OR [Nayan](mailto:nayan@oizom.com) to request access. We follow [style guide](https://angular.io/styleguide) provided by Angular 2+ developers and experts.
