Giter Site home page Giter Site logo

recipesapi's People

Contributors

danistark1 avatar danni-stark avatar

Watchers

 avatar

recipesapi's Issues

Commit saved records

add
$em->getConnection()->beginTransaction();
$em->getConnection()->commit();

to all saved records.

Add tagging

I should be able to add a comma separated tags when posting a recipe.

  • new recipesTags table
  • When posting the tags array to a recipe, check if the tag table already has the tag
  • I should be able to search for a tag
  • I can add up to 10 tags (validation)
  • added tags are unique (validation)

Add directions parsing

Directions will be # separated, and will need to be split into an array.
Each array value will be a step.

Ex.

#Add 1 cup of water#Add 1 tsp of salt#Add 4 cups of flour

Should be parsed into
["Add 1 cup of water", "Add 1 tsp of salt", "Add 4 cups of flour"]

Project Plan

Tables

Recipes

  • Name
  • prep Time
  • Cooking Time
  • Servings
  • Type (category)
  • Directions (I should be able to store lists)
  • Ingredients (will be comma separated)
  • Added on (insertDateTime)
  • Favorites (0 by default), I can add a recipe as a favorite.
  • Added by (default empty string, might be used later)

Category

  • Name
  • Cuisine (Middle-Eastern, Canadian)
  • Type (main course, side dish, deserts, breakfast)
  • Added on (insertDateTime)

[Feature] Email a randomly selected recipe

send random meal idea on set days
Select meals of type main-dish, get all ids, them randomly select one of the ids
Email the selected recipe with its instructions to recipients

A selected meal should not be selected again until all other meals have been selected once.
For that, all selected meals should be placed in a new table, once all the meals have been selected, the table gets pruned.

Search: fulltext match

currently, when searching, we are doing a left/right wildcard match on any characters, it should be word match.

FrontEnd notes

  • When posting a recipe, response code should be read
    • if response is 200, display success, otherwise display the response message from the api.
    • Modal should close
  • Frontend Validation should conform to backend's, ex. frontend name should not exceed 100 characters.. (I can provide a table of field name/db structure)

On Mobile

You Cannot scroll to featured recipes

To Reproduce

On mobile, click on add recipe, close modal, then try to scroll down to featured recipes.

APIs

POST

Post a recipe

Field Type Required
name String Yes
prep_time time No
cooking_time time No
category string Yes
directions text Yes
ingredients text Yes
insert_date_time datetime Yes
favorites Integer Yes (should be default 0)
added_by string No
calories string No
cuisine string No
url string No

Sample POST

{
    "name": "pizza",
    "directions":"put in oven#eat",
    "ingredients": "1 tsp salt#2 tsp sugar",
    "category": "main_dish",
    "cuisine": "italian"
}

Sample response

[
    {
        "id": 3,
        "name": "pizza",
        "prepTime": null,
        "cookingTime": null,
        "servings": null,
        "category": "main_dish",
        "directions": "put in oven, eat",
        "insertDateTime": "2021-04-03 14:54:10",
        "favourites": 0,
        "addedBy": "",
        "calories": null,
        "cuisine": "italian",
        "ingredients": [
            "1 tsp salt",
            "2 tsp sugar"
        ],
        "url": null
    }
]

GetByName

GetWhere

ex. - http://192.168.4.10:8000/recipes/where?id=1

GetSearch

Delete

http://localhost:8000/recipes/delete/{recipeID}

PUT

http://localhost:8000/recipes/update/1

{
    "name": "pizza4",
    "directions": "updated directions2",
    "category": "main_dish"
}

Get Category (Do we need this?)

I need to be able to get a list of categories

when adding a recipe, I have a drop-down that should have all the available categories.

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.