Giter VIP home page Giter VIP logo

bobaful's People

Contributors

alfredzhuang avatar andreidimaano avatar yarmoski avatar

Watchers

 avatar

bobaful's Issues

Update README.md for Backend

  • How express works in our project
  • How we use cookies
  • How we log in users
  • How we use reference Ids to save space in Database

I just want the project to be well-documented for future use, that way during behavioral interviews we know exactly what we did with the project and can explain the tradeoffs we made and the technologies we used :)

Fetch Product from backend and display it in the front end

We need to automate the menu display process.

  • Implement Urql Client
  • Create graphQL files for Mutations
  • Create GraphQL files for queries
  • Implement Login/Logout
  • Implement shopping Cart Query
  • Implement Add to Cart Mutation
  • Implement Delete from Cart Mutation
  • Implement User Orders Querys
  • Implement get All Products Query

Create a shopping Cart

Frontend:

  • Shopping cart will query the database using urql to display number of items in shopping cart when page first loads
  • Shopping Cart will update cart quantity using state (cross tab updating will not work)
  • Adding Shopping Cart Icon to the top of Navigation Bar (2 divs: 1 icon, 1 Number of Items)
  • Shopping Cart Page will query the database using urql to display all items in shopping cart as a stack (see checkout issue)
  • Add Shopping Cart to Sidebar

Backend:

  • Add shopping cart to users
  • Create Array of Items in mongoDB
  • getNumberOfItems() returns array size
  • Update Array of Items: Delete from Cart and Add to Cart
  • getItems() returns all items in shopping cart

Update FrontEnd README

  • Write about how we use URQL to connect frontend and backend
  • Write about how we structure the frontend
  • Write about how login, logout works
  • Write about how updating cache works
  • Write about how cors works

Integrate Twilio API

We will use twilio to notify a user that their order has been placed, shipped, and delivered

Fix NavBar

Current Navbar needs better color, and hamburger menu interaction

Set up Typescript environment for Backend and Frontend

npm init -y
npx tsc --init

install the following packages:
Dev Dependencies:
typescript
ts-node
ts-node-dev
nodemon
@types/node

Change the scripts:
"scripts": {
"start": "node build/index.js",
"build": "tsc --build tsconfig.json",
"dev": "nodemon --exec ts-node src/index.ts"
},

Add Update mutations for Product

update description: takes new description and either (name or id) as parameters. update the description of product

update favorite: takes a bool as a parameter and updates the product chefFav or fanFav

Implement Logout

  • Add conditional logout/login page to the menu bar
  • If user is logged in (check sessions) display logout
  • If user is not logged out, display login
  • loginUser() and logoutUser() using UrqlClient

Create Checkout Page

  • Create a reusable item component: remove, incrementer and decrementer, price, description
  • Create a stack that displays all items in a shopping cart
  • Calculate the subtotal and display it at the bottom of the page
  • Create a button for going back to order more
  • Create a button for payment

Add Update resolver to Order Class

We need resolvers for adding or deleting an item in the items array.
We'll pass in an Item id as a parameter

AddItem(item id)
RemoveItem(item id)

Change Product and Item Object

Product has ounces and price but Ounces and Price should be independent of a Product. This simplifies the product interface and creates a better abstraction. Item will now act as a Decorator to the Product class. Before, we needed to add a Thai Tea with 32 oz, a Thai Tea with 64 oz, and a Thai Tea with 128 oz to the database. Now, we will no longer need to add 3 Products for every menu item.

TLDR:
We need to transfer ounces and price to Item object

Item: quantity, product, price, ounces

Product: no longer has price and ounces

fix Query Resolvers

the following resolvers need to be fixed:

Item
Order
User

References need to be parsed

Refactor Modal

After Creating a modal, refactor the code into a reusable component

Add Shopping Cart to User

  • Create An Array of "Items" that will act as a shopping cart for a user
  • Create an Update Mutation that will take in an item as a parameter and add push it to the array of Items
  • Test Code
  • Write about Code

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.