- If you work alone follow the React task guideline
- If you work in a team follow the Work in a team guideline
- Install Prettier Extention and use this VSCode settings to enable format on save. Implement Products catalog following this design.
Use products
and product details
tо fetch data (use actual productId as a last part of the URL before .json).
If you want to change any API data for the phones you can update the files in the /public/api folder, and use you project link as a BASE_API_URL.
Store the Cart in the localStorage
- Create
pages,componentsandhelpersfolders to structure your app - Use
scssfiles per component - Use component names as BEM block names with all the other BEM rules applied
- Add
<header>with links to all the pages- The
Logoand theNavare aligned left - The
Favoritesand theCartare aligned right
- The
- Use
NavLinkto highlight current page inHeader - Add
<footer>- Footer content is limited to the same width as the page content
- Add the link to the Github repo
- (*) Implement
Back to topbutton
- Create
HomePageavailable at/with just a titleHome page - Fetch products from API
- Each product has a
type:phone,tabletoraccessory priceis given beforediscountdiscountis give in percents%ageis used to sort byNewestidis required to fetch product details
- Each product has a
- Create
ProductsSlidercomponent and use it inHot pricesblock- Create
getHotPriceProductsmethod fetching products with discount from API sorted by absolute discount value (not percentage given in API) - For now do all the filtering and sorting on client side
- Create
ProductCardcomponent to use it everywhere and adddata-cy="cardsContainer"attribute to the container of these elements - Add ability to use
<and>buttons to scroll products.
- Create
- Add
Brand newblock usingProductsSlider- Create
getBrandNewProductsmethod fetching products without a discount from the API starting from the most expensive
- Create
- Add
Shop by categoryblock with the links to/phones,/tabletsand/accessories. Adddata-cy="categoryLinksContainer"to links container. - Replace the
Home pagetitle with slider and use for picture element of this slider- User can change pictures with buttons infinitely
- (*) Swipe pictures every 5 seconds
- Create
PhonesPageavailable at/phoneswith a<h1>titleMobile phones- Create
getPhonesAPI call fetching the products with thetype:phone
- Create
- Add
ProductsListwithdata-cy="productList"attribute showing all thephones - Implement a
Loaderto show it while waiting for the data from server - Add ability to sort the products by
age(Newest,value="age"),name(Alphabetically,value="name") andprice(Cheapest,value="price") using<select>element.- (*) save sort order in the URL
?sort=ageand apply it after the page reload
- (*) save sort order in the URL
- Add
Paginationusingdata-cy="pagination"for it's components container andItems on pageusing<select>element with4,8,16andalloptions. Add attributesdata-cy="paginationLeft"anddata-cy="paginationRight"to pagination buttons- It should limit the products you show to the user
- Read the description for more detailed explanation
- Hide all the pagination elements if there are a few items (less than 1 smallest page size)
- (*) Save
?page=2&perPage=8in the URL and apply them after the page reload
- Create
TabletsPagepage with<h1>titleTabletsavailable at/tabletsworking the same way asPhonesPage- Create
getTabletsmethod fetching the products withtype:tablet
- Create
- Create
AccessoriesPagewith<h1>titleAccessoriespage available at/accessoriesworking the same way asPhonesPage- Create
getAccessoriesmethod fetching the products withtype:accessory - Implement
NoResultscomponent displayed if there are no products available containing text<Category name> not found
- Create
- Create
ProductDetailsPageavailable at/product/:productIdProductCardshould be a link to the details page
- Fetch phone details from API taking the
phoneIdfrom the URL- Use
Loaderwhen fetching the details
- Use
- Show the details on the page
- Hide
Available colorsandSelect capacityfor now Aboutsection withdata-cy="productDescription"should contain just a description (without any subheaders)- Choose
Tech specsyou want to show
- Hide
- Add ability to choose a picture
- Implement
You may also likeblock with products chosen randomly- create
getSuggestedProductsmethod fetching the suggested products
- create
- Add
Backbutton withdata-cy="backButton"attribute working the same way as a BrowserBackbutton - Add
Breadcrumbsat the top withdata-cy="breadCrumbs"attribute in elements container- The last part is a plain text all the other ones are links
- Implement
CartPagestoring an array ofCartItems- Each item should have
id,quantityand aproduct
- Each item should have
Add to cartbutton inProductCartshould add a product to theCart- If the product is already in the
Cartthe button should sayAdded to cart - Implement
Carthelper storing the items in memory and having all the required methods. Later on it will interact with the API - Add ability to remove items from the
Cartwith axbutton. Adddata-cy="cartDeleteButton"attribute to the<button>element. - Add message
Your cart is emptywhen there are no products in theCart - Add ability to change the quantity in the
Cartwith buttons containing symbols-and+around the quantity. - Total amount and quantity should be calculated automatically. The element showing the quantity should have
data-cy="productQauntity"attribute. Checkoutbutton should show the messageWe are sorry, but this feature is not implemented yetafter clicking.- (*) Show the total quantity near the
Carticon in the header. - (*) Save the
Cartto thelocalSotrageon each change and read it on page load.
- Create
FavoritesPageit should show theProductsListwith all the favorite products - Add ability to add/remove favorite products by pressing a hart and add
data-cy="addToFavorite"attribute to this<button>element. - (*) Show the favorites count near the
Favoritesicon in the header
- Add a
Searchcomponent with an input into the<header>to filter products - It should be shown only at
/phones,/tablets,/accessoriesand/favoriteswith an appropriate text - The
xsign withdata-cy="searchDelete"attribute appears when the query is not empty and clears the search - It should work with pagination and sorting
- (*) Add
debounceto the search field - (*) Save
Searchparams in the URL usingqueryParams(?query=moto) and apply them on page load - (*) Implement
NoSearchResultscomponent and show it when there are no products matching the query
- Add
NotFoundPagecontaining textPage not foundfor all the other URLs with the link toHomePage - Implement
Phone was not foundstate for thePhoneDetailsPageif there is no phone with a givenphoneIdon the server