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
-
Web
-
react app. who serves it? // move to flutter once we get api in place?
-
API handler
-
firebase functions based
-
will also handle authentication
-
DB & Storage
-
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,
},