Fittr allows you to compare your fitness metrics to the world. Using the data from many popular trackers like Fitbit. Your metrics are collected and are used to compete with other users. Fittr was built with the MEAN Stack (MongoDB | ExpressJS | AngularJS | NodeJS)
- Node.js - Download and install Node.js
- MongoDB - Download and install MongoDB and make sure you're running on the default port (27017)
- NPM - Package manager that comes with Node.js
- Bower - Package manager, easy to install with npm
npm install -g bower
- Express - defined as a node module in the package.json file
- Passport - defined as a node module in the package.json file
- Mongoose - defined as a node module in the package.json file
- Angular - defined as bower module in the bower.json file
- d3 - defined as bower module in the bower.json file
- nvd3 - defined as a bower module in the bower.json file
- Angular-Animate - defined as a bower module in the bower.json file
Clone the repo git clone https://github.com/Hendrixer/Fittr.git
The best way to get started with Fittr is to use npm and bower
install node modules npm install
install bower modules bower intsall
start mongoDB in a seperate terminal window or tab mongod
in mongo use the command use fittr
to change to the correct db
Fittr does not include the required file that holds your Fitbit app data, to include, just make a
new file named auth.js
in the config folder You must now paste the following code in and then fill in your Fitbit app secrets
var ids = {
fitbit: {
consumerKey: '/*Your fitbit consumer key here*/',
consumerSecret: '/*Your fitbit consumer secret here*/',
callbackURL: '/*Your fitbit callback url*/'
}
};
module.exports = ids;
Start the Server node app.js
After signing up and populating your DB with users, you must run node fitbitAllAct.js
to query the DB, select all users tokens and retrieve the user's info and data from
Fitbit.
worker.js
will update all users' data from yesterday from fitbit. Use a cron job
to place the worker on a schedule, run node worker.js
Fittr was built by Mehul Patel, Scott Moss, David Wu, Nick Loveridge as a student project at Hack Reactor
MIT