sydney-sisco / bite-size Goto Github PK
View Code? Open in Web Editor NEWA full-flavoured recipe app, that trimmed the fat, and is presented in a bite-sized, easily digestible format.
A full-flavoured recipe app, that trimmed the fat, and is presented in a bite-sized, easily digestible format.
Bite Size
Search Bar
Search button
Browse button
Features Recipes Button which reveals three recipe cards
Just like we do on the My Recipes and My Favourites pages.
Browse - Page that shows all recipes
GET /recipes
Decide which framework to go with.
We're on the same page and have a framework picked out
Read - shows one specific recipe
GET /recipes/:id
add a modal to the nav bar, so a new recipe can be add from any page when a user is logged in
Add - new recipe form
POST /recipes - POST route for submitting new recipe (redirect to the recipe specific page)
Delete - DELETE route for deleting a recipe (redirect to list page)
DELETE /recipes/:id
Need to find a way to loop through our instructions and ingredients queries while in creation.
Find a new system (Slonik?) to properly get queries to loop as we add more params to the ingredient or instructions lists. Currently sitting with array, but unable to loop the params.
We are able to create a new recipe without issue!
https://www.npmjs.com/package/convert-units
Populate UoM table:
Cups (US)
Cups (Metric)
Cups (Imperial)
Deciliters [dL]
Fluid Ounces (UK) [fl oz]
Fluid Ounces (US) [fl oz]
Gallons (UK) [gal]
Gallons (US)
Grams [g]
Kilograms [kg]
Liters [L]
Milliliters [mL]
Ounces [oz]
Pints (UK) [pt]
Pints (US) [pt]
Pounds [lb]
Quarts (UK) [qt]
Quarts (US) [qt]
Tablespoons (US)
Tablespoons (Metric)
Tablespoons (Imperial)
Teaspoons (US)
Teaspoons (Metric)
Teaspoons (Imperial)
reference: https://www.thecalculatorsite.com/cooking/cooking-calculator.php
adjust all queries to account for the UoM.
We just need a rough idea of what form data will be input on this page.
Write query and route(s) to search bar
once saved ingredients will reorder themselves.
if no unit of measure, items will appear at the top of the list in a random order
followed by ingredients with a unit of measure. these ingredients will list alphabetically by units of measure.
fix so ingredients stay in the order they were input??
Generate log out to terminate the session
redirect to homepage
We could pass in the title as a prop or move the title out of the component
Browse - view all favourite per user
GET /favourites/:user_id
Add - create fav connection
POST /favourites/:user_id/:recipe_id
Delete - remove fav connection
DELETE /favourites/:user_id/:recipe_id
We need the cancel button when editing but not when creating a new recipe. Alternatively it could redirect somewhere.
Go through the svelte tutorial on their site.
Complete all steps of the svelte tutorial.
Alternative: follow through the svelte videos
Stretch: Place key takeaways in a notes file under "planning" for quick reference.
All have a better understanding of Svelte's capabilities.
and a logout button
Complete a list of migrations for both our seeds and our schemas.
We have database migrations that allow us to work with all of our data!
The getUserFavourites query needs to be fixed.
Currently, the query returns a fav value of 1. not the total number of favs
Browse - view all favourite per user
GET /favourites/:user_id
Add - create fav connection
POST /favourites/:user_id/:recipe_id
Delete - remove fav connection
DELETE /favourites/:user_id/:recipe_id
A user can delete their own account.
if session Id matches the user, you can make a delete request to the users table.
Open iTerm and confirm you are in a zsh shell (run command zsh) and you are in your home directory (~ || $HOME), install these packages from the command line:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Create .zshrc and .profile (you'll need a .zshrc for nvm in the next step)
$ touch .zshrc
$ touch .profile
Then install nvm with curl command:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | zsh
###Postgres
brew install postgresql
Once installed, run brew services start postgresql (Run this command if postgres ever disconnects, i.e. computer restarts)
Create a user role and database with current user:
psql postgres
CREATE USER <YOUR USERNAME OF THE MACHINE>;
# this may throw ERROR: role '<USERNAME>' already exists
CREATE DATABASE <YOUR USERNAME OF THE MACHINE>;
ALTER USER <YOUR USER NAME> WITH Superuser createrole createdb replication;
CREATE USER postgres;
ALTER USER postgres WITH Superuser createrole createdb replication;
\du
confirm both users are added
\l
view all databases stored (there should be 4 now)
seed database
const items = [
{ value: 1, label: "Vegetarian" },
{ value: 2, label: "Vegan" },
{ value: 3, label: "Poultry" },
{ value: 4, label: "Seafood" },
{ value: 5, label: "Pork" },
{ value: 6, label: "Beef" },
{ value: 7, label: "Gluten-Free" },
{ value: 8, label: "Lactose-Free" },
{ value: 9, label: "Halal" },
{ value: 10, label: "Breakfast" },
{ value: 11, label: "Brunch" },
{ value: 12, label: "Lunch" },
{ value: 13, label: "Dinner" },
{ value: 14, label: "Dessert" }
]
Vegetarian
Vegan
Poultry
Seafood
Pork
Beef
Gluten-Free
Lactose-Free
Halal
Breakfast
Brunch
Lunch
Dinner
Dessert
loops through form
create a component to pass to various pages
update get recipe details function to also get recipe tags
Browse - needed if emojis are visible in search results
GET /recipe/:id/emojis/
Add - add emoji reaction
POST /recipe/:id/emojis/
Delete - remove emoji reaction
DELETE /recipe/:id/emojis/
links to:
Browse: /recipes
My Recipes: /my-recipes
My Favourites: /favourites
Add new recipe modal
Search bar
Logged in as XXXX // Register
Logout button // Login button
Right now, you need to click on the name to access a card.
Do we want to switch it so you can click anywhere on the card to access the recipe?
Browse
GET /recipes
Read
GET /recipes/:id
Edit
PATCH /recipes/:id
Add
POST /recipes
Delete
DELETE /recipes/:id
Display all tags. When clicked on, the recipes are filtered to only include recipes in the tagged categories.
Queries for these routes:
Read
GET /users/:id
Edit
PATCH /users/:id
Add
POST /users
Delete
DELETE /users/:id
Edit - edit a specific recipe
PATCH /recipes/:id
create page, query, and routes
Browse - needed if emojis are visible in search results
GET /recipe/:id/emojis/
Add - add emoji reaction
POST /recipe/:id/emojis/
Delete - remove emoji reaction
DELETE /recipe/:id/emojis/
Create registration form/page
registration query
registration route
should the same logic be applied to instructions?
Browse
GET /recipes
Read
GET /recipes/:id
Edit
PATCH /recipes/:id
Add
POST /recipes
Delete
DELETE /recipes/:id
Let's find out what it takes to get the front-end app to make an AJAX call to a backend route. Do we need to configure some sort of proxy like we did with Scheduler?
The front-end app can retrieve data from the database via the back-end server.
We need to get our environment variables working correctly.
Troubleshoot and research. Once we have those handled, make sure to replace all routes with our process.env replacement.
We have clean code that anyone can use - and don't have to worry about storing info we shouldn't on our git.
We need routes for Users!
Read
GET /users/:id
Edit
PATCH /users/:id
Add
POST /users
Delete
DELETE /users/:id
When you click on a username, all the recipes by that user are displayed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.