Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback #1

Open
wants to merge 90 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
4b8ad16
Setting up GitHub Classroom Feedback
github-classroom[bot] Sep 22, 2020
8a81deb
Update GitHub Classroom Feedback
github-classroom[bot] Sep 22, 2020
39de2c6
Setting up GitHub Classroom Feedback
github-classroom[bot] Sep 22, 2020
942d055
Added starter code for project
coder-tim Oct 13, 2020
571f871
Update README.md
coder-tim Oct 13, 2020
6f2a7f6
Removed pycache
coder-tim Oct 14, 2020
e56c646
Merge branch 'tim-starter-code-setup' of https://github.com/ECE444-20…
coder-tim Oct 14, 2020
62082b6
Added pycache to .gitignore
coder-tim Oct 14, 2020
d129540
Removed package-lock.json
coder-tim Oct 14, 2020
bbdcc9e
Changed HTTP statuses from integers to HTTPStatus constants
coder-tim Oct 14, 2020
5445028
Fixed naming conventions for React component files
coder-tim Oct 14, 2020
7fc7a15
Merge pull request #2 from ECE444-2020Fall/tim-starter-code-setup
coder-tim Oct 14, 2020
28b92ea
skeleton db setup with users table
yanisakham Oct 21, 2020
2808683
fix requirements for sqlalchempy
wangwangaze Oct 21, 2020
2056d72
add table schemas for all db tables
yanisakham Oct 23, 2020
38dbf80
add dependency imports
yanisakham Oct 23, 2020
6116cab
Merge pull request #3 from ECE444-2020Fall/CPP-30
yanisakham Oct 26, 2020
7858e3f
Basic login functionallity implemented, styling and database implemen…
jmartin4849 Oct 27, 2020
b3ca269
implement add/remove/show shopping cart APIs and inventory manager
yanisakham Oct 27, 2020
95b7af2
Modified Recipe model class so that recipe_id isnt passed in as a par…
coder-tim Oct 28, 2020
061725f
Update README.md
coder-tim Oct 28, 2020
9563ae6
Add material UI components to the web app pages and navigation bar
Oct 29, 2020
1cd02da
Added unit tests for Nutrition Tracker feature
Oct 29, 2020
061012f
add simple unit tests to shopping_list and fix endpoint names
yanisakham Oct 29, 2020
ad8c6c1
Merge pull request #4 from ECE444-2020Fall/Yanisa.CPP-14
coder-tim Oct 29, 2020
8844224
Merge pull request #6 from ECE444-2020Fall/m.abdelhamid
coder-tim Oct 29, 2020
5e920cd
Added unit tests for api/show_users endpoint
coder-tim Oct 30, 2020
0282751
Changed src folder name to client
coder-tim Oct 30, 2020
2c75a76
add name as comment to tests
yanisakham Oct 30, 2020
2d0eb98
Added my name in unit test comments
coder-tim Oct 30, 2020
f015871
Merge pull request #8 from ECE444-2020Fall/tim-change-src-folder-name
yanisakham Nov 2, 2020
a85f6f0
Register working, Login not working
jmartin4849 Nov 3, 2020
0f31c0f
fix client folder and add container and pages folders
yanisakham Nov 3, 2020
5049025
Merge branch 'master' into Yanisa.CPP-14
yanisakham Nov 3, 2020
f05d7b0
inital implementation of shopping list
yanisakham Nov 3, 2020
14c1621
Merge pull request #9 from ECE444-2020Fall/Yanisa.fix_client_repo_str…
yanisakham Nov 3, 2020
53f2174
merge conflict resolution
yanisakham Nov 3, 2020
d32a2c7
Merge pull request #7 from ECE444-2020Fall/tim-show-users-unit-test
coder-tim Nov 4, 2020
5e12d50
format files
yanisakham Nov 4, 2020
22d5a17
Merge pull request #10 from ECE444-2020Fall/Yanisa.CPP-14
coder-tim Nov 5, 2020
2406ebd
fix lint errors and add recipe personalization manager
yanisakham Nov 7, 2020
38d1070
Deploy Frontend and Backend to Heroku (#11)
yanisakham Nov 8, 2020
bc2e554
Added path parameter for RecipeDetail id
coder-tim Nov 8, 2020
ee830a8
Merge pull request #12 from ECE444-2020Fall/tim-add-path-param-for-re…
coder-tim Nov 8, 2020
51a15b7
Merge branch 'master' into Yanisa_CCP-4_favourites_list
yanisakham Nov 10, 2020
b11f0de
Implemented Recipe and Ingredient Scraper and several endpoints for P…
coder-tim Nov 10, 2020
1c7facb
Register functionallity working
jmartin4849 Nov 10, 2020
afbc01e
Merge branch 'master' into Yanisa_CCP-4_favourites_list
yanisakham Nov 10, 2020
462222f
Login and Register functionality working
jmartin4849 Nov 11, 2020
c2618d8
db changes
yanisakham Nov 11, 2020
3d14347
update tables to use uuid for recipe_id
yanisakham Nov 11, 2020
0b35cc1
Merge pull request #17 from ECE444-2020Fall/tim-yanisa-recipe-table-m…
abdelhamidm Nov 11, 2020
edf9b0c
Implemented basic layout and functionalities for Recipe Search Result…
coder-tim Nov 11, 2020
d1fb2ce
add user rating, recipe cart and favs list (#18)
yanisakham Nov 12, 2020
2fa34f1
Updated the UI for register and login pages
jmartin4849 Nov 12, 2020
54c6fc6
Login and register working front end and backend with UI
jmartin4849 Nov 13, 2020
b9a6a0e
Completed Login, Register Functionality
jmartin4849 Nov 13, 2020
15c7a82
Added Redux for better performance in rendering RecipeSearchResult an…
coder-tim Nov 13, 2020
fb18597
Made suggested changes from PR
jmartin4849 Nov 14, 2020
26013a5
Fixing merge conflicts
jmartin4849 Nov 14, 2020
a06a010
Merge branch 'master' into Johnathon-Login
jmartin4849 Nov 14, 2020
ff4c0f0
Merge pull request #20 from ECE444-2020Fall/Johnathon-Login
jmartin4849 Nov 14, 2020
e213a42
backend and frontend functionality for showing recipe cart and favour…
yanisakham Nov 14, 2020
f1939ec
Implemented feature to sort recipes ascending/descending by calories,…
coder-tim Nov 14, 2020
642d6af
Add Recipe User Notes (#22)
yanisakham Nov 15, 2020
ce736dd
Added styling to RecipeDetail page (#27)
coder-tim Nov 15, 2020
834c3bf
Added styling to RecipeCards and added pagination to RecipeSearchResu…
coder-tim Nov 15, 2020
60c5f82
Added Pantry page with similar functionality to Shopping list page
jmartin4849 Nov 15, 2020
e8c6f68
Fixed merge conflicts
jmartin4849 Nov 15, 2020
4ef341d
Fixed some styling issues on the page after re-populating our DB with…
coder-tim Nov 15, 2020
30af1f0
Recommend recipes feature implemented backend
jmartin4849 Nov 15, 2020
41af6b7
frontend and backend for smart shopping list generation (#29)
yanisakham Nov 15, 2020
ef63c8e
Completed pantry backend implementation
jmartin4849 Nov 16, 2020
efe0054
Fixing merge conflicts
jmartin4849 Nov 16, 2020
d4b3fab
fix weird scrolling bug and user rating not updating, applied recipeU…
yanisakham Nov 16, 2020
7c23433
Addressed PR comments
jmartin4849 Nov 16, 2020
7a2814d
Merge pull request #30 from ECE444-2020Fall/Johnathon-pantrySearch
jmartin4849 Nov 16, 2020
04f3098
Added images and text for styling (#33)
jmartin4849 Nov 16, 2020
ea32085
Connected Pantry page to RecipeSearchResult page (#34)
coder-tim Nov 16, 2020
46bd9a2
Added drop-down menu for sorting recipes based on various attributes.…
coder-tim Nov 17, 2020
b550972
Refactored nav bar for better aesthetics and mobile support (#37)
coder-tim Nov 17, 2020
be3bd0a
Yanisa repo cleanup (#38)
yanisakham Nov 17, 2020
a715fac
Yanisa repo cleanup (#39)
yanisakham Nov 18, 2020
49f8a7a
Added unit tests for back-end code. (#42)
coder-tim Nov 18, 2020
b14b115
Backend unit test cases (#43)
abdelhamidm Nov 18, 2020
22b397a
Added header comments and in-line comments (#41)
coder-tim Nov 19, 2020
61a5005
App Deployment and Resolution of CORS/ Session Issues (#44)
yanisakham Nov 19, 2020
7c2dbe8
Fixed unit tests after deployment code changes. (#46)
coder-tim Nov 19, 2020
0b891ec
Updated README.md (#45)
coder-tim Nov 19, 2020
224434d
Update README.md
coder-tim Nov 19, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
module.exports = {
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly",
"it": "writable",
"process": "readonly"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
},
"parser": "babel-eslint",
"settings": {
"react": {
"version": "detect"
}
}
};
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Project Tests
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
- name: Test with pytest
run: |
cd server
python -m pytest
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# vscode configuration
.vscode/

# testing
/coverage

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*


# production
/server/build


# dependencies
/node_modules

# Python-related files
__pycache__/
*.py[cod]
*$py.class

# Virtual env
env
1 change: 1 addition & 0 deletions ProcFile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn --pythonpath server server:app
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Chef Co-Pilot

This web application asks a user to enter ingredients, and then recommends recipes based on the ingredients. The user can
add recipes to favourites list, rate recipes, save personal notes on recipes, and add recipes to a cart to generate an ingredients shopping list. The ingredients shopping list contains a list of additional ingredients that the user needs to purchase in order to prepare the carted recipes.

## Developers
- Yanisa Kham
- Tim Fei
- Johnathon Martin
- Mohamed Abdelhamid

## How to run the code locally

In the root directory of the project

1. Install node modules `npm install`.
2. Install Python dependencies `pip install -r requirements.txt`.
3. Start front-end `npm start`.
4. Start back-end `python server/server.py`.

## File Structure

The front-end is based on [create-react-app](https://github.com/facebook/create-react-app). It is served on http://localhost:3000/.

The back-end is based on [Flask](https://github.com/pallets/flask). It is served on http://localhost:3001/.

```
.
β”œβ”€β”€ server - Flask back-end
β”‚ β”œβ”€β”€ app - Defines the constants for the endpoints and port
β”‚ β”‚ β”œβ”€β”€ model_schemas - database models for the app
β”‚ β”‚ └── routes - routes and controller classes for the app
β”‚ β”œβ”€β”€ migrations - MySQL database migrations
β”‚ β”œβ”€β”€ scripts - Contains code used for scraping recipes and ingredients from Spoonaular API
β”‚ β”œβ”€β”€ tests - Unit tests
β”‚ β”œβ”€β”€ util - Helper functions
β”‚ └── constants.py - Defines the constants for the endpoints and port
β”œβ”€β”€ src - React front-end
| β”œβ”€β”€ actions - Redux action dispatchers
β”‚ β”œβ”€β”€ components - React sub components for containers
| β”œβ”€β”€ containers - React components with sub-components for each page
| β”œβ”€β”€ pages - App web pages
| β”œβ”€β”€ reducers - Redux reducers
| β”œβ”€β”€ utils - Helper functions
β”‚ β”œβ”€β”€ App.jsx - React routes
β”‚ β”œβ”€β”€ index.jsx - React root component
| β”œβ”€β”€ store.js - Redux store for storing app's states
| └── localStorage.js - Code for accessing data from and storing data to local storage
└── README.md
```

## Additional Documentation

- React - https://reactjs.org/
- Redux - https://redux.js.org/
- Material UI - https://material-ui.com/
- React Router - https://reacttraining.com/react-router/
- Bootstrap CSS - https://getbootstrap.com/
- Flask - http://flask.pocoo.org/

This project was created using [Microsoft Web Template Studio](https://github.com/Microsoft/WebTemplateStudio).
12 changes: 12 additions & 0 deletions buildScript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const fs = require("fs");
const fse = require("fs-extra");
const childProcess = require("child_process");

//Build client app
if (fs.existsSync("./build")) {
fse.removeSync("./build");
}
childProcess.execSync("react-scripts build", { stdio: "inherit" });

//Move client
fse.moveSync("./build", "./server/build", { overwrite: true });
Loading