Giter VIP home page Giter VIP logo

recipes's Introduction

Recipes

This repo contains react frontend app and a node js express server, with elasticsearch hosted deployment.

What you need to have installed locally - prerequisites

  • terminal (windows: gitbash)
  • node js
  • yarn
  • nodemon: get it by npm i -g nodemon
  • docker
  • docker-compose

Create a .env file located at /api/.env and add there:

  • ELASTIC_SEARCH_HOST=(address sent personally)
  • ELASTIC_SEARCH_INDEX=recipes
  • ISSUER_BASE_URL=(address sent personally)
  • BASE_URL=(address sent personally)
  • APP_SESSION_SECRET=(info sent personally)
  • CLIENT_ID=(info sent personally)
  • AUTH0_API_AUDIENCE=https://recipeify.com/users
  • RECOMBEE_DATABASE_ID=(info sent personally)
  • RECOMBEE_PRIVATE_TOKEN=(info sent personally)
  • MONGODB_HOST=mongodb://mongo:27017

Create .env.local file located at /client/.env.local and add there:

  • REACT_APP_AUTH0_DOMAIN=(info sent personally)
  • REACT_APP_AUTH0_CLIENT_ID=(info sent personally)
  • REACT_APP_AUTH0_AUDIENCE=https://recipeify.com/users

To install all the dependencies

cd api
yarn
cd ../client
yarn

To run both client and server at once

cd api
yarn dev

Basic Docker usage

docker images # display all local images
docker ps # all running containers
docker run .... # run a container with lots of options like attached/detached, ports exposed, etc
docker build ... # build a docker using a docker Dockerfile
docker tag ... # tag a current version of a docker saving any new layers

Further usage can be found easily using Google search and this cheatsheet

To run elasticsearch (with sample recipes) in an attached/detached container

docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" [-d] hagais/es-recipes:1.0

then make sure that .env has ELASTIC_SEARCH_HOST=http://localhost:9200 set before running yarn

To run elasticsearch + mongoDB + recipeify service in containers

# in main repo dir
docker-compose build
docker-compose up

recipes's People

Contributors

dependabot[bot] avatar guyschwartzberg-student avatar hagaishapira avatar leshemnoa avatar yuvalbardugo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

recipes's Issues

Infinite scroll

For both search and my recipes we should support infinite scroll

Mobile Support

This is an epic, we need to improve the mobile experience of the site either by creating a mobile optimized version or auto scaling of our desktop vesion.

Enrich scraped data with labels

  • Description: Extend recipe-scrapers to allow extra labeling for recipes such as Vegan, Vegetarian, Style, Dish Type, etc
  • Requirements:
    • extend most recipe-scrapers to support tag on common sites
  • Time Estimation: 4 hours

Periodic Scraper

Description: Finalize periodic scraper for continuous collection of new recipes
Requirements:

  • Package scraper code
  • Set up lambda for periodic runs

Time Estimation: 4 hours

Search sidebar collapse and css

The search sidebar has many input fields for the various "search by" types.

  • Allow the user to have a simplified options (Free Text, include, exclude, diet, cook time? ) with a "more" button which expands the sidebar and presents all other input fields.
  • Fix CSS issue that causes the bottom of the sidebar to be uncolored (which showed up on the demo)

Recipe Metadata Overlay

  • Description: As a part of milestone 1 feedback, we should add metadata of a recipe to be overlaid over the image.
  • Requirements:
    • Recipe Source
    • Cook time
    • Rating?
  • Time Estimation: 3 hours

Elasticsearch Migration

  • Description: Since bonsai gives us limited storage we should migrate to AWS Elasticsearch hosted solution as part of the free tier
  • Requirements:
    • Set up an instance
    • Ensure secure development access
    • Data migration
  • Time Estimation: 4 hours

Login Modal

When an unauthenticated user clicks on the star button to "add to his recipes" a modal should pop with an explanation that the user must sign in in order to save recipes and a "login button"

Recipeify Logo

  • Description: Finalize logo design for app
  • Requirements:
    • Neat logo, fits design language and professional looking
  • Time Estimation: 1 hours

ElasticSearch query improvements

Common issues:

  • Multiple word searches only match one word (For instance, fried chicken gives results that contain only fried or only chicken)
  • Attempt to make results more diverse in terms of website source
  • Match dish types to ingredients to improve search (Map vegan to exclude chicken and other types of meat, Map cuisine type (chinese, mexican) to certain dishes that are of that cuisine, match eggfree to exclude egg as ingredient, etc)

ant.js migration

  • Description: Switch UI js lib from bootstrap to ant,js for better graphics
  • Requirements:
    • Complete migrations of basic PoC screen
  • Time Estimation: 6 hours

Error on My recipes

When the recipe book is empty, the word error is shown on "my recipes" page
image

Apply User Preferences to Search and Recommendation Endpoint

Description: Apply user's blacklisted ingredients and preferred diet when searching or recommending
Requirements:

  • check in search and recommend endpoints for user session
  • apply filter in Elastic query
  • apply filter in Recombee request

Time Estimation: 4 hours

Milestone 2 Presentation

Description: Sort out the presentation for milestone 2 with data views, architecture, and live demo
Time Estimation: 2 hours

Architecture Drawing

  • Description: Architecture documentation for final submission and presentation
  • Requirements:
    • Draw our entire app architecture including 3rd party vendors
  • Time Estimation: 2 hours

