|
| 1 | +# Reboot |
| 2 | + |
| 3 | +Reboot is: |
| 4 | + |
| 5 | +## Getting Started |
| 6 | + |
| 7 | +Reboot is an ionic project using typescript. The backend API uses MongoDB as a data source for a loopback api server. The corresponding backend server can be found at: |
| 8 | + |
| 9 | +``` |
| 10 | +https://github.com/SoftStackFactory/reboot-backend |
| 11 | +``` |
| 12 | + |
| 13 | +### Prerequisites |
| 14 | + |
| 15 | +To begin make sure node and npm are installed. Please make sure latest Node 6 LTS and NPM 3+ are installed. In addition, make sure that you have [Ionic CLI](https://ionicframework.com/docs/cli/) installed locally. This project was uses Ionic 3.x. |
| 16 | + |
| 17 | +``` |
| 18 | +npm install -g ionic |
| 19 | +``` |
| 20 | + |
| 21 | +### Installing |
| 22 | + |
| 23 | +Clone the remote repository |
| 24 | + |
| 25 | +``` |
| 26 | +git clone https://github.com/SoftStackFactory/reboot |
| 27 | +``` |
| 28 | + |
| 29 | +From within the `reboot` directory, run `npm install` to install all dependencies. |
| 30 | + |
| 31 | +``` |
| 32 | +npm install |
| 33 | +``` |
| 34 | + |
| 35 | +Once that completes, use `ionic serve` to get a local copy running |
| 36 | + |
| 37 | +``` |
| 38 | +ionic serve |
| 39 | +``` |
| 40 | + |
| 41 | +This should deploy the an instance of the app running locally at: |
| 42 | + |
| 43 | +``` |
| 44 | +http://localhost:8100/ |
| 45 | +``` |
| 46 | + |
| 47 | + |
| 48 | +### Branches |
| 49 | + |
| 50 | +Retire Now employs a release branch methodology for maintaining our branches. When working with new branches, create branches off of `dev` only. |
| 51 | + |
| 52 | +`master` - Current release working production branch |
| 53 | + |
| 54 | +`dev` - Next release development branch |
| 55 | + |
| 56 | +Whenever you pick up working on the application, make sure that you fetch the current state of the application. This can be done by using the command: |
| 57 | + |
| 58 | +``` |
| 59 | +git fetch |
| 60 | +``` |
| 61 | + |
| 62 | +Then, you'll need to checkout a branch to work from. Most of the time it will be dev: |
| 63 | + |
| 64 | +``` |
| 65 | +git checkout -b [123-my-branch-name] origin/dev |
| 66 | +``` |
| 67 | + |
| 68 | +For branch names, please use `[issue number]-[my-branch-name]`. For example, if I was working off of an issue # 4 for a feature to add a menu, I would name my new branch `4-new-menu`. |
| 69 | + |
| 70 | +Try to make sure the branch name is a good description of what you're working on. Avoid nonsensical naming conventions. |
| 71 | + |
| 72 | +### Committing Changes |
| 73 | + |
| 74 | +When you've completed changes on your branch, you can publish the branch to the repo. Always make sure that your commit messages have a concise title. |
| 75 | + |
| 76 | +If you need to go into more detail, please use a longer commit message to list out changes. |
| 77 | + |
| 78 | +A good example of commit messages can be found [here](https://github.com/erlang/otp/wiki/writing-good-commit-messages). |
| 79 | + |
| 80 | +``` |
| 81 | +git commit -m 'A Git commit message' |
| 82 | +``` |
| 83 | + |
| 84 | +### Pull Requests |
| 85 | + |
| 86 | +Pull request should have some description of the changes and what features/files or issues it address. |
| 87 | + |
| 88 | +Also list any issues the pull request resolves so that they can be closed out. |
| 89 | + |
| 90 | +Label all finished issues with `done` and the pull request itself with `code review`. |
| 91 | + |
| 92 | +## Deployment |
| 93 | + |
| 94 | +There will be two deployment scenarios: |
| 95 | + |
| 96 | +#### Master |
| 97 | + |
| 98 | +This is deployed to Ionic Pro and any changes that get merged into master will be deploy automatically to the view app. |
| 99 | + |
| 100 | +To view the project, download the view application and use the following AppID: `1022DD18`. |
| 101 | + |
| 102 | +This will always reflect `origin/master`. |
| 103 | + |
| 104 | +#### Dev |
| 105 | + |
| 106 | +This will be a working development branch. The repo admin will have access to this and will deploy it on a regular release schedule. |
| 107 | + |
| 108 | +This will live at the following url: `http://reboot.herokuapp.com/` |
| 109 | + |
| 110 | +#### Locally |
| 111 | + |
| 112 | +You may also deploy to a heroku instance of your own. Within the `/reboot/` directory, create a `Procfile` with the following: |
| 113 | + |
| 114 | +``` |
| 115 | +web: npm run build:dev && npm start |
| 116 | +``` |
| 117 | + |
| 118 | +Make sure you've logged in: |
| 119 | +``` |
| 120 | +heroku login |
| 121 | +``` |
| 122 | + |
| 123 | +Also make sure the remote is tied to your heroku app that you set up: |
| 124 | +``` |
| 125 | +heroku git:remote -a my-own-app-name-123 |
| 126 | +``` |
| 127 | + |
| 128 | +Finally, install the following plugin: |
| 129 | +``` |
| 130 | +heroku plugins:install heroku-builds |
| 131 | +``` |
| 132 | + |
| 133 | +At any point in time, you can push this build up to your own heroku instance without commiting it to git (that way our file system stays intact). |
| 134 | + |
| 135 | +Deploy it using the following command: |
| 136 | +``` |
| 137 | +heroku builds:create -a my-own-app-name-123 |
| 138 | +``` |
| 139 | + |
| 140 | + |
| 141 | +## Built With |
| 142 | + |
| 143 | +* [Ionic](https://ionicframework.com/) |
| 144 | +* [Angular](https://angular.io/) |
| 145 | +* [MongoDB](https://www.mongodb.com/) |
| 146 | +* [Loopback](http://loopback.io/) |
| 147 | +* [ChartJs](http://www.chartjs.org/) |
| 148 | + |
| 149 | +## License |
| 150 | + |
| 151 | +This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details |
0 commit comments