No description
Find a file
Tyler Renelle 7e91fa4524 Merge pull request #3987 from Alys/soundOff404-Sep05
prevent harmless but annoying 404 errors for sound files when sound is off
2014-09-05 16:08:14 -06:00
archive add debug buttons back in, including +10 gems (@sabrecat) 2013-10-31 15:14:19 -07:00
database_reports stop crashing when user doesn't have expected object 2014-09-03 11:45:07 +10:00
migrations feat(mystery): august mystery 2014-08-25 17:16:41 -06:00
public Merge pull request #3987 from Alys/soundOff404-Sep05 2014-09-05 16:08:14 -06:00
src perf(auth): exclude unecessary auth fields 2014-09-02 15:54:56 -06:00
test Update to wrap async calls with async.parallel 2014-08-06 21:10:54 -07:00
views Merge pull request #3993 from negue/performance_trackBy 2014-09-05 16:04:14 -06:00
.bowerrc chore(bower): bowerrc (see https://github.com/bower/bower/issues/933) 2014-02-28 22:12:15 -07:00
.gitignore fix(bailey): small tweaks to 7/31 (spacing, remove project files) 2014-07-30 17:17:51 -06:00
.jshintrc feat(jshint): add initial config 2014-04-01 07:37:56 +03:00
.nodemonignore chore(nodemon): ignore Vim temp files 2014-05-15 17:31:06 +07:00
.travis.yml add mocha tests to travis, remove makefile 2014-01-15 20:11:29 +01:00
bower.json fix(sortable): revert back to jqueryUI, fixes #3946 2014-08-28 16:32:05 -06:00
CHANGELOG.md Changed hints style (and small quick fixes) 2014-02-16 10:13:16 -05:00
config.json.example feat(subscriptions): add paypal recurring cancelation. refactor stripe & paypal code to use auth.authWithUrl. 2014-03-24 20:47:25 -06:00
CONTRIBUTING.md change Request Feature link in footer, Tavern link box, CONTRIBUTING.md 2014-08-07 09:59:31 +10:00
Dockerfile Update docker file 2014-08-07 00:39:57 -04:00
DOCS-README.md Updated DOCS-README.md for Docker 2013-09-28 14:59:34 -07:00
EXTENDEDCHANGELOG.md chore(bailey): add bailey for group plans + perfect day achiev. Keep 2014-01-28 12:27:30 -08:00
Gruntfile.js fix(misc): some styles & translations 2014-02-14 18:35:21 +01:00
karma.conf.js fix(tests): include select2 in test manifest 2014-01-23 10:12:17 -08:00
LICENSE chore(license): remove conflicting text (fixes #2596), and simply reference the GPLv3 file by URL. Assets & content designed by BQ are CC-BY-SA, for HabitRPG are CC-BY-NC-SA 2014-01-27 15:42:42 -08:00
newrelic.js chore(newrelic): some newrelic code location experiments 2014-01-30 13:43:30 -07:00
package.json Revert "chore(packages): test upgrade to mongoose 3.8.15" 2014-08-29 19:55:53 -06:00
Procfile update procfile for heroku. @paglias this is the heroku script-runner btw 2013-09-07 10:54:03 -04:00
protractor.conf.js Test server port changed to 3001 2014-01-01 14:01:51 -03:00
README.md Merge remote-tracking branch 'remotes/denis-sokolov/patch-1' into develop 2014-08-19 13:05:43 -06:00
VAGRANT.md Updated base vagrant box. added full provisioning of HRPG env. 2014-04-11 10:18:01 -04:00
vagrant.sh make experimental changes to try to make vagrant install work better 2014-07-26 14:20:14 +10:00
Vagrantfile put Vagrantfile back the way it's meant to be 2014-07-13 16:14:46 +10:00
validate-commit-msg.js chore(changelog): change max commit message length back to 999 (sorry, @lefnire! 2014-01-28 16:37:19 -06:00
validate-commit-msg.spec.js chore(changelog): change max commit message length back to 999 (sorry, @lefnire! 2014-01-28 16:37:19 -06:00

HabitRPG Build Status Code Climate Bountysource Dependency Status

HabitRPG is an open source habit building program which treats your life like a Role Playing Game. Level up as you succeed, lose HP as you fail, earn money to buy weapons and armor.

Built using Angular, Express, Mongoose, Jade, Stylus, Grunt and Bower.

Set up HabitRPG locally

Windows users should skip this section and read the one below with Windows-specific steps.

Before starting make sure to have MongoDB, NodeJS and npm and Git installed and set up.

  1. Fork the repository on your computer.
  2. Checkout the develop branch where all the development happens: git checkout -t origin/develop
  3. Install grunt-cli npm package globally (on some systems you may need to add sudo in front of the command below): npm install -g grunt-cli bower
  4. Install our dependencies: npm install
  5. Create a config file from the example one: cp config.json.example config.json
  6. Ensure that Mongo is running and seed the database with initial settings by running: node src/seed.js.

Windows Environment Install

  1. Set up MongoDB. Steps:
  2. Download the latest production release of MongoDB
  3. Extract the zip file to the desired application directory. Example: c:\apps\mongodb-win32-x86_64-2.4.6
  4. Rename the folder from mongodb-win32-x86_64-2.4.6 to mongodb
  5. Create a data\db directory under the application directory. Example: c:\apps\mongodb\data\db
  6. Start up MongoDB using the following command: c:\apps\mongodb\bin\mongod.exe --dbpath c:\apps\mongodb\data

If MongoDB starts up successfully, you should see the following at the end of the logs:

Sun Sep 01 18:10:21.233 [initandlisten] waiting for connections on port 27017
Sun Sep 01 18:10:21.233 [websvr] admin web console waiting for connections on port 28017
  1. Install Node.js (includes npm).

  2. Install Git.

  3. Fork the repository on your computer.

  4. Checkout the develop branch where all the development happens: git checkout -t origin/develop

  5. Install our dependencies: npm install.

    You might receive the following error during the npm install command:

    habitrpg@0.0.0-152 postinstall C:\...\habitrpg
    ./node_modules/bower/bin/bower install -f
    '.' is not recognized as an internal or external command,
    operable program or batch file.
    npm ERR! weird error 1
    npm ERR! not ok code 0
    

    Ignore this error and proceed with the following:

  6. Install grunt-cli and bower npm packages globally: npm install -g grunt-cli bower

  7. Install the bower packages: bower install -f

  8. Create a config file from the example one: copy config.json.example config.json

  9. Ensure that Mongo is running and seed the database with initial settings by r unning: node src\seed.js.

Run HabitRPG

HabitRPG uses Grunt as its build tool.

grunt run:dev compiles the Stylus files and start a web server.

It uses Nodemon and grunt-contrib-watch to automatically restart the server and re-compile the files when a change is detected.

Open a browser to URL http://localhost:3000 to test the application!

Technologies discussion

  1. Angular, Express, Mongoose. Awesome, tried technologies. Read up on them.
  2. Stylus, Jade - big debate.
  3. Jade. We need a server-side templating language so we can inject variables (res.locals from Express). Jade is great because the "significant whitespace" paradigm protects you from HTML errors such as missing or mal-matched close tags, which has been a pretty common error from multiple contribs on Habit. However, it's not very HTML-y, and makes people mad. We'll re-visit this conversation after the rewrite is done.
  4. Stylus. We're either staying here or moving to LESS, but vanilla CSS isn't cutting it for our app.