Recipe Follow Up Feature

  • Description: Track authenticated users recipe views in order to follow up on them and ask if they want to save them to their cookbook
  • Requirements:
    • Track user external recipe visit
    • API call that provides externally visited recipes, as a one time resource
    • Show special dynamic book of visited recipes and allow user to save them
  • Time Estimation: 8 hours

User Oauth2 Authentication

  • Description: enable user account management using Oauth providers such as Gmail and Facebook
  • Requirements:
    • Enable sign up, log in, log out
    • Enable user data association
    • Perhaps integrate with auth0
  • Time Estimation: 5 hours

Milestone 1 Presentation

  • Description: Sort out the presentation for milestone 1 with finished mock ups and text
  • Time Estimation: 1 hours

CDN and Performance Optimization

  • Description: AWS free tier allows limited resources so we need to be smart about our deployment for higher loads
  • Requirements:
    • Set up a CDN (Cloudflare since it's free)
    • Serve static content like the clientside from CDN/S3 instead of webserver
    • Use nanoexpress pro as a drop in replacement for express.js
  • Time Estimation: 8 hours

Explore Curated Recipe Lists

  • Description: In the "explore" phase before the users start their search and filtering showcased dynamically curated recipes based on seasonality, recommendation system, new additions
  • Requirements:
    • Seasonal recipe query
    • Newest additions
    • Community Favorites
  • Time Estimation: 7 hours

bug: returning to explore from my recipes doesn't maintain free search text

Reproduce:

  1. search for recipes with text and ingredients
  2. go to my recipes
  3. go to explore again
  4. while the ingredients are still marked you don't see the free search text that was in the last query

We need to either clear the entire search session and just show explore without a search, or display the entire context.

Elasticsearch setup

  • Description: setup a hosted Elasticsearch instance to server as the main pool on which to have the back end query
  • Requirements:
    • Setup and integrate bonsai search instance
  • Time Estimation: 3 hours

Unified Search Endpoint

  • Description: Unified search api endpoint with all relevant fields refactor
  • Requirements:
    • Smart query for ES
    • Define API for frontend as well
  • Time Estimation: 4 hours

Recipe modal buttons

in the recipe modal the save button appears in middle with the visit button below it and to the side.
Both buttons should share equally the modal footer.

Empty results messages

Both for search that has no recipes match or for my recipes when you have yet to save any.

My Cook Book Page

  • Description: A page in the web app showcasing the users saved recipes, saved personal dietary preferences and additional personal content
  • Requirements:
    • View and filter saved recipes
    • Show and set personal dietary preferences
    • Dynamic box that might ask how if user wants to save previously clicked recipes to cook book.
  • Time Estimation: 12 hours

Complete search UI

  • Description: Complete relevant search components
  • Requirements:
    • Free text search bar
    • Cooking time slider
    • dietary pref field
    • search bar smooth transition
  • Time Estimation: 8 hours

Cloud Infrastructure

  • Description: The main cloud environment of the app delivering the client side content as well as servicing the API
  • Requirements:
    • GCP environment
    • set up DNS
    • HTTPS TLS 1.2 with let's encrypt automatic renewal
    • Serve API endpoints (perhaps App Engine)
  • Time Estimation: 8 hours

User personalized suggested recipes and rating

  • Description: Implement a recommendation system to allow user to both have recipes suggested based on previous saved recipes, and have new recipes suggested on other user's most liked recipes
  • Requirements:
    • Set Recombee instance
    • Model recipes catalog
    • Signal upon users saving a recipe to personal cook book
    • Query for recommendations based on previous personal likes
    • Query for recommendations based on community most liked
  • Time Estimation: 7 hours

Automated Recipe Crawling

  • Description: A crawler that runs periodically to scrape new recipes from content sites based on the recipe-scrapers library
  • Requirements:
    • Backend crawler wrapping the recipe-scrapers enhanced with additional recipe tags
    • Keep track of new recipes to be put into the catalog
    • Infrastructure for a periodic run on low demand times
  • Time Estimation: 12 hours

Main Page PoC

  • Description: create client side code for main page recipe browsing and searching PoC for milestone 1 presentation
  • Requirements:
    • search by ingredients
    • search with free text
    • autocompletion
    • query recipes using API
    • UI design
  • Time Estimation: 10 hours

Prioritize recipes with image and rating

Description: Adjust the Elasticsearch scoring function to boost recipes with an original photo (not placeholder) and use the rating of the recipe in the scoring.
Requirements:

  • boost recipes with actual photo
  • have rating and number of reviewers intergrated into the score

Time Estimation: 4 hours

Privacy Policy, Google Analytics and other shenanigans

  • Description: If we want real users and not get sued then we need a privacy policy and make sure we have a privacy policy
  • Requirements:
    • Get a best practice privacy policy and link it on the bottom ruler
    • Set google analytics
  • Time Estimation: 3 hours

License for our Repo

Since our repo is public and open sourced I think it's wise to choose a License

User Ops Dropdown Menu

  • Description: Upon clicking the avatar a user will have a small dropdown menu with user related operations
  • Requirements:
    • Unauthenticated User
      • Log In
      • Sign Up
    • Authenticated User
      • Log Out
      • Account Delete
  • Time Estimation: 5 hours

Users API Endpoints

  • Description: API endpoints used for user operations and require authentication
  • Requirements:
    • Require authentication token as means of identification
    • get/set pref
    • save/remove recipe
    • get all saved
    • MongoDB/DynamoDB store
  • Time Estimation: 8 hours

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.