Skip to content

Gourmet 2.0 Web Based Version Brainstorm

Tom Hinkle edited this page Feb 22, 2018 · 6 revisions

Gourmet Web-Based Plan:

HIGH LEVEL PLAN

At a high level, we distribute Gourmet in the following way:

  • Front-end is HTML5 based hybrid development for distribution to web + mobile + desktop app on web.

  • Importing needs help from a chrome extension to parse recipes on the page. Chrome extension can be extensible (recipes?) and push out structured data for Gourmet etc.

  • Backend is flexible data-store (web-based? python-based? who care based?) and supports sharing of information online. An ideal backend might grow quite flexible, supporting offline and online storage, for example, or both private and public recipes.

Funding/Open Source/How do you do open-source web apps?

  • Code is open source, built with a plugin architecture to encourage expanding feature sets and collaborative hacking

  • Shared server is subscription-supported or ad-supported. Data is always available for download in interoperable format. You can run your own server if you want to and run all the code on your own (just without an app in the app store etc.)

  • Users can share data w/ each other which will build a crowdsourced database for more efficient looking up of ingredient keys, parsing of webpages, etc.

Backend Plan Let’s think through the interface the backend has to expose…​

RecipeImporter - importUrl - importFile - importRecipe

RecipeDatabase - searchRecipes(q) - getRecipe(id) - importRecipe(url) - getImage(image-id) - getShortRec* (id)

(*I think we will likely want to make a lower-data version of getRecipe available that would omit all the starred attributes below and be useful for things like listing search results etc.)

     Recipe {
       title : '',
       source : {
 	 url : '',
 	 name : '',
 	 details : HTMLBlob,
       },
       preptime : Time,
       cooktime : Time,
       totaltime : Time,
       notes* : {
 	 'head':HTMLBlob,
 	 'foot':HTMLBlob,
       },
       thumb : source-url (or CDATA),
       image* : source-url (or CDATA),
       steps* : [
  	 {label:'',content:HTMLBlob},
 	 {label:'',content:HTMLBlob},
 	 {label:'',content:HTMLBlob},
       ],
       ingredients* : [Ingredient, Ingredient, ...]
     }

IngredientDatabase

  • getIngredients(recipe-id)

  • lookupKey (ing item)

    Ingredient {
       amount : NUMBER,
       unit : '',
       item : '',
       prep : '',
       ingkey : '',
       grams : undefined, // if we have density information
       recipeId : null, // for recipes as ingredients
    }

And our first, prototypical plugin is the nutritional plugin, which will add…​ To the backend…​ - getNutrients (ing key) - guessNutrients (ing item) - associateNutrients (ing, nutritionalKey)

To the frontend…​ - NutritionalInfoView

    NutLink {
      ingkey : '',
      nutkey : '',
    }

    NutInfo {
      nutkey : '',
      kcal : {amt:127,unit:'calorie'},
      satfat : {amt:3.4,unit:'g'},
      ...
    }
Clone this wiki locally