Skip to content

teddyku1994/My-Recipe-Web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Recipe

My Recipe aims to be more than an regular receipe searching website, but a website with tools to provide more insight on the ingredients used for cooking a dish.
Website URL: https://bookncode.com (Currently Closed)

Table of Contents

Technologies

Backend

  • Node.js / Express.js
  • Web Crawler (cheerio)
  • JWT Auth.
  • CI / CD (Jenkins)
  • SSL Certificate (Let's Encrypt)
  • Error Handling: Identify type of error and return error message to frontend with corresponding status

Front-End

  • HTML
  • CSS
  • JavaScript
  • AJAX

Database

  • MySQL
  • Redis (Cache)

Cloud Service (AWS)

  • EC2
  • S3
  • CloudFront

Networking

  • HTTP & HTTPS
  • Domain Name System(DNS)
  • NGINX

Test

  • Unit Test: Jest
  • Load Test: Artillery

Additional

  • Facebook Login API
  • MVC design pattern
  • Git / GitHub

Architecture

  • NGINX redirects 443 port requests from clients to corresponding ports
  • Result searching process:
    • Search Redis (cache) for matching result and return the result if found
    • If no matching result search MySQL DB for result and return result if found
    • If no matching result in MySQL DB, the app will trigger web crawling and return the found result after storing it into the database.

Database Schema

Main Features

  • Recipe Search
    • Search using dish names
    • Search by inputing ingredients you have
  • Nutrient Level Search
    • Renders up to 10 most relevant food and provide nutrient level for each upon search
  • Vegetable & Fruit Price Search
    • Return weekly wholesale & retail price from crawler
    • Users can trace food price will be updated automatically weekly
  • Member System
    • Supports Facebook Login
    • Upload / Update / Delete Recipes

Features Demo

Home Page

  • Popular recipes are stored in cache (TTL 6hrs) and updated periodically through fetching most liked recipes from databse
  • Quick search function using dish name

Recipe Search

  • Refer to Architecture for Dish Name Search & Ingredients Search process
  • Database will grow as more users search for different dishes
  • Hot Keywords are rendered by selecting the top 6 most searched keywords recorded in database

Nutrient Level Search

  • Select 10 most relevant result from 2000+ data and renders nutrient detail on click

Vegetable and Fruit Price Search

  • Member only function
  • Upon search the application will crawl for wholesale, retail price and relevent result of the searched item and store in Redis
  • Users can choose to add items into trace list and the application will update and compare the prices weekly
  • Update schedules are achieved thorugh utilizing node-schedule module
  • This function uses Redis as database, because information are regularly updated (optimize efficiency)

User Recipes Management

  • Users can upload / update and delete recipes through profile
  • Images of recipes are uploaded to AWS S3 and read through AWS CloudFront to optimise load speed

User Basic Functions

  • Users can add recipe to their favorite and manage favorites in their profile
  • Users can also like recipes which is then used to render popular recipes
  • Profile page also allow users to change basic information and password

APIs Documentation

For details on APIs request and response, click the link below:

Link: APIs Doc.

Contact

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published