Skip to content

Nina1o1/my-menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Menu

Overview

With the food left in fridge, what should I cook to fit my appetite? My Menu is for you to recall all your loved recipes with food in your fridge! (or, how to cook my favorate dish)

Data Model

The application will store Users, Recipes, and Categories

  • Users can have multiple Recipes (via reference)
  • Users must have one Category (via reference)
  • Category must have one User (via reference)
  • Recipes must have one User (via reference)
  • Recipes can have multiple Steps (via embedded)
  • Recipes can have multiple Ingredients (via embedded)
  • Recipes can have miltiple Categories (via reference)

A Sample User:

{
  "_id": "abc",
  "username": "Nina", // username, unique (TODO)
  "hash": "938u2rhgfkj", // a hashed password
  "categories": "xx", // a reference to category, unique
  "recipes": ["123", "345"] // an array of references to recipe id
}

A Sample Category:

{
  "_id": "xx",
  "author": "abc", // reference to author id, unique
  "categories": ["fav", "easy"] // name of category, each unique
}

A Sample Recipe;

{
  "_id": "123",
  "author": "abc", // reference to author id, unique
  "dishname": "boiled egg", // name of recipe, unique for each user
  "serveSize": "1 ppl", // size for recipe
  "categories": ["xx"], // reference to category ids
  "note": "Heathy and easy!", // quick note for recipe
  "image": "", // TODO: link to dish image
  "imageNote": "a well done egg", // note for image
  "ingredients": [ // all ingredients
    {
      "item": "egg", // ingredient name
      "amount": "as you want" // amount of ingredient
    },
    {
      "item": "water",
      "amount": "pour until eggs aresubmerged"
    }
  ],
  "steps": [ // all steps, in certain order (TODO)
    {
      "description": "boil the water till bubbling", // describe this step
      "image": "" // TODO: link to step image
    },
    {
      "description": "boil the egg for 5 minutes"
    },
  ]
}

Link to Sample Database

Wireframes

/ -- page for recipe dictionary dictionary page

/edit -- page to add, edit, or delete recipe recipe edit page

/login -- page to authenticate an existing user

/register -- page to register a new user, share the same layout with login page login page

Site Map

|-  /
|
|-  /login
|
|-  /register
|
|-  /edit

User Stories

  • As a non-registered user, I can register a new account with the site.

  • As a user, I can log into my account.

  • As a user, I can log out of my account.

  • As a user, I can delete my account.

  • As a user, I can create a new recipe.

  • As a user, I can edit my recipe.

  • As a user, I can create category filter.

  • As a user, I can edit category filter.

  • As a user, I can edit category filters for each recipe.

  • As a user, I can delete my recipe.

  • As a user, I can delete category filter.

  • As a user, I can view all my recipes.

  • As a user, I can search a recipe via category.

  • As a user, I can search a recipe via dish name and ingredients.

Research Topics

  • React : a front-end user library
  • React Router : an api that creates single page application in React applications
  • Redux : a library to store global state on client-side
  • CORS : optional HTTP headers set by server to tell the client to read resources from another protocol/ host/ port
  • axios : a promised baesd library to send HTTP requests
  • dotenv : a module that loads environment variables seperate from code
  • Passport.js : an authentication middleware which provides various strategies
  • JWT : a method to encode data to transfer between parties

Reference

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published