Skip to content
Track your nutrition to reach health goals.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bin
config
db
lib
log
public
spec
tmp
vendor/assets
.gitignore
.rspec
.rubocop.yml
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
config.ru

README.md

Carb Tracker

Carb Tracker allows users to track their daily nutrition (carbohydrates, protein, and fat) as a way to reach health goals. Nutrition data is provided by the NutritionIx API. More information about the project is available at: Creating Carb Tracker with Ruby on Rails.

Update: This project was recently updated with several JavaScript based front-end user interactions. More information can be found here.

Carb Tracker is built with the Ruby on Rails web development framework.

Carb Tracker was created as a project for the Flatiron School's Online Web Developer Program.

Setup

Local development for Carb Tracker can be setup with the following steps. Please submit a bug report if these steps don't work for you.

You will need the following software:

  • Git
  • Ruby v2.3.1
  • PostgreSQL

After cloning this GitHub repo, don't forget to run bundle install and run the database migrations.

$ git clone https://github.com/snsavage/carb_tracker.git
$ bundle install
$ rake db:migrate
$ rake db:migrate RAILS_ENV=test

Carb Tracker uses the dotenv gem to manage environment variables. You will need to provide the following variables in a .env file located in the project root.

NUTRITION_IX_ID=<your id here>
NUTRITION_IX_APP=<your key here>
FB_APP_ID=<your id here>
FB_APP_SECRET=<your secret here>

The NutritionIx keys can be obtained here and the Facebook keys here.

Seed data is available by running rake db:seed.

Testing

Carb Tracker has a test suite built with rspec. The test suite can be run with the commands:

$ rspec              # OR
$ bundle exec rspec  # Depending on your system configuration.

Additional front-end testing is done with Jasmine. These tests can be accessed at:

http://localhost:3000/specs

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/snsavage/carb_tracker/issues. Please read the Contributing Guide. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Code of Conduct.

Questions?

Please contact carbtracker@snsavage.com.

License

Carb Tracker is released on the MIT License.

You can’t perform that action at this time.