/shop-task

Primary LanguageTypeScript

Shop app

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

Goals

  • Product list
  • Search products by name
  • Single product page
  • Add product to cart
  • Remove product from cart
  • Products are summed up in cart

Extra mile tasks

  • Refactoring
  • Pretty styles
  • Add validation for requests
  • Add custom 404 page

What could be added/changed

Cart

I implemented cart in a way that there is an imaginary backend that verifies prices on each item count change, I've seen simillar behaviors in other online shops like: Konesso and X-Kom.

To make it work seamlessly I could keep all items in store and update prices with count live, but that would be less realistic, because you don't want to show cached prices to customers. It could end up in some discrepancies in prices.