/OurRecipes

Family recipes book

Primary LanguageJavaScriptMIT LicenseMIT

OurRecipes

Family recipes book

This will also be my notebook, so keep that in mind when reading

Main thoughts: The basic flow should include a user pasting a link and having the recipe stored automatically with images and "recipe metadata" scraped [recipe metadata: cuisine, cooking time, ingredients tokenized, etc] we will try to use as much firebase as we can, and if it gets too we will build the backend lean side by side with firebase methods

Architecture: // TODO add proper tech design

  1. Web

  2. react app. who serves it? // move to flutter once we get api in place?

  3. API handler

  4. firebase functions based

  5. will also handle authentication

  6. DB & Storage

  7. will be using firestore for user data and firebase storage for scraped images. // TODO add models

--- let's start thinking about the db model. firebase db is NoSQL. I am favouring a NoSQL model simply because my day job uses relational. let's start with a simple document based store modeling

Users collection

{
  _id: 123456,
  name: Ron,
  friends: [123457, 123458],
  recipes: [
    ref1(recipes collection),
  ],
  created: 2021-01-29,
  groceriesDayOfWeek: 10, // every second Tuesday
}

Recipes collection

{
  _id: 654321,
  url: "https://www.samplewebsiteok.com/",
  images: {
    thumbnail: ref,
    base: ref,
  },
  performer: 123456,
  creation_date: 2021-01-29 01:00:00,
  update_time: 2021-01-29 01:01:00,
},