Fully-featured web app to track your macros throughout the day, built on an RoR backend and React.js frontend.
- Ruby
- Node.js
- Yarn
- Git clone
- Navigate to
fitness
directory bundle install
yarn install
rails s
- Go to http://127.0.0.1:3000 in your web browser
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
Our schema can be found as a collection of migration
s located in /fitness/db/migrate
- User sign up
- User login
- User Profile
- Dashboard
- Analytics/History
- Food Picker
- Session management
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.
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;
Create table: Food Table DDL
Import from food.csv into table (in Psql shell):
\COPY foods FROM 'datasets/food.csv' DELIMITER ',' CSV HEADER;