|
1 |
| -Initial version of tenant resolutions webapp through Blue Ridge Labs. Repo/product name TBD |
| 1 | +This is the codebase for the JustFix.nyc platform, including the Tenant Webapp, Advocate Dashboard, and the back-end API for managing data. For more information about our organization, please visit [www.justfix.nyc](https://www.justfix.nyc). |
| 2 | + |
| 3 | +## Getting Started |
| 4 | + |
| 5 | +This guide assumes that you are using a [UNIX](http://i.imgur.com/uE6fkx7.gif) system (most likely macOS), but everything is available on Windows if you follow the appropriate guides thru the links below. |
| 6 | + |
| 7 | +#### Build tools and languages |
| 8 | + |
| 9 | +0. Open terminal. Some of these steps may require `sudo` in order to install. |
| 10 | + |
| 11 | +1. Install [Node.js](https://nodejs.org/en/) (v4.4.x is ideal) and make sure everything works: |
| 12 | + |
| 13 | + ``` |
| 14 | + node -v |
| 15 | + ``` |
| 16 | + |
| 17 | +3. Update [npm](https://www.npmjs.com/) and make sure everything works: |
| 18 | + |
| 19 | + ``` |
| 20 | + npm install -g npm@latest |
| 21 | + npm -v |
| 22 | + ``` |
| 23 | + |
| 24 | +4. Download and install [MongoDB](https://www.mongodb.com/download-center). Make sure that it runs on the default port (27017) |
| 25 | + |
| 26 | +5. Use npm to install [bower](http://bower.io/) and [grunt](http://gruntjs.com/). You'll probably need sudo for this (using `-g` affects your machine globally). |
| 27 | + |
| 28 | + ``` |
| 29 | + sudo npm install -g bower grunt-cli |
| 30 | + ``` |
| 31 | + |
| 32 | +6. Set up [git](https://help.github.com/articles/set-up-git/) if you don't already have it. |
| 33 | + |
| 34 | +7. Set up Ruby and Sass to compile CSS. See [here](https://github.com/gruntjs/grunt-contrib-sass#sass-task) for instructions. |
| 35 | + |
| 36 | +#### Download and install libraries |
| 37 | + |
| 38 | +1. Get a copy of the code! |
| 39 | + |
| 40 | + ``` |
| 41 | + git clone https://github.com/JustFixNYC/tenants.git |
| 42 | + ``` |
| 43 | + |
| 44 | +2. You should have a `development.js` copy from me. (If not, email me at [[email protected]](mailto:[email protected])). Place that file in `config/env`. |
| 45 | + |
| 46 | +3. Use npm to install the needed back-end and buildtool libraries. It should trigger a `bower install` for front-end dependencies automatically. Make sure you're in the root directory for the project - i.e. the same level as the `package.json` file. |
| 47 | + |
| 48 | + ``` |
| 49 | + npm install |
| 50 | + ``` |
| 51 | + |
| 52 | +#### Regular use |
| 53 | + |
| 54 | +1. To start, you'll need an active mongodb instance running. I like to do this in a folder within `app` - e.g. `app/mongodb` but it can be run globally or anywhere else. |
| 55 | + |
| 56 | + ``` |
| 57 | + mongod --dbpath . & |
| 58 | + ``` |
| 59 | +Open a new terminal window and make sure its running: |
| 60 | + ``` |
| 61 | + ps aux | grep mongo |
| 62 | + ``` |
| 63 | +You should see the process running, as well as the `grep mongo` command process you just ran. Ex: |
| 64 | + |
| 65 | + ``` |
| 66 | + dan@Dans-MacBook tenants (master) $ ps aux | grep mongo |
| 67 | + dan 4072 0.3 0.0 2583596 6272 ?? S 16Feb17 48:14.37 mongod --dbpath . |
| 68 | + dan 24473 0.0 0.0 2444056 796 s001 S+ 4:26PM 0:00.01 grep mongo |
| 69 | + ``` |
| 70 | + |
| 71 | +2. After that, it should be quite simple to start the app (again, make sure this is from the root directory): |
| 72 | + ``` |
| 73 | + grunt |
| 74 | + ``` |
| 75 | + |
| 76 | +3. Go to `http://localhost:3000` to see your development version! Grunt will watch for any changes you make to the code and automatically restart the server for live development. |
| 77 | + |
| 78 | + |
| 79 | + |
2 | 80 |
|
3 | 81 | ## License
|
4 |
| -(The MIT License) |
5 |
| - |
6 |
| -Permission is hereby granted, free of charge, to any person obtaining |
7 |
| -a copy of this software and associated documentation files (the |
8 |
| -'Software'), to deal in the Software without restriction, including |
9 |
| -without limitation the rights to use, copy, modify, merge, publish, |
10 |
| -distribute, sublicense, and/or sell copies of the Software, and to |
11 |
| -permit persons to whom the Software is furnished to do so, subject to |
12 |
| -the following conditions: |
13 |
| - |
14 |
| -The above copyright notice and this permission notice shall be |
15 |
| -included in all copies or substantial portions of the Software. |
16 |
| - |
17 |
| -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
18 |
| -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
19 |
| -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
20 |
| -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
21 |
| -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
22 |
| -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
23 |
| -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 82 | + |
| 83 | +JustFix.nyc uses the GNU General Public License v3.0 Open-Source License. See `LICENSE.md` file for the full text. |
0 commit comments