GitXplorerGitXplorer
j

disfood

public
2 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
c00b09906a6bb1ac7306a59b7cacf4786c431252

Update README.md

jjvandenaardweg committed 6 years ago
Unverified
53a2645e69f9c21278145571dfcabf73cfdcbac5

Fix fetching a single recipe

jjvandenaardweg committed 6 years ago
Unverified
adfe9f0ea19526c74061eea592ad6ab3780120ff

Updated worker to better handle fetching

jjvandenaardweg committed 6 years ago
Unverified
f20eabb3f2761faa6b962b4748a68ca2f44a9529

Fix fetching recipes that are already in the database

jjvandenaardweg committed 6 years ago
Unverified
1bb5d7058065539e44020ae2af7222f63f1ff6f5

Fix parsing errors

jjvandenaardweg committed 6 years ago
Unverified
450ca85db1485ae7458dab08991e73940fa35780

Updated yarn.lock

jjvandenaardweg committed 6 years ago

README

The README file for this repository.

disfood

Door aan te geven welke ingrediënten je niet wilt eten (of écht niet lekker vindt) worden suggesties gegeven voor gerechten die je wél lekker vindt.

De ingrediënten zijn te koop in jouw lokale supermarkt. Momenteel wordt alleen Albert Heijn ondersteund maar willen wij dit concept uitrollen voor alle bekende supermarkten in Nederland.

Waarom?

Vaak weten we juist meer wat we níet willen eten, dan wat we wél willen eten. Laat deze app voor je werken op momenten dat je even niet meer weet waar je trek in hebt en inspiratie nodig hebt.

In plaats van aan te geven wat je wel zou willen eten kan je met deze app aangeven wat je juist niet wilt eten. Ben je geen fan van spruitjes? Of rode bietjes? Geef dat op in de app en je zal geen gerechten zien waar dat in zit. Dat maakt de keus wat makkelijker op momenten dat je snel inspiratie nodig hebt.

Daarbij komt ook: gerechten waarvan je weet dat je ze bij je lokale supermarkt kan kopen zal je ook sneller maken; brengt stukje gemak met zich mee. Daarom tonen we gerechten per winkel, zo kan jij je tijd efficiënter kan indelen.

Met behulp van machine learning worden gerechten suggesties specifieker aangepast op jouw wensen. Waardoor je zelf nog minder hoeft na te denken.

Scheduled workers

Below are a few scheduled worker scripts. They should run every 24 hours.

  1. forever worker.js get's all recipes from a source
  2. forever worker-labels.js creates labels based on the recipe image and translates labels from English to Dutch

Image Labelling using Google Cloud Vision API

Images from the source website go through Google's Cloud Vision API to detect labels. The labels can be used to further specify recipes. Although this is not 100% correct, we can use the score and topicality to determine a treshold.

Use GOOGLE_CLOUD_VISION_CREDENTIALS env var for the JSON credentials.

Development ENV variables

Use the following env variables for local development: ACCESS_TOKEN= < ask repo maintainer BASE_URL= < ask repo maintainer RECIPE_BASE_URL= < ask repo maintainer NODE_ENV=development DATABASE_URL=postgres://disfood:disfood@localhost:5432/disfood REDIS_URL=redis://localhost:6381 POSTGRES_PASSWORD=disfood POSTGRES_USER=disfood POSTGRES_DB=disfood

The POSTGRES_PASSWORD, POSTGRES_USER, POSTGRES_DB is used for Docker to create that database in a container on your local machine. Don't use those credentials in the project files. Instead, use DATABASE_URL.

Get copy of production DB for local dev

Get a copy of the production database (ask repo maintainer) and import it in your local Dockerized PostgreSQL instance:

  1. Open your terminal and navigate to this project root.
  2. Create a live copy of the production DB: heroku pg:backups:capture --app disfood (or ask someone to do this)
  3. Download it: heroku pg:backups:download --app disfood. latest.dump should now be in the project root
  4. Run yarn import:db and fill in the local db password when asked for it disfood
  5. After the import, the database should be filled.