Skip to content

A web app to track daily macronutrient intake by feeding what you ate during the day. Created by Divyam Bhasin, Suraj Gupta, Jeffrey Chen, and Zameer Bharwani.

Notifications You must be signed in to change notification settings

divbhasin/FitnessBuddy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

FitnessBuddy

Getting started

Requirements

  • Ruby
  • Node.js
  • Yarn

Building and running app

  1. Git clone
  2. Navigate to rails-app/fitness directory
  3. bundle install
  4. yarn install
  5. rails s
  6. Go to http://127.0.0.1:3000 in your web browser

Running Tests

1. Run the command rails test within the fitness directory.

  • To ensure correctness, no test should have returned an error or failure.
  • Tests can be found in the fitness/test/models directory.

2. To test the production datasets, go to the datasets directory and run run_tests.sh

  • Please see test-production.sql for other comments/instructions
  • Expected output can be found in test-production.out

Database schema

Our schema can be found as a collection of migrations located in /fitness/db/migrate

Implemented Features

How to Load Production Datasets into PostgreSQL

CSV files, sample SQL statements, and output files for Food and Food Group tables are in the datasets folder. Note that we only need to load the foods and food_groups datasets. The rest of the data in our application will be user-driven.

Food group table

Create table: Food Group Table DDL

Import from food_group.csv into table (in Psql shell):

\COPY food_groups FROM 'datasets/food_group.csv' DELIMITER ',' CSV HEADER;

Food table

Create table: Food Table DDL

Import from food.csv into table (in Psql shell):

\COPY foods FROM 'datasets/food.csv' DELIMITER ',' CSV HEADER;

About

A web app to track daily macronutrient intake by feeding what you ate during the day. Created by Divyam Bhasin, Suraj Gupta, Jeffrey Chen, and Zameer Bharwani.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published